@@ -421,6 +429,8 @@ export default {
data () {
return {
processing: false,
+ processingSave: false,
+
showReport: true,
report: undefined,
@@ -807,9 +817,8 @@ export default {
this.datasources.showConfigurator = true
},
- saveDatasources (hideEvent) {
+ saveDatasources () {
// Prevent closing of modal and manually close it when request is complete
- hideEvent.preventDefault()
this.datasources.processing = true
const sources = this.datasources.tempItems
@@ -822,7 +831,7 @@ export default {
report.scenarios = this.report.scenarios
this.report = new system.Report(report)
this.refreshReport()
- this.datasources.showConfigurator = false
+ this.hideDatasourceConfigurator()
this.toastSuccess(this.$t('notification:report.datasources.updated'))
}).catch(this.toastErrorHandler(this.$t('notification:report.datasources.updateFailed')))
.finally(() => {
@@ -832,6 +841,8 @@ export default {
// Blocks
handleReportSave () {
+ this.processingSave = true
+
this.report.blocks = this.reportBlocks.map(({ moved, x, y, w, h, i, ...p }) => {
return { ...p, key: `${i}`, xywh: [x, y, w, h] }
})
@@ -842,6 +853,9 @@ export default {
this.refreshReport()
this.unsavedBlocks.clear()
})
+ .finally(() => {
+ this.processingSave = false
+ })
},
mapBlocks () {
diff --git a/client/web/reporter/src/views/Report/Edit.vue b/client/web/reporter/src/views/Report/Edit.vue
index f7a3303c88..a3e8065a31 100644
--- a/client/web/reporter/src/views/Report/Edit.vue
+++ b/client/web/reporter/src/views/Report/Edit.vue
@@ -168,6 +168,7 @@
:delete-disabled="!canDelete"
:save-disabled="!canSave"
:processing="processing"
+ :processing-save="processingSave"
@delete="handleDelete"
@save="handleSave"
/>
diff --git a/client/web/workflow/src/components/WorkflowEditor.vue b/client/web/workflow/src/components/WorkflowEditor.vue
index e97e670553..e3354392ac 100644
--- a/client/web/workflow/src/components/WorkflowEditor.vue
+++ b/client/web/workflow/src/components/WorkflowEditor.vue
@@ -196,26 +196,18 @@
class="d-flex flex-column flex-shrink position-absolute fixed-bottom m-2"
style="z-index: 1; width: 20vw;"
>
-
-
- Saving
-
-
- {{ $t('editor:detected-changes') + `${canUpdateWorkflow ? this.$t('editor:click-to-save') : ''}` }}
-
-
+ @submit="saveWorkflow()"
+ />
-
- {{ $t('editor:save') }}
-
+ :processing="processingSave"
+ :text="$t('editor:save')"
+ class="ml-auto"
+ @submit="saveWorkflow()"
+ />
diff --git a/client/web/workflow/src/components/index.js b/client/web/workflow/src/components/index.js
index 91b1e9c692..a1f0ec19e4 100644
--- a/client/web/workflow/src/components/index.js
+++ b/client/web/workflow/src/components/index.js
@@ -9,3 +9,4 @@ Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.component('font-awesome-layers', FontAwesomeLayers)
Vue.component('c-permissions-button', components.CPermissionsButton)
Vue.component('c-input-confirm', components.CInputConfirm)
+Vue.component('c-button-submit', components.CButtonSubmit)
diff --git a/lib/vue/src/components/index.ts b/lib/vue/src/components/index.ts
index 55f757687d..6e5f3c2f82 100644
--- a/lib/vue/src/components/index.ts
+++ b/lib/vue/src/components/index.ts
@@ -19,6 +19,7 @@ export {
CInputCheckbox,
CInputColorPicker,
CAceEditor,
+ CButtonSubmit,
} from './input'
export {
diff --git a/lib/vue/src/components/input/button/CButtonSubmit.vue b/lib/vue/src/components/input/button/CButtonSubmit.vue
new file mode 100644
index 0000000000..b278cda8f2
--- /dev/null
+++ b/lib/vue/src/components/input/button/CButtonSubmit.vue
@@ -0,0 +1,115 @@
+