Files
openobserve/web
Abhay Padamani 25a99bf39d feat: vrl support for visualization (#10237)
### **User description**
Design at :
https://github.com/openobserve/designs/tree/main/visualization-vrl-support
### **PR Type**
Enhancement


___

### **Description**
- Always default to table chart with VRL functions

- Preserve and propagate VRL function query across UI

- Enable dynamic columns for VRL-based table charts

- Remove visualization-mode restrictions for function editor


___

### Diagram Walkthrough


```mermaid
flowchart LR
  VRL["VRL Function Present?"]
  VRL -- "yes" --> Table["Force Table Chart"]
  Table -- "on table" --> DynCols["Enable Dynamic Columns"]
  VRL -- "no" --> OtherCharts["Allow Other Chart Types"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>useDashboardPanel.ts</strong><dd><code>Force table
chart for VRL functions</code>&nbsp; &nbsp; &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/composables/useDashboardPanel.ts

<ul><li>Added VRL check in determineChartType<br> <li> Default to table
when VRL functions exist</ul>


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>Index.vue</strong><dd><code>Propagate and handle VRL
function queries</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/plugins/logs/Index.vue

<ul><li>Copy and clear <code>vrlFunctionQuery</code> on query update<br>
<li> Force table type and set <code>table_dynamic_columns</code><br>
<li> Preserve <code>vrlFunctionQuery</code> in visualization flow</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-0323c3da69b369843c5d72bf4df5b00ca6b5147192a213baf331659ecf92af62">+70/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>SearchBar.vue</strong><dd><code>Enable VRL editor in
visualize mode</code>&nbsp; &nbsp; &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/plugins/logs/SearchBar.vue

<ul><li>Always allow editing VRL function editor<br> <li> Removed
visualize-mode warning overlay</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-81893de4edf186b0556f610acb280c87baa2ffe67d3b48a60a866094c7635baf">+1/-26</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>TransformSelector.vue</strong><dd><code>Lift transform
restrictions in visualize mode</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/plugins/logs/TransformSelector.vue

<ul><li>Removed disable state for transform toggle/save in visualize<br>
<li> Removed visualize-mode tooltip restrictions</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-0037d8dd9cfbacc26309b26e98ae953e7ccbd0891ac2fd01c6314ebd7eed9d2c">+3/-13</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>VisualizeLogsQuery.vue</strong><dd><code>Restrict chart
types when VRL functions present</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/plugins/logs/VisualizeLogsQuery.vue

<ul><li>Block non-table chart selection if VRL functions exist<br> <li>
Show error and reset to table on invalid type switch</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-979b01d943d58c5d70faeeac5948b7f02f0b2392a12b84ef07ba7f7393ab0261">+14/-0</a>&nbsp;
&nbsp; </td>

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

</details>

___


___

### **PR Type**
Enhancement, Tests


___

### **Description**
- Default to table chart when VRL functions exist

- Propagate and encode VRL function query in UI

- Enable dynamic columns for VRL-based table charts

- Remove visualize-mode restrictions on VRL editor


___

### Diagram Walkthrough


```mermaid
flowchart LR
  VRL["VRL functions present?"]
  VRL -- "yes" --> Table["Force table chart"]
  Table --> DynCols["Enable dynamic columns"]
  DynCols --> Prop["Propagate VRL query"]
  VRL -- "no" --> Other["Allow other chart types"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>useDashboardPanel.spec.ts</strong><dd><code>Add VRL chart
type determination tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-5dbd79fdde0cbbb7db569095fa062931286463da0b5e72b1fbe99f56116fa5e2">+110/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>Index.spec.ts</strong><dd><code>Add VRL support tests in
Index.vue</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-a6ac1dd4a120625f1c0ed23803aa0cb63e8513b38abc975af72eefe3923b2c73">+189/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>SearchBar.spec.ts</strong><dd><code>Add VRL editor readOnly
and banner tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-63ac75d3fe278dad233e7dd7c51b3b33076d54a776b89ae05190d8522130c78b">+149/-1</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>VisualizeLogsQuery.spec.ts</strong><dd><code>Test VRL chart
type change restrictions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-fdecf623f9a4bdfe679c6c2e4424f31cbce4a1234cb45e1de472189a46c9d4e2">+130/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>TransformSelector.spec.ts</strong><dd><code>Enable transform
toggle in visualize mode</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-c850f07fc5e32a152df85ca63e6ed45c9aeac2965a5bf1238daf7353a8699195">+247/-1</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>useDashboardPanel.ts</strong><dd><code>Force table chart for
VRL functions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-fbba1700750053b9eaf38ddd30dab84531bc44131c795ebb713811e4930cd7cb">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>Index.vue</strong><dd><code>Propagate and apply VRL function
query</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-0323c3da69b369843c5d72bf4df5b00ca6b5147192a213baf331659ecf92af62">+70/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>SearchBar.vue</strong><dd><code>Remove VRL editor read-only
restriction</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-81893de4edf186b0556f610acb280c87baa2ffe67d3b48a60a866094c7635baf">+1/-26</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>TransformSelector.vue</strong><dd><code>Allow transform
selector in visualize mode</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-0037d8dd9cfbacc26309b26e98ae953e7ccbd0891ac2fd01c6314ebd7eed9d2c">+3/-13</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>VisualizeLogsQuery.vue</strong><dd><code>Restrict non-table
charts when VRL present</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10237/files#diff-979b01d943d58c5d70faeeac5948b7f02f0b2392a12b84ef07ba7f7393ab0261">+14/-0</a>&nbsp;
&nbsp; </td>

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

</details>

___
2026-01-30 11:09:37 +05:30
..
2023-02-02 09:03:11 +05:30
2025-12-04 13:58:09 +05:30
2023-08-06 01:29:13 +08:00
2023-02-02 09:03:11 +05:30
2023-02-02 09:03:11 +05:30
2024-04-03 12:49:25 +05:30

web

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

For stand-alone UI development environment, create .env file and which contains below environment variable

VITE_OPENOBSERVE_ENDPOINT=http://localhost:5080/
npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Cypress

npm run test:e2e:dev

This runs the end-to-end tests against the Vite development server. It is much faster than the production build.

But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):

npm run build
npm run test:e2e

Lint with ESLint

npm run lint