- Notifications
You must be signed in to change notification settings - Fork715
fix: dashboard refresh warning when no variables present#8191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix: dashboard refresh warning when no variables present#8191
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedAug 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
PR Reviewer Guide 🔍(Review updated until commitb9667ec)Here are some key observations to aid the review process:
|
github-actionsbot commentedAug 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
PR Code Suggestions ✨Latest suggestions up tob9667ec
Previous suggestionsSuggestions up to commitb9667ec
|
Persistent review updated to latest commitb9667ec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Greptile Summary
This PR fixes a UX issue in the dashboard interface where the refresh button would incorrectly display a warning state (orange color with warning message) when no variables are present on the dashboard. The problem occurred because of inconsistent initialization of two reactive objects used to track variable states.
The change is inViewDashboard.vue and addresses the root cause by ensuring bothvariablesData andrefreshedVariablesData reactive objects are properly initialized with identical empty states when a dashboard has no variables configured. Specifically, when no variables are present, both objects now get:
isVariablesLoadingset tofalsevaluesset to an empty array[]
This fix integrates with the existingisVariablesChanged computed property that performs deep equality comparison between these two objects to determine whether to show the warning state. Previously, onlyvariablesData was being initialized whilerefreshedVariablesData remained uninitialized (empty object{}), causing the comparison to always returntrue for "variables changed" even when no variables existed. The solution ensures consistent initialization, making the comparison accurate and eliminating false positive warnings.
The change fits well within the component's architecture, which already handles various dashboard states and uses these reactive objects throughout the variable management system.
Confidence score: 5/5
- This PR is safe to merge with minimal risk
- Score reflects a targeted bug fix with clear logic and no side effects
- No files require special attention
1 file reviewed, no comments
b9667ec to352bc06Compare4ce6a16 intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
PR Type
Bug fix
Description
Prevent refresh warning without dashboard variables
Reset refreshed variables state when none exist
Diagram Walkthrough
File Walkthrough
ViewDashboard.vue
Reset refreshed variables state when none existweb/src/views/Dashboards/ViewDashboard.vue
refreshedVariablesData.refreshedVariablesData.isVariablesLoadingto false.refreshedVariablesData.valuesarray.