### **PR Type**
Enhancement
___
### **Description**
- Add dynamic pattern summary text in SearchResult
- Refactor PatternStatistics into computed summary text
- Update UI styling for PatternCard and PatternList
- Improve constant extraction and filtering logic
___
### Diagram Walkthrough
```mermaid
flowchart LR
SR["SearchResult Component"]
PS["PatternStatistics Refactor"]
PC["PatternCard Styling"]
PL["PatternList Header Styling"]
SR -- "compute `patternSummaryText`" --> PS
SR -- "toggle patterns/logs view" --> SR
PS -- "provide `summaryText`" --> SR
SR -- "render pattern list/cards" --> PL & PC
```
<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>SearchResult.vue</strong><dd><code>Add dynamic pattern
summary in SearchResult</code>
</dd></summary>
<hr>
web/src/plugins/logs/SearchResult.vue
<ul><li>Add <code>patternSummaryText</code> reactive ref<br> <li>
Conditional pattern summary toggle in UI<br> <li> Enhance constant
extraction with regex split<br> <li> Escape special chars in
<code>match_all</code> clauses</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-5e65533aa4754bb6d0074fda18ffc1ecacded3b9ca6bc28a161c3f6b12f20195">+40/-17</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>PatternStatistics.vue</strong><dd><code>Simplify
PatternStatistics to summary text</code>
</dd></summary>
<hr>
web/src/plugins/logs/patterns/PatternStatistics.vue
<ul><li>Replace detailed cards with single summary div<br> <li>
Introduce <code>summaryText</code> computed property<br> <li> Accept
<code>totalEvents</code> and <code>histogramTime</code> props</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-55950ab8a9ba093fa7462081b33dc7f4af8eb91192e9ad8b642d5474769c6741">+23/-95</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Formatting</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>PatternCard.vue</strong><dd><code>Refine PatternCard
styling classes</code>
</dd></summary>
<hr>
web/src/plugins/logs/patterns/PatternCard.vue
<ul><li>Update padding classes (<code>tw-px-2</code>) on row and
columns<br> <li> Replace custom border & hover classes<br> <li> Remove
fixed monospace font size constraint</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-5ee84ac6fd187a905532b25f0fb3f9fc0640804fed81c924eeafb9f33a384bb6">+8/-8</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>PatternList.vue</strong><dd><code>Polish PatternList
header layout</code>
</dd></summary>
<hr>
web/src/plugins/logs/patterns/PatternList.vue
<ul><li>Simplify header class names and spacing<br> <li> Use CSS var for
header background<br> <li> Add <code>table-head</code> and
<code>table-row-hover</code> utilities</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-e2daac67b374ee564fa289bbd99f16a7523749e7e830e45fe8f343ae43be0be6">+12/-14</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@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