Compare commits

..

No commits in common. '402f50157a0d814ffe5f1d5c86d1bed14930a658' and '6a378268223e8ac5cd46997ae8a2e8480d04ef62' have entirely different histories.

@ -87,7 +87,7 @@
<v-btn color="warning" :disabled="index == 0" @click="moveProcessingCMD(index, true)" icon>
<v-icon>mdi-arrow-up</v-icon>
</v-btn>
<v-btn color="warning" :disabled="index == configData.handling.processing.length - 1" @click="moveProcessingCMD(index, false)" icon>
<v-btn color="warning" :disabled="index == configData.handling.processing.length" @click="moveProcessingCMD(index, false)" icon>
<v-icon>mdi-arrow-down</v-icon>
</v-btn>
</v-col>
@ -157,6 +157,7 @@
new Vue({
el: '#app',
vuetify: new Vuetify(),
http: { root: '/' },
data() {
return {
configTab: null,
@ -186,12 +187,10 @@
}
},
credentialsData: {},
basePath: '',
}
},
created() {
this.basePath = window.location.pathname.replace(/\/$/, '');
this.loadConfig();
this.loadConfig()
},
methods: {
moveProcessingCMD(index, down) {
@ -200,7 +199,7 @@
this.configData.handling.processing.splice(index + (down ? -1 : 1), 0, entry)
},
loadConfig() {
this.$http.get(`${this.basePath}/config`).then(response => {
this.$http.get('/config').then(response => {
const newConfig = response.body
newConfig.handling.processing = newConfig.handling.processing.map((x) => {
x._id = btoa(JSON.stringify(x))
@ -209,8 +208,9 @@
this.configData = newConfig
}, response => {
})
this.$http.get(`${this.basePath}/credentials`).then(response => {
this.$http.get('/credentials').then(response => {
this.credentialsData = response.body
}, response => {
})
},
storeConfig() {
@ -224,18 +224,18 @@
if (!!x[n] && x[n].length > 0) y[n] = x[n]
return y
})
this.$http.post(`${this.basePath}/config`, storeConfig).then(response => {
this.$http.post('/config', storeConfig).then(response => {
})
.then(() => this.$http.post(`${this.basePath}/restart`))
.then(this.$http.post('/restart'))
.then(() => {
document.body.style = 'display:none'
setTimeout(() => window.location.reload(), 1e3)
})
},
storeCredentials() {
this.$http.post(`${this.basePath}/credentials`, this.credentialsData).then(response => {
this.$http.post('/credentials', this.credentialsData).then(response => {
})
.then(() => this.$http.post(`${this.basePath}/restart`))
.then(this.$http.post('/restart'))
.then(() => {
document.body.style = 'display:none'
setTimeout(() => window.location.reload(), 1e3)
@ -258,4 +258,4 @@
</script>
</body>
</html>
</html>
Loading…
Cancel
Save