### **PR Type**
Enhancement, Documentation
___
### **Description**
- Warn on adding external users to roles
- Add email slot with tooltip icon
- Pass role context to GroupUsers
- Localize warning title and message
___
### Diagram Walkthrough
```mermaid
flowchart LR
EditRole["EditRole.vue: use GroupUsers with role context"] -- context='role' --> GroupUsers["GroupUsers.vue: email slot + warning logic"]
GroupUsers -- shows icon/tooltip --> UI["UI: warning for external user additions"]
Locales["en.json: new i18n strings"] -- used by --> GroupUsers
```
<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>GroupUsers.vue</strong><dd><code>Email slot with
external-user warning for roles</code>
</dd></summary>
<hr>
web/src/components/iam/groups/GroupUsers.vue
<ul><li>Add email slot rendering with warning icon and tooltip.<br> <li>
Introduce <code>context</code> prop to control role/group behavior.<br>
<li> Compute columns to use email slot; include external flag in
data.<br> <li> Add <code>shouldShowWarning</code> helper based on
context and membership.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8709/files#diff-114c767db76d4a09278c765d8aba39a1936c861488f39e7f0f6b3883499a3c40">+54/-3</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>EditRole.vue</strong><dd><code>Provide role context to
GroupUsers</code>
</dd></summary>
<hr>
web/src/components/iam/roles/EditRole.vue
- Pass `context="role"` to `GroupUsers` when editing roles.
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8709/files#diff-263b6bc7d29fdf8358c8437cd637f1350aa3733cc2706eae8ff00028686cc0f5">+1/-0</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Documentation</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>en.json</strong><dd><code>Add i18n strings for external
user warning</code>
</dd></summary>
<hr>
web/src/locales/languages/en.json
- Add `externalUserWarningTitle` and message strings.
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8709/files#diff-892aa3d75ab6e129ef9116aa21bec1b9a15ba69ce5366d2a19128078c690d824">+3/-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