Allow GUI to start without stage
This commit is contained in:
parent
cb74db8061
commit
6291263846
1 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app" class="uk-height-1-1 uk-margin-remove uk-padding-remove" :class="handleTheme">
|
<div id="app" class="uk-height-1-1 uk-margin-remove uk-padding-remove" :class="handleTheme">
|
||||||
|
<!-- this stops the app loading until setConnected is committed in the store, this means
|
||||||
|
other components will not load until we have Thing Descriptions. -->
|
||||||
<loadingContent v-if="!$store.getters.ready" />
|
<loadingContent v-if="!$store.getters.ready" />
|
||||||
<appContent v-if="$store.getters.ready" />
|
<appContent v-if="$store.getters.ready" />
|
||||||
<!-- Runtime modals -->
|
<!-- Runtime modals -->
|
||||||
|
|
@ -213,7 +215,7 @@ export default {
|
||||||
// TODO: should we purge existing consumedThings?
|
// TODO: should we purge existing consumedThings?
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch("wot/fetchThingDescriptions", `${baseUri}/thing_descriptions/`);
|
await this.$store.dispatch("wot/fetchThingDescriptions", `${baseUri}/thing_descriptions/`);
|
||||||
for (let requiredThing of ["camera", "stage"]) {
|
for (let requiredThing of ["camera", "system"]) {
|
||||||
if (!this.thingAvailable(requiredThing)) {
|
if (!this.thingAvailable(requiredThing)) {
|
||||||
throw new Error(`No ${requiredThing} found, the GUI won't work without one.`);
|
throw new Error(`No ${requiredThing} found, the GUI won't work without one.`);
|
||||||
}
|
}
|
||||||
|
|
@ -225,6 +227,7 @@ export default {
|
||||||
} catch {
|
} catch {
|
||||||
this.$store.commit("changeMicroscopeHostname", null);
|
this.$store.commit("changeMicroscopeHostname", null);
|
||||||
}
|
}
|
||||||
|
// start rendering components
|
||||||
this.$store.commit("setConnected");
|
this.$store.commit("setConnected");
|
||||||
this.$store.commit("setErrorMessage", null);
|
this.$store.commit("setErrorMessage", null);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue