Files
openobserve/web
Sai Nikhil 1e9761ba61 feat: logs page highlighting (#8059)
### **User description**
This PR helps to highlight text in logs page and also adds a left border
for each depending upon the status of the logs


___

### **PR Type**
Enhancement


___

### **Description**
Add LogsHighLighting component for semantic highlighting
Highlight query terms across logs and JSON
Visual status indicators via colored borders/lines
FTS-aware coloring for selected columns


___

### Diagram Walkthrough


```mermaid
flowchart LR
  Highlighter["LogsHighLighting.vue (new)"] -- "used by" --> Detail["DetailTable.vue"]
  Highlighter -- "used by" --> JsonPrev["JsonPreview.vue"]
  Highlighter -- "used by" --> Table["TenstackTable.vue"]
  Status["statusParser.ts (new)"] -- "row/log status color" --> Detail
  Status -- "row status stripe" --> Table
  Colors["keyValueParser.ts (new)"] -- "theme colors" --> Highlighter
  Composable["useTextHighlighter.ts (new)"] -- "highlight + semantic color" --> Highlighter
  Search["SearchResult.vue"] -- "pass highlight + FTS keys" --> Table
```



<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><details><summary>8
files</summary><table>
<tr>
<td><strong>LogsHighLighting.vue</strong><dd><code>New component for
semantic JSON/log highlighting</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8059/files#diff-4ef4ac0444004add270de4da30fa39bafd95bd7f1c408d28cf6737655fc152eb">+324/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>DetailTable.vue</strong><dd><code>Add status top border and
inline highlighting</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8059/files#diff-80552b5d25fa6cef9fbbe430b1865d761c4b132284c2d2175afceea8cbabc8c7">+21/-6</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>JsonPreview.vue</strong><dd><code>Use highlighter for
key/value rendering</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/8059/files#diff-3985073134d35ff074742944b114d0905524038b42e6d2ac887fef2c8436fb16">+8/-14</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>SearchResult.vue</strong><dd><code>Provide highlight query
and FTS keys downstream</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8059/files#diff-5e65533aa4754bb6d0074fda18ffc1ecacded3b9ca6bc28a161c3f6b12f20195">+16/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>TenstackTable.vue</strong><dd><code>Integrate highlighter
and add status stripe</code>&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/8059/files#diff-bc3c669f5ab65a42ae378df1f7d6b35014c9c220790bdcc72b47f55d1385dc22">+34/-6</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>useTextHighlighter.ts</strong><dd><code>New composable for
text highlighting logic</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/8059/files#diff-b18d6e5b667ce7b485a0592cddcaf47cf68b10b6a1b75bd006f21917c4343147">+486/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>keyValueParser.ts</strong><dd><code>Theme-aware color
palette utilities</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/8059/files#diff-efcf08bdfe13eeac90f7dadbdb5892ae614d49b16f4f75bfc6225700d0ba7b73">+53/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>statusParser.ts</strong><dd><code>Derive log severity and
colors</code>&nbsp; &nbsp; &nbsp; &nbsp; &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/8059/files#diff-c189f5de10234dccf5f5e5b332dbb41f54c21a366ed4817c963bbf2e954d620a">+246/-0</a>&nbsp;
</td>

</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>Index.vue</strong><dd><code>Fix column update timeout
scoping</code>&nbsp; &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/8059/files#diff-0323c3da69b369843c5d72bf4df5b00ca6b5147192a213baf331659ecf92af62">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>useLogs.ts</strong><dd><code>Correct FTS key detection
logic</code>&nbsp; &nbsp; &nbsp; &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/8059/files#diff-1040f61354f92711e0e77ed4e9bfa15586d45a94c7e2ab06cc37372068030e7b">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

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

</details>

___
2025-08-31 14:53:28 +05:30
..
2023-02-02 09:03:11 +05:30
2025-08-31 14:53:28 +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
2023-02-02 09:03:11 +05:30
2025-08-11 17:06:35 -07:00
2024-04-03 12:49:25 +05:30
2023-02-02 09:03:11 +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