Fix stage geometry URL
This commit is contained in:
parent
b2c6c93284
commit
157eb28053
1 changed files with 74 additions and 72 deletions
|
|
@ -1,88 +1,90 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="stageSettings">
|
<div id="stageSettings">
|
||||||
<div>
|
<div>
|
||||||
<h3>Stage settings</h3>
|
<h3>Stage settings</h3>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
Stage Type
|
Stage Type
|
||||||
<div v-if="this.stageType != 'MissingStage'">
|
<div v-if="this.stageType != 'MissingStage'">
|
||||||
<form @submit.prevent="setStageType">
|
<form @submit.prevent="setStageType">
|
||||||
<div>
|
<div>
|
||||||
<select v-model="stageType" class="uk-select">
|
<select v-model="stageType" class="uk-select">
|
||||||
<option value="SangaStage">SangaStage (Standard)</option>
|
<option value="SangaStage">SangaStage (Standard)</option>
|
||||||
<option value= "SangaDeltaStage"> SangaStage (Delta)</option>
|
<option value="SangaDeltaStage"> SangaStage (Delta)</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="uk-button uk-button-primary uk-form-small uk-float-right uk-margin-small uk-width-1-1">
|
<button
|
||||||
Change stage type
|
type="submit"
|
||||||
</button>
|
class="uk-button uk-button-primary uk-form-small uk-float-right uk-margin-small uk-width-1-1"
|
||||||
</div>
|
>
|
||||||
</form>
|
Change stage type
|
||||||
</div>
|
</button>
|
||||||
<div v-else class="uk-text-danger"><b>No stage connected</b></div>
|
</div>
|
||||||
</label>
|
</form>
|
||||||
</p>
|
</div>
|
||||||
</div>
|
<div v-else class="uk-text-danger"><b>No stage connected</b></div>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import taskSubmitter from "../../genericComponents/taskSubmitter";
|
import taskSubmitter from "../../genericComponents/taskSubmitter";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StageSettings",
|
name: "StageSettings",
|
||||||
|
|
||||||
components:{
|
components: {
|
||||||
taskSubmitter
|
taskSubmitter
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function(){
|
data: function() {
|
||||||
return {
|
return {
|
||||||
stageType: "MissingStage",
|
stageType: "MissingStage"
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
stageTypeUri: function() {
|
stageTypeUri: function() {
|
||||||
return `${this.$store.getters.baseUri}/api/v2/properties/stage/type`;
|
return `${this.$store.getters.baseUri}/api/v2/instrument/stage/type`;
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted(){
|
|
||||||
this.getStageType();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
getStageType: function(){
|
|
||||||
console.log("Getting stage type")
|
|
||||||
axios
|
|
||||||
.get(this.stageTypeUri)
|
|
||||||
.then(response => {
|
|
||||||
console.log("Stage type is "+ response.data);
|
|
||||||
this.stageType = response.data;
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.modalError(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setStageType: function(){
|
|
||||||
console.log("Setting stage type")
|
|
||||||
axios
|
|
||||||
.put(this.stageTypeUri,this.stageType)
|
|
||||||
.then(response => {
|
|
||||||
this.stageType = response.data;
|
|
||||||
console.log("Stage type set to " + this.stageType);
|
|
||||||
this.modalNotify("Stage type changed.");
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.modalError(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.getStageType();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getStageType: function() {
|
||||||
|
console.log("Getting stage type");
|
||||||
|
axios
|
||||||
|
.get(this.stageTypeUri)
|
||||||
|
.then(response => {
|
||||||
|
console.log("Stage type is " + response.data);
|
||||||
|
this.stageType = response.data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.modalError(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setStageType: function() {
|
||||||
|
console.log("Setting stage type");
|
||||||
|
axios
|
||||||
|
.put(this.stageTypeUri, this.stageType)
|
||||||
|
.then(response => {
|
||||||
|
this.stageType = response.data;
|
||||||
|
console.log("Stage type set to " + this.stageType);
|
||||||
|
this.modalNotify("Stage type changed.");
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.modalError(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less"></style>
|
<style lang="less"></style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue