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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
This commit is contained in:
ktx-vaidehi
2025-08-29 15:02:16 +05:30
committed by GitHub
parent 5d05004e69
commit 4ce6a16dbd
@@ -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