### **PR Type**
Enhancement
___
### **Description**
- Add unique value auto-color for tables
- Introduce typed override config schema
- Update popup UI for new config types
- Pass color mode through table pipeline
___
### Diagram Walkthrough
```mermaid
flowchart LR
Schema["Dashboard v5 Config enum"]
Popup["OverrideConfigPopup UI logic"]
Convert["convertTableData column metadata"]
Renderer["TableRenderer cell style"]
Palette["colorPalette getColorForTable"]
Schema -- "new type 'unique_value_color'" --> Popup
Popup -- "persist {type, autoColor|value}" --> Convert
Convert -- "set col.colorMode='auto'" --> Renderer
Renderer -- "map unique values to colors" --> Palette
```
<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>mod.rs</strong><dd><code>Typed dashboard Config with
color variant</code>
</dd></summary>
<hr>
src/config/src/meta/dashboards/v5/mod.rs
<ul><li>Replace <code>Config</code> struct with tagged enum.<br> <li>
Add variants: <code>Unit{value?}</code> and
<code>UniqueValueColor{auto_color}</code>.<br> <li> Adjust serde to use
<code>type</code> tag and camelCase.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8051/files#diff-da49585bbcb02bf0f737bb68739ebc248edd15c7ad9427c0e68f7728bb4a8c17">+13/-8</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>OverrideConfigPopup.vue</strong><dd><code>Popup
supports unit and auto color overrides</code>
</dd></summary>
<hr>
web/src/components/dashboards/OverrideConfigPopup.vue
<ul><li>Redesign popup to choose config type.<br> <li> Support unit
config and unique value color (auto).<br> <li> Normalize, transform, and
save typed configs.<br> <li> UI tweaks: width, layout, and
handlers.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8051/files#diff-f1512a15069c23bcc71ac88db5b0ab882031bf6ec9d53a84de2fcd8adb6dec2c">+155/-62</a></td>
</tr>
<tr>
<td>
<details>
<summary><strong>OverrideConfig.vue</strong><dd><code>Adapt prop shape
for typed overrides</code>
</dd></summary>
<hr>
web/src/components/dashboards/addPanel/OverrideConfig.vue
<ul><li>Pass override configs via <code>{ overrideConfigs }</code>
shape.<br> <li> Simplify dialog prop wiring.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8051/files#diff-54a6038f5c684ade27b88e3c6a134874b51501904441fa7849a532d10aa7d533">+3/-5</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>TableRenderer.vue</strong><dd><code>Table cells
auto-colored by unique values</code>
</dd></summary>
<hr>
web/src/components/dashboards/panels/TableRenderer.vue
<ul><li>Add auto-color rendering path for columns.<br> <li> Use
<code>getColorForTable</code> palette and per-column cache.<br> <li>
Fallback to value-mapping color.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8051/files#diff-794706ea9da3a70012a0327c0464f9fd16802f78ece26055fe951716c2d73d59">+24/-1</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>colorPalette.ts</strong><dd><code>Add table color
palette export</code>
</dd></summary>
<hr>
web/src/utils/dashboard/colorPalette.ts
<ul><li>Export <code>getColorForTable</code> palette for tables.<br>
<li> Provide light pastel color list.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8051/files#diff-30ac812743f2388c4061647fac5e9f413bfe561f1fc5d4f6f7be82fce73f2840">+27/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>convertTableData.ts</strong><dd><code>Pipe override
color/unit configs to table</code>
</dd></summary>
<hr>
web/src/utils/dashboard/convertTableData.ts
<ul><li>Parse typed override configs to maps.<br> <li> Set
<code>colorMode: 'auto'</code> on columns when enabled.<br> <li> Use
unit config map for formatting.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8051/files#diff-a672094c46e697ee7b7a3949a901cc1f7f88ec06cddaf67370474b508d5b0960">+32/-8</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: Loakesh Indiran <66478092+Loaki07@users.noreply.github.com>
web
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
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:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom 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