From 610f26acc6cb32a04ef147058f6509b35e8408d3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 22 Jul 2020 15:30:56 +0000 Subject: [PATCH] --- .../src/views/ops-notification-settings.vue | 149 ++++++------------ 1 file changed, 44 insertions(+), 105 deletions(-) diff --git a/ayanova/src/views/ops-notification-settings.vue b/ayanova/src/views/ops-notification-settings.vue index 5a1f8ca0..38c5eba0 100644 --- a/ayanova/src/views/ops-notification-settings.vue +++ b/ayanova/src/views/ops-notification-settings.vue @@ -4,95 +4,42 @@ - - - - - - - - - - - - - - - - - - - {{ $ay.t("BackupFiles") }} - - fa-sync - - - - - -
- ({{ $ay.t("AvailableSpace") }} {{ backupAvailableSpace }}) -
-
-
+ + + + + {{ $ay.t("TestSMTPSettings") }} + + + + + + + + + + + + + {{ + $ay.t("Cancel") + }} + {{ $ay.t("OK") }} + + +
@@ -117,7 +64,6 @@ export default { vm.formState.ready = true; window.$gz.eventBus.$on("menu-click", clickHandler); await vm.getDataFromApi(); - vm.getBackupStatus(); } catch (err) { vm.formState.ready = true; window.$gz.errorHandler.handleFormError(err, vm); @@ -173,9 +119,9 @@ namespace AyaNova.Models */ return { + testAddress: null, + testDialog: false, formCustomTemplateKey: null, - backupFileList: [], - backupAvailableSpace: null, obj: { id: 1, concurrency: 0, @@ -235,7 +181,7 @@ namespace AyaNova.Models if (!this.formState.loading && !this.formState.readOnly) { window.$gz.form.fieldValueChanged(this, ref); } - }, + }, async getDataFromApi() { let vm = this; vm.formState.loading = true; @@ -300,7 +246,7 @@ namespace AyaNova.Models async testConfiguration() { let vm = this; vm.formState.loading = true; - let url = "global-ops-notification-setting/test"; + let url = `global-ops-notification-setting/test-smtp-settings/${vm.testAddress}`; window.$gz.form.deleteAllErrorBoxErrors(vm); try { let res = await window.$gz.api.upsert(url, {}); @@ -330,15 +276,8 @@ async function clickHandler(menuItem) { case "save": m.vm.submit(); break; - case "backupnow": - if ( - (await window.$gz.dialog.confirmGeneric( - "AreYouSureBackupNow", - "warning" - )) === true - ) { - m.vm.backupNow(); - } + case "test": + m.vm.testDialog = true; break; default: window.$gz.eventBus.$emit( @@ -375,10 +314,10 @@ function generateMenu(vm) { }); menuOptions.menuItems.push({ - title: "BackupNow", - icon: "fa-file-archive", + title: "TestSMTPSettings", + icon: "fa-vial", surface: false, - key: FORM_KEY + ":backupnow", + key: FORM_KEY + ":test", vm: vm }); }