Repository: kestra-io/kestra
Issue: 7 days interval by default leads to auto reload not fetching latest data
Labels: bug
frontend

### Explain the bug

On auto-reload I think we should reset the 7 day interval to fetch live data

### Environment Information

- Kestra Version:
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/executions/Executions.vue b/ui/src/components/executions/Executions.vue
index c810771cfb..6cb6dc08ca 100644
--- a/ui/src/components/executions/Executions.vue
+++ b/ui/src/components/executions/Executions.vue
@@ -33,7 +33,7 @@
                     />
                 </el-form-item>
                 <el-form-item>
-                    <refresh-button class="float-right" @refresh="load" />
+                    <refresh-button class="float-right" @refresh="refresh" />
                 </el-form-item>
             </template>
 
@@ -269,7 +269,8 @@
                 isDefaultNamespaceAllow: true,
                 dailyReady: false,
                 dblClickRouteName: "executions/update",
-                flowTriggerDetails: undefined
+                flowTriggerDetails: undefined,
+                recomputeInterval: false
             };
         },
         computed: {
@@ -283,9 +284,13 @@
                 };
             },
             endDate() {
+                // used to be able to force refresh the base interval when auto-reloading
+                this.recomputeInterval;
                 return this.$route.query.endDate ? this.$route.query.endDate : this.$moment().toISOString(true);
             },
             startDate() {
+                // used to be able to force refresh the base interval when auto-reloading
+                this.recomputeInterval;
                 return this.$route.query.startDate ? this.$route.query.startDate : this.$moment(this.endDate)
                     .add(-30, "days").toISOString(true);
             },
@@ -306,6 +311,10 @@
             }
         },
         methods: {
+            refresh() {
+                this.recomputeInterval = !this.recomputeInterval;
+                this.load();
+            },
             selectionMapper(execution) {
                 return execution.id
             },
diff --git a/ui/src/components/logs/LogsWrapper.vue b/ui/src/components/logs/LogsWrapper.vue
index 186b6939c0..81dc5c72d7 100644
--- a/ui/src/components/logs/LogsWrapper.vue
+++ b/ui/src/components/logs/LogsWrapper.vue
@@ -28,7 +28,7 @@
                         />
                     </el-form-item>
                     <el-form-item>
-                        <refresh-button class="float-right" @refresh="load" />
+                        <refresh-button class="float-right" @refresh="refresh" />
                     </el-form-item>
                 </template>
 
@@ -87,7 +87,8 @@
             return {
                 isDefaultNamespaceAllow: true,
                 task: undefined,
-                isLoading: false
+                isLoading: false,
+                recomputeInterval: false
             };
         },
         computed: {
@@ -104,14 +105,22 @@
                 return this.logLevel || this.$route.query.level || localStorage.getItem("defaultLogLevel") || "INFO";
             },
             endDate() {
+                // used to be able to force refresh the base interval when auto-reloading
+                this.recomputeInterval;
                 return this.$route.query.endDate ? this.$route.query.endDate : this.$moment().toISOString(true);
             },
             startDate() {
+                // used to be able to force refresh the base interval when auto-reloading
+                this.recomputeInterval;
                 return this.$route.query.startDate ? this.$route.query.startDate : this.$moment(this.endDate)
                     .add(-7, "days").toISOString(true);
             }
         },
         methods: {
+            refresh() {
+                this.recomputeInterval = !this.recomputeInterval;
+                this.load();
+            },
             loadQuery(base) {
                 let queryFilter = this.queryWithFilter();
 


Test patch: