diff --git a/src/components/panelLeft.vue b/src/components/panelLeft.vue index 7549ff81..8dd9f8c1 100644 --- a/src/components/panelLeft.vue +++ b/src/components/panelLeft.vue @@ -50,15 +50,15 @@ :requireConnection="plugin.requiresConnection" :currentTab="currentTab"> -
- + +
diff --git a/src/components/pluginComponents/formComponents/JsonForm.vue b/src/components/pluginComponents/formComponents/JsonForm.vue index 1cedc1b4..20b3e085 100644 --- a/src/components/pluginComponents/formComponents/JsonForm.vue +++ b/src/components/pluginComponents/formComponents/JsonForm.vue @@ -1,8 +1,12 @@ @@ -95,10 +100,13 @@ export default { created() { this.initialiseFormData() + + if (this.selfUpdate) { + this.getFormData() + } }, methods: { - initialiseFormData() { /* This function initialises the form data. @@ -154,8 +162,12 @@ export default { // Send a quick request axios.post(this.submitApiUri, params) .then(response => { + // Do something with the response console.log(response) - // TODO: Have this perform a GET request to update all available parameters + // Update the form data if we're self-updating + if (this.selfUpdate) { + this.getFormData() + } }) .catch(error => { this.modalError(error) // Let mixin handle error @@ -171,7 +183,7 @@ export default { return this.$store.dispatch('pollTask', [response.data.id, null, null]) }) .then(response => { - console.log("Successfully finished task with response:") + // Do something with the response console.log(response) }) .catch(error => { @@ -180,6 +192,10 @@ export default { .finally(() => { console.log("Cleaning up after task.") this.taskRunning = false + // Update the form data if we're self-updating + if (this.selfUpdate) { + this.getFormData() + } }) },