mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-25 02:14:38 -05:00
fix(ui): recomputing fetch interval before reloading to handle base interval case and have a live data reload
closes #2207
This commit is contained in:
committed by
brian-mulier-p
parent
3dcd480218
commit
44a8da8a41
@@ -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
|
||||
},
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user