Skip to content

Commit

Permalink
add an interrupt button
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Jun 15, 2022
1 parent 36aa080 commit b2c0b1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/MainCtrl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { useStore } from "@/stores/index";
import RESET from "@/graphql/mutations/Reset.gql";
import EXEC from "@/graphql/mutations/Exec.gql";
import INTERRUPT from "@/graphql/mutations/Interrupt.gql";
import SUBSCRIBE_STATE from "@/graphql/subscriptions/State.gql";
import SUBSCRIBE_TRACE_IDS from "@/graphql/subscriptions/TraceIds.gql";
Expand All @@ -52,6 +53,12 @@ export default {
icon: "mdi-restore",
states: ["initialized", "finished", "closed"],
},
{
text: "Interrupt",
method: "interrupt",
icon: "mdi-close",
states: ["running"],
},
],
chipConfig: {
default: { color: null },
Expand Down Expand Up @@ -102,6 +109,11 @@ export default {
mutation: RESET,
});
},
async interrupt() {
const data = await this.$apollo.mutate({
mutation: INTERRUPT,
});
},
},
};
</script>
3 changes: 3 additions & 0 deletions src/graphql/mutations/Interrupt.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation Interrupt {
interrupt
}

0 comments on commit b2c0b1b

Please sign in to comment.