Replace tasksubmitter with action-button

I've changed tasksubmitter to accept a "thing" and "action" rather than a single URL. This seems more in keeping with
propertyControl, and eliminates the need for loads of
computed properties.

I've also deleted (rather than just commenting out) chunks of the web app that are no longer in use. These may be
reinstated in the future - but we can get them from git
history. It's less confusing not to have vestigial
code in the repo.

This builds OK but is not, as yet, tested with hardware.
This commit is contained in:
Richard Bowman 2024-02-29 21:44:39 +00:00
parent 612b88d58c
commit cbd8b090ec
22 changed files with 225 additions and 2325 deletions

View file

@ -12,12 +12,12 @@
<br />
{{ $store.state.origin }}
</div>
<task-submitter
v-if="flashLedUri"
:submit-url="flashLedUri"
<action-button
thing="stage"
action="flash_led"
submit-label="Flash Illumination"
:can-terminate="false"
:submit-data="{'dt': 0.25}"
:submit-data="{ dt: 0.25 }"
/>
</div>
@ -83,18 +83,15 @@
<script>
import axios from "axios";
import taskSubmitter from '../../genericComponents/taskSubmitter.vue';
import ActionButton from "../../labThingsComponents/actionButton.vue";
export default {
components: { taskSubmitter },
name: "StatusPane",
components: { ActionButton },
computed: {
things: function() {
return this.$store.getters["wot/thingDescriptions"];
},
flashLedUri() {
return this.thingActionUrl("stage", "flash_led");
}
},