Mercurial > gemma
changeset 2749:cd789302b3e2
import_overview: start is initially always beginning of current hour
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 21 Mar 2019 11:54:17 +0100 |
parents | c6695d6e9334 |
children | 6446bf6d2a89 |
files | client/src/components/importoverview/ImportOverview.vue client/src/store/imports.js |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue Thu Mar 21 11:34:48 2019 +0100 +++ b/client/src/components/importoverview/ImportOverview.vue Thu Mar 21 11:54:17 2019 +0100 @@ -150,7 +150,7 @@ data() { return { loading: false, - startDate: subHours(new Date(), 1), + startDate: startOfHour(new Date()), endDate: new Date(), selectedInterval: this.$options.LAST_HOUR, laterPossible: false @@ -240,11 +240,7 @@ this.loadLogs(); }, filteredImports() { - return this.imports.filter(i => { - return (i.kind + i.id) - .toLowerCase() - .includes(this.searchQuery.toLowerCase()); - }); + return this.imports; }, loadLogs() { this.loading = true; @@ -252,7 +248,8 @@ .dispatch("imports/getImports", { filter: this.filters, from: format(this.startDate, "YYYY-MM-DDTHH:mm:ss.SSS"), - to: format(this.endDate, "YYYY-MM-DDTHH:mm:ss.SSS") + to: format(this.endDate, "YYYY-MM-DDTHH:mm:ss.SSS"), + query: this.searchQuery }) .then(() => { this.loading = false;
--- a/client/src/store/imports.js Thu Mar 21 11:34:48 2019 +0100 +++ b/client/src/store/imports.js Thu Mar 21 11:54:17 2019 +0100 @@ -216,7 +216,7 @@ }); }, getImports({ commit }, options) { - let { filter, from, to } = options; + let { filter, from, to, query } = options; let queryParams = ""; const hasWarning = filter.includes("warning"); filter = filter.filter(x => x != "warning"); @@ -225,14 +225,17 @@ if (hasWarning) queryParams += "&warnings=true"; queryParams += "&from=" + from; queryParams += "&to=" + to; + queryParams += "&query=" + query; } else { if (hasWarning) { queryParams += "?warnings=true"; queryParams += "&from=" + from; queryParams += "&to=" + to; + queryParams += "&query=" + query; } else { queryParams += "?from=" + from; queryParams += "&to=" + to; + queryParams += "&query=" + query; } } return new Promise((resolve, reject) => {