Skip to content

Commit 2300c85

Browse files
committed
Offer continuation from timeout
1 parent 0bc9d6c commit 2300c85

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

internal/app/statemachine/change_continue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ func (s *StateMachine) processChangeContinue(newState *state.State) (changes []*
3737
return
3838
}
3939

40-
if *newState.Command.Type == state.Command_HALT {
41-
log.Printf("Continue with STOP after HALT")
40+
if *newState.Command.Type == state.Command_HALT || *newState.Command.Type == state.Command_TIMEOUT {
41+
log.Printf("Continue with STOP after %s", newState.Command.Type.String())
4242
changes = append(changes, s.createCommandChange(state.NewCommandNeutral(state.Command_STOP)))
4343
} else if newState.NextCommand != nil {
4444
log.Printf("Continue with next command: %v", newState.NextCommand)

src/components/control/ControlFlowBar.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
v-on:click="triggerContinue"
1919
v-bind:disabled="continueDisabled">
2020
Continue
21-
<span v-if="nextCommand && nextCommand.forTeam">with</span>
21+
<span v-if="nextCommand && nextCommand.type">with</span>
2222
<span v-if="nextCommand"
2323
:class="teamColorClass">
2424
{{ nextCommand.type }}
@@ -68,6 +68,9 @@ export default {
6868
halted() {
6969
return this.$store.state.matchState.command.type === 'HALT';
7070
},
71+
timeoutActive() {
72+
return this.$store.state.matchState.command.type === 'TIMEOUT';
73+
},
7174
continueDisabled() {
7275
return !this.nextCommand;
7376
},
@@ -82,6 +85,9 @@ export default {
8285
}
8386
return null;
8487
}
88+
if (this.timeoutActive) {
89+
return {type: 'STOP'}
90+
}
8591
if (!this.$store.state.matchState.nextCommand) {
8692
return null;
8793
}

0 commit comments

Comments
 (0)