diff --git a/ui/src/components/flows/Flows.vue b/ui/src/components/flows/Flows.vue index 2af7aea6df..645369fef1 100644 --- a/ui/src/components/flows/Flows.vue +++ b/ui/src/components/flows/Flows.vue @@ -67,13 +67,20 @@ @update:model-value="onDataTableValue('labels', $event)" /> + + + @@ -282,6 +289,7 @@ lastExecutionByFlowReady: false, dailyReady: false, file: undefined, + showChart: ["true", null].includes(localStorage.getItem(storageKeys.SHOW_FLOWS_CHART)) }; }, computed: { @@ -335,6 +343,14 @@ enabled: !element.disabled } }, + showStatChart() { + return this.daily && this.showChart; + }, + onShowChartChange(value) { + this.showChart = value; + localStorage.setItem(storageKeys.SHOW_FLOWS_CHART, value); + this.loadStats(); + }, exportFlows() { this.$toast().confirm( this.$t("flow export", {"flowCount": this.queryBulkAction ? this.total : this.selection.length}), @@ -492,10 +508,10 @@ return _merge(base, queryFilter) }, - loadData(callback) { + loadStats() { this.dailyReady = false; - if (this.user.hasAny(permission.EXECUTION)) { + if (this.user.hasAny(permission.EXECUTION) && this.showStatChart) { this.$store .dispatch("stat/daily", this.loadQuery({ startDate: this.$moment(this.startDate).add(-1, "day").startOf("day").toISOString(true), @@ -505,6 +521,9 @@ this.dailyReady = true; }); } + }, + loadData(callback) { + this.loadStats(); this.$store .dispatch("flow/findFlows", this.loadQuery({ diff --git a/ui/src/components/logs/LogsWrapper.vue b/ui/src/components/logs/LogsWrapper.vue index f8aab01fbd..fa2e21a136 100644 --- a/ui/src/components/logs/LogsWrapper.vue +++ b/ui/src/components/logs/LogsWrapper.vue @@ -29,6 +29,13 @@ @update:filter-value="onDataTableValue" /> + + + @@ -37,7 +44,7 @@ -