web-mojo 2.2.78 → 2.2.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.css +880 -0
- package/dist/admin.es.js +1 -1
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.es.js +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/chunks/ChatView-BM3t6H4o.js +2 -0
- package/dist/chunks/ChatView-BM3t6H4o.js.map +1 -0
- package/dist/chunks/ChatView-qyaF_7ZZ.js +2 -0
- package/dist/chunks/ChatView-qyaF_7ZZ.js.map +1 -0
- package/dist/chunks/Dialog-Blz5pT9W.js +3 -0
- package/dist/chunks/Dialog-Blz5pT9W.js.map +1 -0
- package/dist/chunks/Dialog-_LaV3jy1.js +3 -0
- package/dist/chunks/Dialog-_LaV3jy1.js.map +1 -0
- package/dist/chunks/{FormView-CMF2j-D2.js → FormView-8YcQbicn.js} +2 -2
- package/dist/chunks/{FormView-CMF2j-D2.js.map → FormView-8YcQbicn.js.map} +1 -1
- package/dist/chunks/{FormView-B1ZAxHMa.js → FormView-BJO7sGAG.js} +2 -2
- package/dist/chunks/{FormView-B1ZAxHMa.js.map → FormView-BJO7sGAG.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-Dk9_O4D2.js → MetricsMiniChartWidget-BuoPd6Ri.js} +2 -2
- package/dist/chunks/{MetricsMiniChartWidget-Dk9_O4D2.js.map → MetricsMiniChartWidget-BuoPd6Ri.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-D2mWYSVQ.js → MetricsMiniChartWidget-C0MaUMxB.js} +2 -2
- package/dist/chunks/{MetricsMiniChartWidget-D2mWYSVQ.js.map → MetricsMiniChartWidget-C0MaUMxB.js.map} +1 -1
- package/dist/chunks/MiniPieChart-BP1bYCGv.js +2 -0
- package/dist/chunks/MiniPieChart-BP1bYCGv.js.map +1 -0
- package/dist/chunks/MiniPieChart-yRGFM7Yn.js +2 -0
- package/dist/chunks/MiniPieChart-yRGFM7Yn.js.map +1 -0
- package/dist/chunks/MiniSeriesChart-CNNEnNnK.js +2 -0
- package/dist/chunks/MiniSeriesChart-CNNEnNnK.js.map +1 -0
- package/dist/chunks/MiniSeriesChart-DTlUluHV.js +2 -0
- package/dist/chunks/MiniSeriesChart-DTlUluHV.js.map +1 -0
- package/dist/chunks/Modal-BHRX_nwz.js +2 -0
- package/dist/chunks/{Modal-Bw03ttEN.js.map → Modal-BHRX_nwz.js.map} +1 -1
- package/dist/chunks/{Modal-D3e3ufqY.js → Modal-f18CuodE.js} +2 -2
- package/dist/chunks/{Modal-D3e3ufqY.js.map → Modal-f18CuodE.js.map} +1 -1
- package/dist/chunks/{PDFViewer-Hjdv1bJh.js → PDFViewer-BYOuiYWu.js} +2 -2
- package/dist/chunks/{PDFViewer-Hjdv1bJh.js.map → PDFViewer-BYOuiYWu.js.map} +1 -1
- package/dist/chunks/{PDFViewer-Hyl4NHoC.js → PDFViewer-CQGLxxe6.js} +2 -2
- package/dist/chunks/{PDFViewer-Hyl4NHoC.js.map → PDFViewer-CQGLxxe6.js.map} +1 -1
- package/dist/chunks/{Passkeys-CfoEoTcR.js → Passkeys-BKj8hXj5.js} +2 -2
- package/dist/chunks/{Passkeys-CfoEoTcR.js.map → Passkeys-BKj8hXj5.js.map} +1 -1
- package/dist/chunks/Passkeys-GXFL6xrU.js +2 -0
- package/dist/chunks/{Passkeys-ChQsa23t.js.map → Passkeys-GXFL6xrU.js.map} +1 -1
- package/dist/chunks/{TokenManager-C5kbW-kE.js → TokenManager-DI79oM25.js} +2 -2
- package/dist/chunks/{TokenManager-C5kbW-kE.js.map → TokenManager-DI79oM25.js.map} +1 -1
- package/dist/chunks/{TokenManager-BdBPYrap.js → TokenManager-fjSO1cdB.js} +2 -2
- package/dist/chunks/{TokenManager-BdBPYrap.js.map → TokenManager-fjSO1cdB.js.map} +1 -1
- package/dist/chunks/{UserProfileView-DmEvwbiL.js → UserProfileView-CkDqEHlF.js} +2 -2
- package/dist/chunks/{UserProfileView-DmEvwbiL.js.map → UserProfileView-CkDqEHlF.js.map} +1 -1
- package/dist/chunks/{UserProfileView-BhhgdF5j.js → UserProfileView-vBbWK7yp.js} +2 -2
- package/dist/chunks/{UserProfileView-BhhgdF5j.js.map → UserProfileView-vBbWK7yp.js.map} +1 -1
- package/dist/chunks/WebApp-Bu01LHe3.js +2 -0
- package/dist/chunks/{WebApp-fzbldw-e.js.map → WebApp-Bu01LHe3.js.map} +1 -1
- package/dist/chunks/WebApp-Do6JjXuj.js +2 -0
- package/dist/chunks/{WebApp-BRrZqN8F.js.map → WebApp-Do6JjXuj.js.map} +1 -1
- package/dist/chunks/{index-DWyUR4nZ.js → index-D6-NC5vF.js} +2 -2
- package/dist/chunks/{index-DWyUR4nZ.js.map → index-D6-NC5vF.js.map} +1 -1
- package/dist/chunks/{index-T9hfdZpY.js → index-DrRY_Ggo.js} +2 -2
- package/dist/chunks/{index-T9hfdZpY.js.map → index-DrRY_Ggo.js.map} +1 -1
- package/dist/chunks/{version-CnQm2f1m.js → version-CmXJbPMp.js} +2 -2
- package/dist/chunks/{version-CnQm2f1m.js.map → version-CmXJbPMp.js.map} +1 -1
- package/dist/chunks/{version-DP00Nwek.js → version-yR7a1znL.js} +2 -2
- package/dist/chunks/{version-DP00Nwek.js.map → version-yR7a1znL.js.map} +1 -1
- package/dist/css/web-mojo.css +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +1 -1
- package/dist/map.cjs.js +1 -1
- package/dist/map.es.js +1 -1
- package/dist/user-profile.cjs.js +1 -1
- package/dist/user-profile.es.js +1 -1
- package/dist/web-mojo.lite.iife.js +1 -0
- package/dist/web-mojo.lite.iife.js.map +1 -1
- package/dist/web-mojo.lite.iife.min.js +1 -1
- package/dist/web-mojo.lite.iife.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/ChatView-BvYC6QcH.js +0 -2
- package/dist/chunks/ChatView-BvYC6QcH.js.map +0 -1
- package/dist/chunks/ChatView-CTuQeVeZ.js +0 -2
- package/dist/chunks/ChatView-CTuQeVeZ.js.map +0 -1
- package/dist/chunks/Dialog-0Hxr19cJ.js +0 -3
- package/dist/chunks/Dialog-0Hxr19cJ.js.map +0 -1
- package/dist/chunks/Dialog-ybkCj8Q1.js +0 -3
- package/dist/chunks/Dialog-ybkCj8Q1.js.map +0 -1
- package/dist/chunks/Modal-Bw03ttEN.js +0 -2
- package/dist/chunks/Passkeys-ChQsa23t.js +0 -2
- package/dist/chunks/WebApp-BRrZqN8F.js +0 -2
- package/dist/chunks/WebApp-fzbldw-e.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
|
+
- **PortalWebApp** — New opinionated base class extending `PortalApp` with auth-gated lifecycle, automatic WebSocket setup, and clean events. Auth is checked before the router starts; if it fails, a configurable countdown redirect is shown. WebSocket connects automatically after auth using `WebSocketClient.deriveURL()`. New events: `user:ready`, `user:logout`, `ws:ready`, `ws:lost`, `ws:reconnecting`. Config-driven: `auth: { loginUrl }` (default `/login`), `ws: true/false` (default `true`). Overridable `onAuthFailed(error)` hook. Exported from `src/index.js`.
|
|
7
|
+
- **Admin Assistant** — Fullscreen modal chat interface for LLM-powered admin queries. Triggered via `registerAssistant(app)` which adds a `bi-robot` icon to the topbar (requires `view_admin` permission). Two-panel layout: conversation list (left, REST-backed) + real-time chat area (right, WebSocket). Supports structured response blocks rendered inline: `table` blocks as `TableView`, `chart` blocks as `SeriesChart`/`PieChart`, and `stat` blocks as Bootstrap stat cards.
|
|
8
|
+
- **AssistantView** — New view exported from `web-mojo/admin`. Manages WebSocket subscriptions for `assistant_thinking`, `assistant_tool_call`, `assistant_response`, and `assistant_error` events. Unsubscribes on destroy to prevent leaks.
|
|
9
|
+
- **AssistantConversation & AssistantConversationList** — New models exported from `web-mojo/models`. Endpoint `/api/assistant/conversation`. Conversation history loaded via REST; messages sent via WebSocket.
|
|
10
|
+
- **IPSetTablePage & IPSetView** — New admin pages/views for managing kernel-level IP blocking sets (country blocks, AbuseIPDB feeds, datacenter ranges, custom CIDR lists). Route: `system/security/ipsets`. Registered automatically by `registerSystemPages()`.
|
|
11
|
+
- **IP Sets menu entry** — Added "IP Sets" (`bi-shield-shaded`) to the Security section of the admin sidebar, requiring `view_security` permission.
|
|
12
|
+
- **ChatView: `showThinking(text?)`** — Appends an animated bouncing-dots thinking indicator to the messages area. Subsequent calls update the text without adding a second indicator.
|
|
13
|
+
- **ChatView: `hideThinking()`** — Removes the thinking indicator.
|
|
14
|
+
- **ChatView: `setInputEnabled(enabled)`** — Enables or disables the chat textarea and send button.
|
|
15
|
+
- **ChatView: `messageViewClass` option** — Constructor option (default `ChatMessageView`) allowing consumers to supply a custom message view class.
|
|
16
|
+
- **ChatView: `showFileInput` option** — Constructor option (default `true`). When `false`, hides the file drop zone and disables the `FileDropMixin` in `ChatInputView`.
|
|
17
|
+
- **ChatInputView: `setEnabled(enabled)`** — Disables or re-enables the textarea and send button. Distinct from `setBusy()` (which shows a spinner).
|
|
18
|
+
- **ChatMessageView: `role` support** — Applies `message-assistant` or `message-user` CSS class based on `message.role`. Assistant messages display a `bi-robot` icon/avatar instead of user initials.
|
|
19
|
+
- **ChatMessageView: `blocks` container** — Renders a `data-container="blocks-{id}"` slot after message text for attaching block child views (used by `AssistantMessageView`).
|
|
20
|
+
- **ChatMessageView: `tool_calls` display** — If `message.tool_calls` is present, renders a collapsible Bootstrap collapse section showing tool names as badges.
|
|
21
|
+
- **FormBuilder: `showWhen` field option** — Conditionally shows/hides a field based on another field's value. Hidden fields are excluded from form submission data and their `required` attributes are suppressed during validation.
|
|
22
|
+
- **IncidentView RuleEngine: OSSEC smart rule creation** — When creating a new RuleSet from an OSSEC incident that carries a `rule_id` in its metadata, a matching rule condition (`field_name=rule_id`, `comparator==`, `value_type=int`) is auto-created and linked. Toast confirms whether auto-creation succeeded or fell back to manual.
|
|
23
|
+
- **IncidentView RuleEngine: "Create New Rule" button** — New `create-rule-from-incident` action button added alongside "View Full Details" in the RuleEngine section header.
|
|
24
|
+
- **IncidentView events table: compact two-line columns** — Date column now shows datetime + category badge stacked; Source column now shows hostname + IP stacked. Standalone Category and Host columns removed to reduce horizontal clutter.
|
|
25
|
+
- **RuleSet form: `Delete on Resolution` toggle** — New switch field (`metadata.delete_on_resolution`) added to both the create and edit RuleSet forms. When enabled, incidents produced by this rule are permanently deleted (cascade to events and history) when resolved or closed.
|
|
26
|
+
- **RuleSetTablePage: Auto-Delete column** — New `Auto-Delete` column (`metadata.delete_on_resolution`, `yesnoicon` formatter) shows at a glance which rules cascade-delete incidents on resolution.
|
|
27
|
+
- **IncidentView: Protect / Unprotect quick actions** — `QuickActionsBar` now shows a `Protect` button (outline) or a `Protected` button (warning/filled) based on `metadata.do_not_delete`. Clicking either saves the flag and emits `incident:updated` to refresh the view.
|
|
28
|
+
- **IncidentView: Protect / Remove Protection context menu items** — The incident context menu now includes "Protect from Deletion" or "Remove Protection" depending on current state, wired to `onActionProtectIncident` / `onActionRemoveProtection`.
|
|
29
|
+
- **IncidentView header: Protected badge** — A `bg-warning` Bootstrap badge with a shield icon is shown alongside the category badge when `metadata.do_not_delete` is set on the incident.
|
|
30
|
+
- **IncidentView RuleEngine: auto-delete warning** — When the linked RuleSet has `delete_on_resolution` enabled and the incident is not protected, a warning alert is shown. If the incident is also protected, an info alert notes that auto-delete is enabled but overridden.
|
|
31
|
+
- **IncidentTablePage: batch Protect action** — "Protect" added to the batch-action bar. Confirms via dialog, then saves `metadata.do_not_delete: true` on all selected incidents and refreshes the table.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- **GeoIPView block/unblock/whitelist actions** — Converted from ad hoc `rest.POST` calls to `model.save()` with action payloads; added optional chaining on `toast` calls to avoid errors in non-portal contexts.
|
|
35
|
+
- **IncidentView RuleEngine: `rule_set` field name** — Fixed stale field reference (`ruleset` → `rule_set`) when reading and saving the linked rule set on an incident. Handles both plain ID and nested object responses.
|
|
36
|
+
- **IncidentView: detailed graph fetch** — `IncidentView.onInit()` now fetches the incident with `graph=detailed` so nested relations (e.g. `rule_set`) are available before child sections render.
|
|
37
|
+
|
|
38
|
+
## [Previous]
|
|
6
39
|
- **User Profile Extension** (`web-mojo/user-profile`) — Moved all user profile views from `src/core/views/user/` into a standalone extension at `src/extensions/user-profile/`. Available as `import { ... } from 'web-mojo/user-profile'` or via `@ext/user-profile/index.js` internally.
|
|
7
40
|
- **ProfilePersonalSection** — Editable first/last name, display name, DOB (with verified/unverified badge), timezone, and address (stored in `user.metadata`)
|
|
8
41
|
- **ProfileConnectedSection** — Lists OAuth provider connections (Google, GitHub, Microsoft, etc.) with unlink capability and lockout guard
|