Mercurial > gemma
diff client/src/components/importoverview/ImportOverview.vue @ 2789:c1e832f77726
import_overview: setting a sane default window in case of reload
When the overview is initially opened the default window is
start: begin of current hour
end: end of current hour
depending on interval size the window is widened to e.g. begin and
end of day.
When a reload is triggered, the reload puts "now" within the selected
window
when the window was 'hour' it uses
start: begin of current hour
end: end of current hour
which should behave consistent.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 25 Mar 2019 11:03:23 +0100 |
parents | 9a7d4caa1b77 |
children | 718ec88fbeed |
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue Mon Mar 25 10:38:37 2019 +0100 +++ b/client/src/components/importoverview/ImportOverview.vue Mon Mar 25 11:03:23 2019 +0100 @@ -4,7 +4,7 @@ icon="clipboard-check" :title="importReviewLabel" :closeCallback="$parent.close" - :actions="[{ callback: loadLogs, icon: 'redo' }]" + :actions="[{ callback: loadUpdatedLogs, icon: 'redo' }]" /> <div class="position-relative"> <transition name="fade"> @@ -234,6 +234,12 @@ filteredImports() { return this.imports; }, + loadUpdatedLogs() { + const [start, end] = this.determineInterval(new Date()); + this.$store.commit("imports/setStartDate", start); + this.$store.commit("imports/setEndDate", end); + this.loadLogs(); + }, loadLogs() { this.loading = true; this.$store