Commit 4eafb09c authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

fix for replay files with no events + frontend fix for src & dest node names

parent d375fee9
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';