Files
openobserve/web
6e75dc0e62 feat: add bulk enable/disable for alert and pipelines (#8438)
### **User description**
This adds two apis, one for bulk enable/disable of pipeline and one for
bulk enable/disable of alerts.


___

### **PR Type**
Enhancement


___

### **Description**
- Add bulk enable/disable for alerts

- Add bulk enable/disable for pipelines

- Introduce enterprise permission checks helper

- Update auth bypass for bulk endpoints


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["New models: Bulk request/response (alerts, pipelines)"]
  B["Alerts: POST /v2/{org_id}/alerts/bulk/enable"]
  C["Pipelines: POST /{org_id}/pipelines/bulk/enable"]
  D["Enterprise permission check: check_resource_permissions"]
  E["Router: register bulk endpoints"]
  F["Auth: bypass for /bulk/enable paths"]

  A -- "used by" --> B
  A -- "used by" --> C
  D -- "enforced in" --> B
  D -- "enforced in" --> C
  E -- "exposes" --> B
  E -- "exposes" --> C
  F -- "allows unauth extraction for" --> B
  F -- "allows unauth extraction for" --> C
```



<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>6
files</summary><table>
<tr>
<td><strong>auth.rs</strong><dd><code>Allow auth extractor bypass for
bulk enable endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-9bc2b1841504a435f66ad094f72ddbe7b7fa75e5e1557b8adbfe36f7f0592e1b">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>responses.rs</strong><dd><code>Add alerts bulk enable
request/response models</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-224027f90893122eea28e35778467acf1a4b5572ce612fc9bc9ec44ca8ebd9fb">+12/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>pipelines.rs</strong><dd><code>Add pipelines bulk enable
request/response models</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-61bb28d7091130297c917a0530d96202fcb4b073b514410531f9fe71acfc814f">+12/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>mod.rs</strong><dd><code>Implement alerts bulk enable
endpoint with permissions</code>&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-83431801d27626ef27482e67b62661f900043544a45ddf958bd027cf2fa3bd8d">+91/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>pipeline.rs</strong><dd><code>Implement pipelines bulk
enable endpoint with permissions</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-c69f4f94eee97ce226caddc497b2adf89e26869f2d72b0d0206dc31ab2714daf">+89/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>utils.rs</strong><dd><code>Add generic enterprise resource
permission checker</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-96bb9f4a8f547c821f26c957e8505d0437095b08d2b36687531f71565d287bd6">+38/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>mod.rs</strong><dd><code>Register bulk enable endpoints in
service routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8438/files#diff-02556e3f515441b5d2b6bbea7829df488beac03c4cc41309a6638ae3c0e0aec6">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>openapi.rs</strong><dd><code>Expose bulk enable endpoints in
OpenAPI</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/8438/files#diff-edb8ce232c0cd08366879f642788a75d99f6bab64b4c0e77391281fdb9241e90">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

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

</details>

___

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
2025-09-18 12:12:16 +05:30
..
2023-02-02 09:03:11 +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
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