-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e4e551
commit 4076e9d
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<script setup> | ||
const nLoops = ref(1); | ||
const showTime = ref(60); | ||
const loading = ref(false); | ||
const { appSrcDir } = useConfig(); | ||
const { start, stop } = useAPI(); | ||
const superDemoAppCommand = computed(() => { | ||
// build command and command line options; | ||
const command = ["sudo", appSrcDir + 'superDemo/superDemo.py']; | ||
command.push('--n_loops'); | ||
command.push(nLoops.value); | ||
command.push('--show_time'); | ||
command.push(showTime.value); | ||
return command; | ||
}); | ||
async function superDemo() { | ||
loading.value = true; | ||
// build command and command line options; | ||
const response = await start(superDemoAppCommand.value) | ||
console.log(response.data) | ||
loading.value = false; | ||
} | ||
</script> | ||
|
||
<template> | ||
|
||
Number of loops: <input type="number" v-model="nLoops"><br><br> | ||
Show time per app: <input type="number" v-model="showTime"> (seconds)<br><br> | ||
<div style="word-break: break-all;">{{ superDemoAppCommand }}</div> | ||
<div class="field is-grouped"> | ||
<p class="control"> | ||
<button @click="superDemo" class="button is-primary" | ||
:class="{ 'is-loading': loading }">Super demo</button> | ||
</p> | ||
<p class="control"> | ||
<button @click="stop" class="button is-danger" :class="{ 'is-loading': loading }">Stop</button> | ||
</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters