Mercurial > gemma
changeset 5375:755ed195fdc3 extented-report
Fix for 5486:dbae10503ee6
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 24 Jun 2021 18:39:03 +0200 |
parents | 7b6a62d4117e |
children | e09e003948c7 |
files | client/src/components/importconfiguration/ScheduledImports.vue pkg/controllers/routes.go pkg/imports/report.go |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue Thu Jun 24 16:13:35 2021 +0200 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Thu Jun 24 18:39:03 2021 +0200 @@ -914,7 +914,7 @@ if (this.trys) data["trys"] = Number(this.trys); if (this.import_ === this.$options.IMPORTTYPES.REPORT) { - data["name"] = "default"; + data["name"] = "data-quality-report"; } data["send-email"] = this.eMailNotification; this.triggerActive = false;
--- a/pkg/controllers/routes.go Thu Jun 24 16:13:35 2021 +0200 +++ b/pkg/controllers/routes.go Thu Jun 24 18:39:03 2021 +0200 @@ -341,7 +341,7 @@ NoConn: true, })).Methods(http.MethodGet) - api.Handle("/data/report/{name:[a-zA-Z0-9_]+}", waterwayAdmin( + api.Handle("/data/report/{name:[a-zA-Z0-9_-]+}", waterwayAdmin( mw.DBConn(http.HandlerFunc(report)))).Methods(http.MethodGet) // Handler to serve data to the client.
--- a/pkg/imports/report.go Thu Jun 24 16:13:35 2021 +0200 +++ b/pkg/imports/report.go Thu Jun 24 18:39:03 2021 +0200 @@ -124,7 +124,7 @@ } // TODO: Prevent this earlier. - if match, _ := regexp.MatchString(`^[a-zA-Z0-9_]+$`, r.Name); !match { + if match, _ := regexp.MatchString(`^[a-zA-Z0-9_-]+$`, r.Name); !match { return nil, nil, errors.New("invalid report name") }