Error messages if background detect fails.

This commit is contained in:
Richard Bowman 2024-01-08 16:40:07 +00:00
parent ec61019d76
commit 7eeee89b23

View file

@ -24,7 +24,7 @@
<propertyControl <propertyControl
thing-name="background_detect" thing-name="background_detect"
property-name="fraction" property-name="fraction"
label="Sample coverage required" label="Sample coverage required (%)"
/> />
</div> </div>
<div class="uk-margin"> <div class="uk-margin">
@ -34,6 +34,7 @@
:can-terminate="false" :can-terminate="false"
:poll-interval="0.1" :poll-interval="0.1"
@response="alertBackgroundFraction" @response="alertBackgroundFraction"
@error="backgroundDetectError"
/> />
</div> </div>
<div class="uk-margin"> <div class="uk-margin">
@ -43,6 +44,7 @@
:can-terminate="false" :can-terminate="false"
:poll-interval="0.1" :poll-interval="0.1"
@response="alertImageLabel" @response="alertImageLabel"
@error="backgroundDetectError"
/> />
</div> </div>
</div> </div>
@ -88,6 +90,12 @@ export default {
alertImageLabel(r) { alertImageLabel(r) {
let label = r.output === true ? "sample" : "background"; let label = r.output === true ? "sample" : "background";
this.modalNotify(`Current image is ${label}`); this.modalNotify(`Current image is ${label}`);
},
backgroundDetectError() {
this.modalError(
"Background detection failed, most likely you need to set a background image." +
" There may be more information in the log."
);
} }
} }
}; };