From 4ce6a16dbdde888d5fcbd109260a86c8a08e4e3d Mon Sep 17 00:00:00 2001 From: ktx-vaidehi <134508096+ktx-vaidehi@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:02:16 +0530 Subject: [PATCH] fix: dashboard refresh warning when no variables present (#8191) ### **PR Type** Bug fix ___ ### **Description** - Prevent refresh warning without dashboard variables - Reset refreshed variables state when none exist ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Dashboard load"] -- "No variables present" --> B["Set variablesData to idle"] A -- "No variables present" --> C["Set refreshedVariablesData to idle"] B -- "Prevents spurious warnings" --> D["Clean UX"] C -- "Avoid stale refreshed state" --> D ```

File Walkthrough

Relevant files
Bug fix
ViewDashboard.vue
Reset refreshed variables state when none exist                   

web/src/views/Dashboards/ViewDashboard.vue
  • When no variables exist, also reset refreshedVariablesData.
  • Set refreshedVariablesData.isVariablesLoading to false.
  • Clear refreshedVariablesData.values array.
+2/-0     
___ --- web/src/views/Dashboards/ViewDashboard.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/views/Dashboards/ViewDashboard.vue b/web/src/views/Dashboards/ViewDashboard.vue index 1f5568152d..08bbefc0c2 100644 --- a/web/src/views/Dashboards/ViewDashboard.vue +++ b/web/src/views/Dashboards/ViewDashboard.vue @@ -686,6 +686,8 @@ export default defineComponent({ ) { variablesData.isVariablesLoading = false; variablesData.values = []; + refreshedVariablesData.isVariablesLoading = false; + refreshedVariablesData.values = []; } // check if route has time related query params