Remove microscope settings
microscope name should be defined in config, by a separate program/service
This commit is contained in:
parent
27b1f42935
commit
4e7fa44a73
2 changed files with 0 additions and 115 deletions
|
|
@ -1,89 +0,0 @@
|
||||||
<template>
|
|
||||||
<div v-if="settings" id="microscopeSettings" class="uk-width-large">
|
|
||||||
<form @submit.prevent="applySettingsRequest">
|
|
||||||
<div>
|
|
||||||
<label class="uk-form-label" for="form-stacked-text"
|
|
||||||
>Microscope name</label
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
v-model="settings.name"
|
|
||||||
class="uk-input uk-width-1-1 uk-form-small"
|
|
||||||
name="inputFilename"
|
|
||||||
placeholder="Leave blank for default"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="uk-button uk-button-primary uk-margin-small uk-width-1-1"
|
|
||||||
>
|
|
||||||
Apply Settings
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import axios from "axios";
|
|
||||||
|
|
||||||
// Export main app
|
|
||||||
export default {
|
|
||||||
name: "MicroscopeSettings",
|
|
||||||
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
settings: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
settingsUri: function() {
|
|
||||||
return `${this.$store.getters.baseUri}/api/v2/instrument/settings`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.updateSettings();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
updateSettings: function() {
|
|
||||||
axios
|
|
||||||
.get(this.settingsUri)
|
|
||||||
.then(response => {
|
|
||||||
this.settings = response.data;
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.modalError(error); // Let mixin handle error
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
applySettingsRequest: function() {
|
|
||||||
var payload = {
|
|
||||||
name: this.settings.name
|
|
||||||
};
|
|
||||||
|
|
||||||
// Send request to update config
|
|
||||||
axios
|
|
||||||
.put(this.settingsUri, payload)
|
|
||||||
.then(() => {
|
|
||||||
// Update local settings
|
|
||||||
this.updateSettings();
|
|
||||||
this.modalNotify("Microscope settings applied.");
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.modalError(error); // Let mixin handle error
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
.center-spinner {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -70,19 +70,6 @@
|
||||||
Camera/stage mapping
|
Camera/stage mapping
|
||||||
</tabIcon>
|
</tabIcon>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<tabIcon
|
|
||||||
id="settings-microscope-icon"
|
|
||||||
tab-i-d="microscope"
|
|
||||||
:show-title="false"
|
|
||||||
:show-tooltip="false"
|
|
||||||
:require-connection="true"
|
|
||||||
:current-tab="currentTab"
|
|
||||||
@set-tab="setTab"
|
|
||||||
>
|
|
||||||
General
|
|
||||||
</tabIcon>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="view-component uk-width-expand uk-padding-small">
|
<div class="view-component uk-width-expand uk-padding-small">
|
||||||
|
|
@ -136,24 +123,12 @@
|
||||||
<CSMSettings />
|
<CSMSettings />
|
||||||
</div>
|
</div>
|
||||||
</tabContent>
|
</tabContent>
|
||||||
|
|
||||||
<tabContent
|
|
||||||
tab-i-d="microscope"
|
|
||||||
:require-connection="true"
|
|
||||||
:current-tab="currentTab"
|
|
||||||
>
|
|
||||||
<div class="settings-pane uk-padding-small">
|
|
||||||
<h3>Microscope settings</h3>
|
|
||||||
<microscopeSettings />
|
|
||||||
</div>
|
|
||||||
</tabContent>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import streamSettings from "./settingsComponents/streamSettings.vue";
|
import streamSettings from "./settingsComponents/streamSettings.vue";
|
||||||
import microscopeSettings from "./settingsComponents/microscopeSettings.vue";
|
|
||||||
import cameraSettings from "./settingsComponents/cameraSettings.vue";
|
import cameraSettings from "./settingsComponents/cameraSettings.vue";
|
||||||
import appSettings from "./settingsComponents/appSettings.vue";
|
import appSettings from "./settingsComponents/appSettings.vue";
|
||||||
import featuresSettings from "./settingsComponents/featuresSettings.vue";
|
import featuresSettings from "./settingsComponents/featuresSettings.vue";
|
||||||
|
|
@ -171,7 +146,6 @@ export default {
|
||||||
streamSettings,
|
streamSettings,
|
||||||
cameraSettings,
|
cameraSettings,
|
||||||
stageSettings,
|
stageSettings,
|
||||||
microscopeSettings,
|
|
||||||
CSMSettings,
|
CSMSettings,
|
||||||
appSettings,
|
appSettings,
|
||||||
featuresSettings,
|
featuresSettings,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue