Display background detector settings built automatically from schema
This commit is contained in:
parent
d376eee5d5
commit
92d15d921b
3 changed files with 20 additions and 6 deletions
|
|
@ -88,7 +88,6 @@ export default {
|
|||
},
|
||||
writeProperty: async function(requestedValue) {
|
||||
try {
|
||||
console.log(requestedValue);
|
||||
this.value=requestedValue;
|
||||
await this.writeThingProperty(
|
||||
this.thingName,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@
|
|||
<li>
|
||||
<a class="uk-accordion-title" href="#">Settings</a>
|
||||
<div class="uk-accordion-content">
|
||||
<p> TODO!</p>
|
||||
<input-from-schema
|
||||
v-if="backgroundDetectorStatus"
|
||||
v-model="backgroundDetectorStatus.settings"
|
||||
:data-schema="backgroundDetectorStatus.settings_schema"
|
||||
label=""
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -26,7 +31,7 @@
|
|||
thing="camera"
|
||||
action="image_is_sample"
|
||||
submit-label="Check Current Image"
|
||||
:isDisabled="!backgroundDetectorStatus.ready"
|
||||
:isDisabled="!ready"
|
||||
:can-terminate="false"
|
||||
:poll-interval="0.1"
|
||||
@response="alertImageLabel"
|
||||
|
|
@ -39,10 +44,12 @@
|
|||
|
||||
<script>
|
||||
import ActionButton from "../../labThingsComponents/actionButton.vue";
|
||||
import InputFromSchema from "../../labThingsComponents/inputFromSchema.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ActionButton,
|
||||
InputFromSchema
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -51,6 +58,13 @@ export default {
|
|||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
ready() {
|
||||
const status = this.backgroundDetectorStatus;
|
||||
return status && status.ready === true;
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
alertBackgroundSet() {
|
||||
this.modalNotify(`Background image has been updated`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue