Mercurial > gemma
diff client/src/components/importconfiguration/ScheduledImports.vue @ 5396:064ac1014713 extented-report
Make DQL-Downloads a bit more dynamic
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 02 Jul 2021 17:14:04 +0200 |
parents | 661e8a2deed9 |
children | 1faca2dd45d2 |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue Fri Jul 02 14:16:02 2021 +0200 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Fri Jul 02 17:14:04 2021 +0200 @@ -80,6 +80,12 @@ :featureType="featureType" :sortBy="sortBy" /> + <DQLReport + v-if="import_ == $options.IMPORTTYPES.REPORT" + @reportNameChanged="setReportName" + :reportName="reportName" + :availableReports="availableReports" + /> <Faiwaydimensions v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION" @urlChanged="setUrl" @@ -503,6 +509,7 @@ Bottleneck: () => import("./types/Bottleneck"), Distancemarksvirtual: () => import("./types/Distancemarksvirtual"), Distancemarksashore: () => import("./types/Distancemarksashore"), + DQLReport: () => import("./types/DQLReport"), Faiwaydimensions: () => import("./types/Fairwaydimensions"), Fairwaymarks: () => import("./types/Fairwaymarks"), Gaugemeasurement: () => import("./types/Gaugemeasurement"), @@ -563,6 +570,7 @@ }, computed: { ...mapState("importschedule", [ + "availableReports", "importScheduleDetailVisible", "currentSchedule" ]), @@ -699,6 +707,9 @@ this.uploadLabel = files[0].name; this.uploadFile = files[0]; }, + setReportName(value) { + this.reportName = value; + }, setStatsUpdate(value) { this.statsUpdate = value; }, @@ -793,6 +804,7 @@ this.waitRetry = this.currentSchedule.waitRetry; this.selectedMark = this.currentSchedule.selectedMark; this.statsUpdate = this.currentSchedule.statsUpdate; + this.reportName = this.currentSchedule.reportName; this.retry = this.currentSchedule.trys === null || this.currentSchedule.trys === undefined || @@ -922,14 +934,14 @@ } 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"] = "data-quality-report"; - } if (this.import_ === this.$options.IMPORTTYPES.STATSUPDATE) { if (!this.statsUpdate) return; data["name"] = this.statsUpdate; } + if (this.import_ === this.$options.IMPORTTYPES.REPORT) { + if (!this.reportName) return; + data["name"] = this.reportName; + } data["send-email"] = this.eMailNotification; this.triggerActive = false; const type = @@ -1022,7 +1034,8 @@ 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"] = "data-quality-report"; + if (!this.reportName) return; + config["name"] = this.reportName; } if (this.import_ === this.$options.IMPORTTYPES.STATSUPDATE) { if (!this.statsUpdate) return;