Unverified Commit 1c1db124 authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub
Browse files

Merge pull request #73 from dilallkx/kd_sp40_fix_frontend

Event Replay fixes
parents 3f072712 4eafb09c
Loading
Loading
Loading
Loading
+18 −12
Original line number Diff line number Diff line
@@ -182,7 +182,14 @@ func (r *ReplayMgr) playEventByIndex() error {

// Start - starts replay execution
func (r *ReplayMgr) Start(fileName string, replay ceModel.Replay, loop bool, ignoreInitEvent bool) error {
	if !r.isStarted {
	// Verify replay file can be started
	if r.isStarted {
		return errors.New("Replay already running, filename: " + r.currentFileName)
	} else if len(replay.Events) <= 1 {
		return errors.New("Replay has no events, filename: " + r.currentFileName)
	}

	// Initialize replay execution
	r.timeStarted = time.Now()
	r.isStarted = true
	r.nextEventIndex = 0
@@ -191,11 +198,10 @@ func (r *ReplayMgr) Start(fileName string, replay ceModel.Replay, loop bool, ign
	r.loop = loop
	r.currentFileName = fileName
	r.ignoreInitEvent = ignoreInitEvent
		//executing the events

	// Start playing events
	_ = r.playEventByIndex()
	} else {
		return errors.New("Replay already running, filename: " + r.currentFileName)
	}

	return nil
}

+1 −1
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ class DashboardContainer extends Component {
    const root = this.getRoot();
    const nodes = root.descendants();
    const apps = nodes.filter(isApp);
    const appIds = apps.map(a => a.data.id);
    const appIds = apps.map(a => a.data.name);
    appIds.unshift('None');

    const selectedSource = appIds.includes(this.props.sourceNodeSelected) ? this.props.sourceNodeSelected : 'None';
+2 −2
Original line number Diff line number Diff line
@@ -112,14 +112,14 @@ class EventContainer extends Component {
          style={{ padding: 10, marginBottom: 10 }}
        >
          <Grid style={{ marginBottom: 10 }}>
            <GridCell span={6}>
            <GridCell span={2}>
              <div style={{ marginBottom: 10 }}>
                <span className="mdc-typography--headline6">
                  Event
                </span>
              </div>
            </GridCell>
            <GridCell span={6}>
            <GridCell span={10}>
              <div align={'right'}>
                <Button
                  outlined
+2 −3
Original line number Diff line number Diff line
@@ -187,10 +187,9 @@ class ExecPageContainer extends Component {
        // TODO consider showing an alert
        // console.log(error);
      }
    });

      // Refresh file list
      this.updateReplayFileList();
    });
  }

  // CLOSE DIALOG