Updated host links to use store baseUri
This commit is contained in:
parent
293e0665c6
commit
39d45bc749
7 changed files with 29 additions and 47 deletions
|
|
@ -410,9 +410,7 @@ export default {
|
||||||
// Get plugin action link
|
// Get plugin action link
|
||||||
var link = plugins.ScanPlugin.views.tile.links.self;
|
var link = plugins.ScanPlugin.views.tile.links.self;
|
||||||
// Store plugin action URI
|
// Store plugin action URI
|
||||||
this.scanUri = `http://${this.$store.state.host}:${
|
this.scanUri = `${this.$store.getters.baseUri}${link}`;
|
||||||
this.$store.state.port
|
|
||||||
}${link}`;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|
|
||||||
|
|
@ -180,19 +180,13 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
moveActionUri: function() {
|
moveActionUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/actions/stage/move`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/actions/stage/move`;
|
|
||||||
},
|
},
|
||||||
positionStatusUri: function() {
|
positionStatusUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/status/stage/position`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/status/stage/position`;
|
|
||||||
},
|
},
|
||||||
pluginsUri: function() {
|
pluginsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/plugins`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/plugins`;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -343,11 +337,9 @@ export default {
|
||||||
plugins.AutofocusPlugin.views.fast_autofocus.links.self;
|
plugins.AutofocusPlugin.views.fast_autofocus.links.self;
|
||||||
var normalLink = plugins.AutofocusPlugin.views.autofocus.links.self;
|
var normalLink = plugins.AutofocusPlugin.views.autofocus.links.self;
|
||||||
// Store plugin action URI
|
// Store plugin action URI
|
||||||
this.fastAutofocusUri = `http://${this.$store.state.host}:${
|
this.fastAutofocusUri = `${this.$store.getters.baseUri}${fastLink}`;
|
||||||
this.$store.state.port
|
this.normalAutofocusUri = `${
|
||||||
}${fastLink}`;
|
this.$store.getters.baseUri
|
||||||
this.normalAutofocusUri = `http://${this.$store.state.host}:${
|
|
||||||
this.$store.state.port
|
|
||||||
}${normalLink}`;
|
}${normalLink}`;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -69,14 +69,10 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
settingsUri: function() {
|
settingsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/settings`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/settings`;
|
|
||||||
},
|
},
|
||||||
statusUri: function() {
|
statusUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/status`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/status`;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,14 +93,10 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
settingsUri: function() {
|
settingsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/settings`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/settings`;
|
|
||||||
},
|
},
|
||||||
pluginsUri: function() {
|
pluginsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/plugins`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/plugins`;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -132,9 +128,7 @@ export default {
|
||||||
var link =
|
var link =
|
||||||
plugins.AutocalibrationPlugin.views.recalibrate.links.self;
|
plugins.AutocalibrationPlugin.views.recalibrate.links.self;
|
||||||
// Store plugin action URI
|
// Store plugin action URI
|
||||||
this.recalibrationUri = `http://${this.$store.state.host}:${
|
this.recalibrationUri = `${this.$store.getters.baseUri}${link}`;
|
||||||
this.$store.state.port
|
|
||||||
}${link}`;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,7 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
settingsUri: function() {
|
settingsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/settings`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/settings`;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,15 +182,23 @@ export default {
|
||||||
|
|
||||||
created: function() {
|
created: function() {
|
||||||
// Watch for host 'ready', then update status
|
// Watch for host 'ready', then update status
|
||||||
this.$store.watch(
|
this.unwatchStoreFunction = this.$store.watch(
|
||||||
(state, getters) => {
|
(state, getters) => {
|
||||||
return getters.ready;
|
return getters.ready;
|
||||||
},
|
},
|
||||||
() => {
|
ready => {
|
||||||
|
// Update plugins
|
||||||
this.updatePlugins();
|
this.updatePlugins();
|
||||||
|
if (ready) {
|
||||||
|
console.log("Left panel now ready");
|
||||||
|
} else {
|
||||||
|
console.log("Right panel now disabled");
|
||||||
|
this.currentTab = "status";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
updatePlugins: function() {
|
updatePlugins: function() {
|
||||||
axios
|
axios
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,20 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
streamImgUri: function() {
|
streamImgUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/streams/mjpeg`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/streams/mjpeg`;
|
|
||||||
},
|
},
|
||||||
startPreviewUri: function() {
|
startPreviewUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${
|
||||||
this.$store.state.port
|
this.$store.getters.baseUri
|
||||||
}/api/v2/actions/camera/preview/start`;
|
}/api/v2/actions/camera/preview/start`;
|
||||||
},
|
},
|
||||||
stopPreviewUri: function() {
|
stopPreviewUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${
|
||||||
this.$store.state.port
|
this.$store.getters.baseUri
|
||||||
}/api/v2/actions/camera/preview/stop`;
|
}/api/v2/actions/camera/preview/stop`;
|
||||||
},
|
},
|
||||||
settingsUri: function() {
|
settingsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/settings`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/settings`;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue