Skip to content

Conversation

@ktx-abhay
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Sep 12, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 drilldown functionality issue by adding a new __axisValue field to drilldown variables when users navigate from dashboard charts to other pages (like logs). The change is implemented in the PanelSchemaRenderer.vue component within two similar code blocks that handle chart drilldown operations.

The modification extracts the axis value from the clicked chart point using drilldownParams?.[0]?.value?.[0] as the primary value, falling back to drilldownParams?.[0]?.name if the value array is empty or undefined. This ensures that when users click on chart data points, the specific axis value (typically representing time or category information) is properly preserved and passed to the target destination.

The fix applies to all chart types except tables and sankey charts, maintaining consistency with the existing drilldown logic while providing the missing context needed for proper data exploration workflows. The implementation uses modern JavaScript optional chaining and nullish coalescing operators to safely handle potentially undefined data structures. Additionally, there's a minor formatting improvement removing extra whitespace in a return statement.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it addresses a clear functional gap without breaking existing behavior
  • Score reflects a straightforward fix with proper null safety handling and targeted scope that doesn't affect core functionality
  • Pay close attention to the PanelSchemaRenderer.vue file to ensure the axis value extraction logic works correctly with different chart data structures

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@ktx-abhay ktx-abhay merged commit e909ede into branch-v0.14.6-rc7 Sep 12, 2025
49 of 50 checks passed
@ktx-abhay ktx-abhay deleted the fix--drilldown-axisvalue-issue branch September 12, 2025 09:41
ktx-abhay added a commit that referenced this pull request Sep 12, 2025
### **PR Type**
Bug fix


___

### **Description**
- Add `__axisValue` to drilldown payload

- Fallback to name when value missing

- Improve logs page drilldown accuracy


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Drilldown event params"] --> B["Extract value/name"]
  B --> C["Set __axisValue from value[0]"]
  B --> D["Fallback to name if missing"]
  C --> E["Build drilldown payload"]
  D --> E
```



<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>PanelSchemaRenderer.vue</strong><dd><code>Add robust
axis value to drilldown data</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/PanelSchemaRenderer.vue

<ul><li>Add <code>__axisValue</code> to the drilldown data object.<br>
<li> Use first element of <code>value</code> array when available.<br>
<li> Fallback to <code>name</code> when <code>value[0]</code> is
absent.</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8405/files#diff-e5376e7e77bf3aaf6590c2522d8c2dbffcc95a8006ae0d6dc0040a37825367d6">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

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

</details>

___
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants