### **PR Type**
Bug fix, Enhancement
___
### **Description**
- Fetch annotations in parallel with queries
- Update watcher to re-render on annotations
- Preserve error handling and tracing
- Cache saving remains asynchronous
___
### Diagram Walkthrough
```mermaid
flowchart LR
Q["Build and run queries"] -- "Promise.all" --> QR["Query results"]
A["Start annotations fetch"] -- "in parallel" --> AP["Annotations Promise"]
QR -- "update state.data/metadata" --> S["Update state"]
AP -- "await & assign" --> AN["state.annotations"]
AN -- "watcher triggers" --> R["Panel re-render"]
```
<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>usePanelDataLoader.ts</strong><dd><code>Parallelize
annotations fetching across query paths</code>
</dd></summary>
<hr>
web/src/composables/dashboard/usePanelDataLoader.ts
<ul><li>Start annotations fetch in parallel with PromQL queries.<br>
<li> Start annotations fetch in parallel with SQL/search paths.<br> <li>
Await annotations after primary data ready; update state.<br> <li> Add
try/catch guards; keep tracing and caching behavior.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8736/files#diff-5a42e9493a7bcd722b88e61fd38883c4f61001bc9cafa399f65f8eafda3aace9">+188/-115</a></td>
</tr>
<tr>
<td>
<details>
<summary><strong>PanelSchemaRenderer.vue</strong><dd><code>Re-render
panel when annotations update</code>
</dd></summary>
<hr>
web/src/components/dashboards/PanelSchemaRenderer.vue
<ul><li>Add annotations to watch dependencies for re-render.<br> <li>
Ensure UI updates when annotations arrive.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8736/files#diff-e5376e7e77bf3aaf6590c2522d8c2dbffcc95a8006ae0d6dc0040a37825367d6">+1/-1</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
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