mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
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
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>ViewDashboard.vue</strong><dd><code>Reset refreshed
variables state when none exist</code>
</dd></summary>
<hr>
web/src/views/Dashboards/ViewDashboard.vue
<ul><li>When no variables exist, also reset
<code>refreshedVariablesData</code>.<br> <li> Set
<code>refreshedVariablesData.isVariablesLoading</code> to false.<br>
<li> Clear <code>refreshedVariablesData.values</code> array.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8191/files#diff-052badb6758aff09ceaf1645869b9ba96125e6a0ea21abb01a8ee0a40d6467f3">+2/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user