Mercurial > gemma
changeset 5367:1695e17c5a83 extented-report
Adds schedualbility for reports as an import.
In order to enable the sysadmin to schedule the automatic reports on dataquality
there is now a new import type established. This import allows to edit the
schedule for issuing the report.
Besides: The layout for the usermanagement is now x-scrollable when overflown.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 23 Jun 2021 14:46:14 +0200 |
parents | cb46f50ba168 |
children | a3ec478882ef |
files | client/src/components/App.vue client/src/components/importconfiguration/ImportDetails.vue client/src/components/importconfiguration/ScheduledImports.vue client/src/components/usermanagement/Userdetail.vue client/src/components/usermanagement/Usermanagement.vue client/src/store/importschedule.js |
diffstat | 6 files changed, 29 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/App.vue Wed Jun 23 12:10:25 2021 +0200 +++ b/client/src/components/App.vue Wed Jun 23 14:46:14 2021 +0200 @@ -1,5 +1,5 @@ <template> - <div id="app" class="main"> + <div id="app" class="main" style="overflow-x:scroll"> <div v-if="isAuthenticated" class="d-flex flex-column userinterface"> <div class="boxes d-flex p-2"> <div class="mr-auto d-flex">
--- a/client/src/components/importconfiguration/ImportDetails.vue Wed Jun 23 12:10:25 2021 +0200 +++ b/client/src/components/importconfiguration/ImportDetails.vue Wed Jun 23 14:46:14 2021 +0200 @@ -53,6 +53,11 @@ <translate>Fairwaymarks</translate> </option> </optgroup> + <optgroup :label="reportslabel" v-if="isSysAdmin"> + <option :value="$options.IMPORTTYPES.REPORT"> + <translate>Data Quality Report</translate> + </option> + </optgroup> </select> </div> <ApprovedGaugeMeasurement @@ -98,7 +103,7 @@ * Tom Gottfried <tom.gottfried@intevation.de> */ import { IMPORTTYPES } from "@/store/importschedule"; -import { mapState } from "vuex"; +import { mapState, mapGetters } from "vuex"; export default { components: { ApprovedGaugeMeasurement: () => import("./types/ApprovedGaugeMeasurement"), @@ -111,6 +116,7 @@ }, computed: { ...mapState("importschedule", ["currentSchedule"]), + ...mapGetters("user", ["isSysAdmin"]), isOnetime() { for (let kind of [ this.$options.IMPORTTYPES.SOUNDINGRESULTS, @@ -129,6 +135,9 @@ this.$store.commit("importschedule/setImportType", value); } }, + reportslabel() { + return this.$gettext("Reports"); + }, onetimeLabel() { return this.$gettext("Onetime Imports"); },
--- a/client/src/components/importconfiguration/ScheduledImports.vue Wed Jun 23 12:10:25 2021 +0200 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Wed Jun 23 14:46:14 2021 +0200 @@ -912,6 +912,10 @@ } if (this.waitRetry) data["wait-retry"] = this.waitRetry; if (this.trys) data["trys"] = Number(this.trys); + + if (this.import_ === this.$options.IMPORTTYPES.REPORT) { + data["name"] = "default"; + } data["send-email"] = this.eMailNotification; this.triggerActive = false; const type = @@ -1003,6 +1007,9 @@ } if (this.waitRetry) config["wait-retry"] = this.waitRetry; if (this.trys) config["trys"] = Number(this.trys); + if (this.import_ === this.$options.IMPORTTYPES.REPORT) { + config["name"] = "default"; + } config["send-email"] = this.eMailNotification; if (!this.id) { data["config"] = config;
--- a/client/src/components/usermanagement/Userdetail.vue Wed Jun 23 12:10:25 2021 +0200 +++ b/client/src/components/usermanagement/Userdetail.vue Wed Jun 23 14:46:14 2021 +0200 @@ -157,8 +157,10 @@ } .userdetails { + min-width: 400px; max-height: 693px; margin-right: $offset; + overflow-y: auto; } form {
--- a/client/src/components/usermanagement/Usermanagement.vue Wed Jun 23 12:10:25 2021 +0200 +++ b/client/src/components/usermanagement/Usermanagement.vue Wed Jun 23 14:46:14 2021 +0200 @@ -9,7 +9,7 @@ :columns="[ { id: 'role', title: `${roleForColumLabel}`, class: 'col-1' }, { id: 'user', title: `${usernameLabel}`, class: 'col-4' }, - { id: 'country', title: `${countryLabel}`, class: 'col-2' }, + { id: 'country', title: `${countryLabel}`, class: 'col-1' }, { id: 'email', title: `${emailLabel}`, class: 'col-3' }, { id: 'reportreceiver', title: `${reportsLabel}`, class: 'col-1' } ]" @@ -34,7 +34,7 @@ {{ user.user }} </div> <div - class="table-cell center col-2" + class="table-cell center col-1" @click="selectUser(user.user)" > {{ user.country }} @@ -229,7 +229,7 @@ } ) .then(() => { - if (this.currentUser.user === user.user) { + if (this.currentUser && this.currentUser.user === user.user) { this.reportToggled = !this.reportToggled; } })
--- a/client/src/store/importschedule.js Wed Jun 23 12:10:25 2021 +0200 +++ b/client/src/store/importschedule.js Wed Jun 23 14:46:14 2021 +0200 @@ -31,7 +31,8 @@ SOUNDINGRESULTS: "soundingresults", APPROVEDGAUGEMEASUREMENTS: "approvedgaugemeasurements", WATERWAYPROFILES: "waterwayprofiles", - FAIRWAYMARKS: "fairwaymarks" + FAIRWAYMARKS: "fairwaymarks", + REPORT: "report" }; const KINDIMPORTTYPE = { @@ -44,7 +45,8 @@ fd: "fairwaydimension", wg: "waterwaygauges", dmv: "distancemarksvirtual", - dma: "distancemarksashore" + dma: "distancemarksashore", + report: "report" }; const IMPORTTYPEKIND = { @@ -57,7 +59,8 @@ fairwaydimension: "fd", waterwaygauges: "wg", distancemarksvirtual: "dmv", - distancemarksashore: "dma" + distancemarksashore: "dma", + report: "report" }; const FAIRWAYMARKKINDS = {