Files
openobserve/web/src
ktx-vaidehiandKirtan Thakkar 935dfbad61 fix: dashboard conflict issue (#7558)
### **PR Type**
Bug fix, Enhancement


___

### **Description**
- Validate dashboard JSON before import

- Handle duplicate panel IDs in retrieval

- Refine GridStack layout update logic

- Improve error and import messages


___

### **Changes diagram**

```mermaid
flowchart LR
  node1["getDashboard called"]
  node2["fixDuplicatePanelIds"]
  node3["duplicates?"]
  node4["updateDashboard & re-fetch"]
  node5["return dashboard"]
  node1 --> node2
  node2 --> node3
  node3 -- "true" --> node4
  node3 -- "false" --> node5
  node4 --> node5
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Error
handling</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>ImportDashboard.vue</strong><dd><code>Add dashboard
JSON validation before import</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/views/Dashboards/ImportDashboard.vue

<li>Imported <code>validateDashboardJson</code> utility<br> <li> Added
schema validation before each import step<br> <li> Extended error
<code><span></code> for <code>dashboard_validation</code><br> <li>
Reformatted promise and notification code


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7558/files#diff-660ac197e10735b4f08fc4b5a39744187d16c14156ced00eefde09dbaec323f0">+85/-25</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>RenderDashboardCharts.vue</strong><dd><code>Improve
GridStack layout update logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/views/Dashboards/RenderDashboardCharts.vue

<li>Included <code>selectedTabId</code> in panel <code>:key</code><br>
<li> Added <code>gridStackUpdateInProgress</code> guard<br> <li>
Optimized <code>refreshGridStack</code> clearing logic<br> <li> Added
console error logs on save and widget add


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7558/files#diff-313f7c69102161242c893c863c50f1f1cd1fc19b68b5c99bf840b4b5c72f0f2e">+51/-42</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Bug fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>commons.ts</strong><dd><code>Handle duplicate panel IDs
on retrieval</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

web/src/utils/commons.ts

<li>Added <code>fixDuplicatePanelIds</code> to dedupe panel IDs<br> <li>
Called dedupe in <code>getDashboard</code> flow<br> <li> Saved and
re-fetched dashboard when duplicates found<br> <li> Implemented
<code>generateUniquePanelId</code> helper


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7558/files#diff-17cb74f8142984fc46bbfecdeaacccc118fd5d4ab7f040a55695caaa309d104f">+81/-14</a>&nbsp;
</td>

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

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

---------

Co-authored-by: Kirtan Thakkar <kirtan@kiara.tech>
2025-07-15 12:11:43 +05:30
..
2025-07-10 11:23:41 -07:00
2025-07-10 11:23:41 -07:00
2025-07-10 11:23:41 -07:00
2025-07-10 11:23:41 -07:00
2025-07-10 11:23:41 -07:00
2025-07-10 11:23:41 -07:00
2025-07-10 11:23:41 -07:00