Mercurial > gemma
changeset 3001:23f4fb9a205a
imports: moved email notification
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 10 Apr 2019 17:36:41 +0200 |
parents | 85d1f3e94945 |
children | 46ab2cb39471 |
files | client/src/components/importconfiguration/ScheduledImports.vue |
diffstat | 1 files changed, 49 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue Wed Apr 10 17:22:03 2019 +0200 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Wed Apr 10 17:36:41 2019 +0200 @@ -1,26 +1,48 @@ <template> <form @submit.prevent="save" class="w-100"> - <div v-if="directImportAvailable" class="flex-column"> - <div class="flex-row text-left"> - <small class="text-muted"> - <translate>Import via</translate> - </small> + <div class="d-flex flex-row"> + <div :key="1" class="flex-column mr-4"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>Email Notification</translate> + </small> + </div> + <div class="flex-flex-row text-left"> + <toggle-button + v-model="eMailNotification" + class="mt-2" + :speed="100" + :labels="{ + checked: this.$options.on, + unchecked: this.$options.off + }" + :width="60" + :height="30" + /> + </div> </div> - <div class="flex-flex-row text-left"> - <!-- '#75c791' is the DEFAULT_COLOR_CHECKED + <div :key="2" v-if="directImportAvailable" class="flex-column text-left"> + <div> + <small class="text-muted"> + <translate>Import via</translate> + </small> + </div> + <div> + <!-- '#75c791' is the DEFAULT_COLOR_CHECKED from vue-js-toggle-button as here both states are active --> - <toggle-button - :color="{ unchecked: '#75c791' }" - v-model="directImport" - class="mt-2" - :speed="100" - :labels="{ - checked: this.$options.FILE, - unchecked: this.$options.URL - }" - :width="60" - :height="30" - /> + <toggle-button + :color="{ unchecked: '#75c791' }" + v-model="directImport" + class="mt-2" + :speed="100" + :labels="{ + checked: this.$options.FILE, + unchecked: this.$options.URL + }" + :width="60" + :height="30" + /> + </div> </div> </div> <Availablefairwaydepth @@ -109,26 +131,6 @@ /> <div class="d-flex flex-row mt-3"> - <div class="flex-column mr-4"> - <div class="flex-row text-left"> - <small class="text-muted"> - <translate>Email Notification</translate> - </small> - </div> - <div class="flex-flex-row text-left"> - <toggle-button - v-model="eMailNotification" - class="mt-2" - :speed="100" - :labels="{ - checked: this.$options.on, - unchecked: this.$options.off - }" - :width="60" - :height="30" - /> - </div> - </div> <template v-if="!directImport || !directImportAvailable"> <div class="flex-column mr-4"> <div class="flex-row text-left"> @@ -171,7 +173,7 @@ /> </div> </div> - <div class="ml-2 flex-column mr-2"> + <div class="ml-auto flex-column"> <div class="flex-row text-left"> <small class="text-muted"> <translate>Tries</translate> @@ -179,15 +181,14 @@ </div> <div> <input - style="width:100px;" - :disabled="!scheduled" + style="width:120px;" v-model="trys" - class="ml-1 mr-1 form-control" + class="mr-1 form-control" type="number" /> </div> </div> - <div class="flex-column mr-2"> + <div class="flex-column"> <div class="flex-row text-left"> <small class="text-muted"> <translate>Wait to retry</translate> @@ -195,11 +196,9 @@ </div> <div> <input - style="width:100px;" - :disabled="!scheduled" + style="width:120px;" v-model="waitRetry" - class="ml-1 mr-1 form-control" - type="number" + class="ml-1 form-control" /> </div> </div> @@ -869,9 +868,9 @@ } if (this.scheduled) { config["cron"] = cron; - if (this.waitRetry) config["wait-retry"] = Number(this.waitRetry); - if (this.trys) config["trys"] = Number(this.trys); } + if (this.waitRetry) config["wait-retry"] = this.waitRetry; + if (this.trys) config["trys"] = Number(this.trys); config["send-email"] = this.eMailNotification; if (!this.id) { data["config"] = config;