From 91c52ea318c8f4c3c978015fea03e69d7a28fdb2 Mon Sep 17 00:00:00 2001 From: Omkar Kesarkhane <127078473+omkarK06@users.noreply.github.com> Date: Mon, 17 Nov 2025 23:45:08 +0530 Subject: [PATCH] fix: Saved View preserves loadingHistogram State, leading to track total hits call on applying. (#9084) #9079 1. A view was saved while the histogram was being loaded, which incorrectly hardcoded the loadingHistogram flag as true in the saved view data. 2. When this saved view was later loaded, the true value of loadingHistogram was retrieved. 3. This pre-existing true state bypassed the histogram loading logic and resulted in an incorrect call to the get page count. --- web/src/plugins/logs/SearchBar.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/web/src/plugins/logs/SearchBar.vue b/web/src/plugins/logs/SearchBar.vue index 0939a57567..465e395a5a 100644 --- a/web/src/plugins/logs/SearchBar.vue +++ b/web/src/plugins/logs/SearchBar.vue @@ -3228,10 +3228,11 @@ export default defineComponent({ }); setTimeout(async () => { try { + searchObj.loadingHistogram = false; searchObj.loading = true; searchObj.meta.refreshHistogram = true; // TODO OK: Remove all the instances of communicationMethod and below assignment aswell - searchObj.communicationMethod = "streaming"; + searchObj.communicationMethod = "streaming"; await extractFields(); await getQueryData(); store.dispatch("setSavedViewFlag", false); @@ -3411,6 +3412,14 @@ export default defineComponent({ delete savedSearchObj.data.savedViews; delete savedSearchObj.data.transforms; + + // Turn off all loaders before saving view + savedSearchObj.loading = false; + savedSearchObj.loadingHistogram = false; + savedSearchObj.loadingCounter = false; + savedSearchObj.loadingStream = false; + savedSearchObj.loadingSavedView = false; + savedSearchObj.data.timezone = store.state.timezone; if (savedSearchObj.data.parsedQuery) {