### **PR Type**
Enhancement
___
### **Description**
- Add domain management backend APIs and handlers
- Integrate enterprise domain check in auth redirect
- Extend job init to watch/cache domain settings
- Implement DomainManagement.vue UI and integration
___
### **Changes diagram**
```mermaid
flowchart LR
UI["DomainManagement.vue UI"]
TS["domainManagement service (TS)"]
API["HTTP API (/api/{org}/domain_management)"]
Handler["Rust handler (domain_management/mod.rs)"]
BE["domain_management service (Rust)"]
Auth["Auth redirect domain check"]
UI -- "GET/PUT calls" --> TS
TS -- "HTTP request" --> API
API -- "routes to" --> Handler
Handler -- "calls service" --> BE
Auth -- "calls is_email_allowed" --> BE
```
___
### **Changes walkthrough** 📝
<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>mod.rs</strong><dd><code>Add domain management API
handlers</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-9e3829325dfd706f5f6d715837cabd691add3c6e4d6e25644926530139c82ff9">+114/-0</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Integrate domain check in auth
redirect</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-ca09c9c9b020049bdbc3382c466bfcca80daac92e98760d9a9a76172abf34049">+18/-10</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Initialize domain management cache
watcher</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-f2e4c29b8eef22189ec704a832633c4bd135a24444f054864c98064bd0963681">+15/-9</a>
</td>
</tr>
<tr>
<td><strong>DomainManagement.vue</strong><dd><code>Implement domain
restrictions UI component</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-5e47cd01fcb63f7ef27dc64d2ecf66c39e17097e29944951c3ae1bfe715bb97c">+469/-0</a>
</td>
</tr>
<tr>
<td><strong>index.vue</strong><dd><code>Add domain management tab in
settings</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-699c63979f851c48ad440a078e93282fd797a18fc065e5331b2e41122ddb8b69">+14/-0</a>
</td>
</tr>
<tr>
<td><strong>domainManagement.ts</strong><dd><code>Add domain management
HTTP service</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-2edddfd1d2d86e7facfd2c863a126897f1f7bdf1c02f5fa58c6f9b55f23ad700">+43/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>3 files</summary><table>
<tr>
<td><strong>mod.rs</strong><dd><code>Register domain_management
module</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-a1cfd40da1ab6cd4db0181fd8664965034298047b3b7c3320c5385897a7c4aed">+1/-0</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Register domain management
routes</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-02556e3f515441b5d2b6bbea7829df488beac03c4cc41309a6638ae3c0e0aec6">+4/-1</a>
</td>
</tr>
<tr>
<td><strong>useManagementRoutes.ts</strong><dd><code>Add
domain_management route entry</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-b71a1d39b1fab0749f0668d5f16382536fbda6e2f0c92c56a972fb5d8b5835f5">+11/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>en.json</strong><dd><code>Add domain management
translations</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7563/files#diff-892aa3d75ab6e129ef9116aa21bec1b9a15ba69ce5366d2a19128078c690d824">+28/-1</a>
</td>
</tr>
</table></details></td></tr></tr></tbody></table>
___
> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
---------
Co-authored-by: Bhargav <BJP232004@GMAIL.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