@objectstack/platform-objects 4.0.5 → 4.1.0
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/dist/apps/index.d.mts +16 -48
- package/dist/apps/index.d.ts +16 -48
- package/dist/apps/index.js +139 -217
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/index.mjs +140 -212
- package/dist/apps/index.mjs.map +1 -1
- package/dist/audit/index.d.mts +38990 -51
- package/dist/audit/index.d.ts +38990 -51
- package/dist/audit/index.js +1428 -0
- package/dist/audit/index.js.map +1 -1
- package/dist/audit/index.mjs +1417 -1
- package/dist/audit/index.mjs.map +1 -1
- package/dist/identity/index.d.mts +14869 -2802
- package/dist/identity/index.d.ts +14869 -2802
- package/dist/identity/index.js +1090 -6
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/index.mjs +1089 -7
- package/dist/identity/index.mjs.map +1 -1
- package/dist/index.d.mts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +3652 -1482
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3633 -1465
- package/dist/index.mjs.map +1 -1
- package/dist/integration/index.d.mts +2905 -0
- package/dist/integration/index.d.ts +2905 -0
- package/dist/integration/index.js +140 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/index.mjs +138 -0
- package/dist/integration/index.mjs.map +1 -0
- package/dist/metadata/index.d.mts +577 -21181
- package/dist/metadata/index.d.ts +577 -21181
- package/dist/metadata/index.js +29 -619
- package/dist/metadata/index.js.map +1 -1
- package/dist/metadata/index.mjs +30 -615
- package/dist/metadata/index.mjs.map +1 -1
- package/dist/security/index.d.mts +7278 -46
- package/dist/security/index.d.ts +7278 -46
- package/dist/security/index.js +540 -0
- package/dist/security/index.js.map +1 -1
- package/dist/security/index.mjs +539 -1
- package/dist/security/index.mjs.map +1 -1
- package/dist/system/index.d.mts +8409 -0
- package/dist/system/index.d.ts +8409 -0
- package/dist/system/index.js +395 -0
- package/dist/system/index.js.map +1 -0
- package/dist/system/index.mjs +391 -0
- package/dist/system/index.mjs.map +1 -0
- package/package.json +13 -8
- package/dist/tenant/index.d.mts +0 -18464
- package/dist/tenant/index.d.ts +0 -18464
- package/dist/tenant/index.js +0 -741
- package/dist/tenant/index.js.map +0 -1
- package/dist/tenant/index.mjs +0 -733
- package/dist/tenant/index.mjs.map +0 -1
- /package/dist/{state-machine.zod-BFg-VE0M.d-Ek3_yo9P.d.mts → state-machine.zod-BNanU03M.d-Ek3_yo9P.d.mts} +0 -0
- /package/dist/{state-machine.zod-BFg-VE0M.d-Ek3_yo9P.d.ts → state-machine.zod-BNanU03M.d-Ek3_yo9P.d.ts} +0 -0
package/dist/apps/index.mjs
CHANGED
|
@@ -25,197 +25,120 @@ var SETUP_APP = {
|
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
id: "
|
|
28
|
+
id: "group_people_org",
|
|
29
29
|
type: "group",
|
|
30
|
-
label: "
|
|
31
|
-
icon: "
|
|
30
|
+
label: "People & Organization",
|
|
31
|
+
icon: "users",
|
|
32
32
|
children: [
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
// HR-shaped grouping: who exists, where they sit in the org chart,
|
|
34
|
+
// and which tenants/teams they belong to. `sys_department` is the
|
|
35
|
+
// platform-owned org skeleton (M10.17.1); `sys_team` is better-auth's
|
|
36
|
+
// flat collaboration grouping.
|
|
37
|
+
//
|
|
38
|
+
// M10.30b: removed top-level Department Members / Team Members /
|
|
39
|
+
// Org Members entries — they are M:N join tables and the natural
|
|
40
|
+
// entry point is the parent record's detail page.
|
|
41
|
+
{ id: "nav_users", type: "object", label: "Users", objectName: "sys_user", icon: "user" },
|
|
42
|
+
{ id: "nav_departments", type: "object", label: "Departments", objectName: "sys_department", icon: "building", requiresObject: "sys_department" },
|
|
35
43
|
{ id: "nav_teams", type: "object", label: "Teams", objectName: "sys_team", icon: "users-round" },
|
|
36
|
-
{ id: "
|
|
44
|
+
{ id: "nav_organizations", type: "object", label: "Organizations", objectName: "sys_organization", icon: "building-2" },
|
|
45
|
+
{ id: "nav_invitations", type: "object", label: "Invitations", objectName: "sys_invitation", icon: "mail" }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "group_access_control",
|
|
50
|
+
type: "group",
|
|
51
|
+
label: "Access Control",
|
|
52
|
+
icon: "shield",
|
|
53
|
+
children: [
|
|
54
|
+
// M10.30b: removed top-level User Permission Sets / Role Permission
|
|
55
|
+
// Sets entries — same M:N → parent-detail-tab argument as the
|
|
56
|
+
// People & Org cleanup.
|
|
37
57
|
{ id: "nav_roles", type: "object", label: "Roles", objectName: "sys_role", icon: "shield-check" },
|
|
38
58
|
{ id: "nav_permission_sets", type: "object", label: "Permission Sets", objectName: "sys_permission_set", icon: "lock" },
|
|
39
|
-
{ id: "
|
|
40
|
-
{ id: "
|
|
41
|
-
{ id: "
|
|
42
|
-
{ id: "nav_jwks", type: "object", label: "Signing Keys", objectName: "sys_jwks", icon: "key-round" }
|
|
59
|
+
{ id: "nav_sharing_rules", type: "object", label: "Sharing Rules", objectName: "sys_sharing_rule", icon: "share-2", requiresObject: "sys_sharing_rule" },
|
|
60
|
+
{ id: "nav_record_shares", type: "object", label: "Record Shares", objectName: "sys_record_share", icon: "link", requiresObject: "sys_record_share" },
|
|
61
|
+
{ id: "nav_api_keys", type: "object", label: "API Keys", objectName: "sys_api_key", icon: "key" }
|
|
43
62
|
]
|
|
44
63
|
},
|
|
45
64
|
{
|
|
46
|
-
id: "
|
|
65
|
+
id: "group_approvals",
|
|
47
66
|
type: "group",
|
|
48
|
-
label: "
|
|
49
|
-
icon: "
|
|
67
|
+
label: "Approvals",
|
|
68
|
+
icon: "check-circle",
|
|
50
69
|
children: [
|
|
51
|
-
{ id: "
|
|
52
|
-
{ id: "
|
|
53
|
-
{ id: "
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
{ id: "nav_approval_processes", type: "object", label: "Processes", objectName: "sys_approval_process", icon: "workflow", requiresObject: "sys_approval_process" },
|
|
71
|
+
{ id: "nav_approval_requests", type: "object", label: "Requests", objectName: "sys_approval_request", icon: "inbox", requiresObject: "sys_approval_request" },
|
|
72
|
+
{ id: "nav_approval_actions", type: "object", label: "Action History", objectName: "sys_approval_action", icon: "history", requiresObject: "sys_approval_action" }
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "group_configuration",
|
|
77
|
+
type: "group",
|
|
78
|
+
label: "Configuration",
|
|
79
|
+
icon: "sliders-horizontal",
|
|
80
|
+
children: [
|
|
81
|
+
// Metadata-driven settings hub. Each entry maps to a SettingsManifest
|
|
82
|
+
// namespace exposed by @objectstack/service-settings. URL navigation
|
|
83
|
+
// is used (not `object`) because settings are stored in a generic
|
|
84
|
+
// K/V table (`sys_setting`) rather than per-namespace objects, and
|
|
85
|
+
// the renderer is a dedicated <SettingsView> page in objectui.
|
|
86
|
+
{ id: "nav_settings_hub", type: "url", label: "All Settings", url: "/apps/setup/system/settings", icon: "settings-2" },
|
|
87
|
+
{ id: "nav_settings_mail", type: "url", label: "Email", url: "/apps/setup/system/settings/mail", icon: "mail" },
|
|
88
|
+
{ id: "nav_settings_branding", type: "url", label: "Branding", url: "/apps/setup/system/settings/branding", icon: "palette" },
|
|
89
|
+
{ id: "nav_settings_feature_flags", type: "url", label: "Feature Flags", url: "/apps/setup/system/settings/feature_flags", icon: "flag" }
|
|
60
90
|
]
|
|
61
91
|
},
|
|
62
92
|
{
|
|
63
|
-
id: "
|
|
93
|
+
id: "group_diagnostics",
|
|
64
94
|
type: "group",
|
|
65
|
-
label: "
|
|
66
|
-
icon: "
|
|
95
|
+
label: "Diagnostics",
|
|
96
|
+
icon: "stethoscope",
|
|
67
97
|
children: [
|
|
98
|
+
// Day-to-day observability surfaces. M10.30b removed `sys_activity`
|
|
99
|
+
// and `sys_comment` — both are CRM operational data authored from
|
|
100
|
+
// record pages, not platform admin surfaces.
|
|
68
101
|
{ id: "nav_sessions", type: "object", label: "Sessions", objectName: "sys_session", icon: "monitor" },
|
|
69
102
|
{ id: "nav_audit_logs", type: "object", label: "Audit Logs", objectName: "sys_audit_log", icon: "scroll-text" },
|
|
70
|
-
{ id: "
|
|
71
|
-
|
|
103
|
+
{ id: "nav_notifications", type: "object", label: "Notifications", objectName: "sys_notification", icon: "bell", requiresObject: "sys_notification" }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "group_advanced",
|
|
108
|
+
type: "group",
|
|
109
|
+
label: "Advanced",
|
|
110
|
+
icon: "wrench",
|
|
111
|
+
expanded: false,
|
|
112
|
+
children: [
|
|
113
|
+
// Better-auth internals — rarely useful for humans, but exposed
|
|
114
|
+
// so support engineers can inspect token state without dropping
|
|
115
|
+
// to SQL. The objectui sidebar collapses this group by default;
|
|
116
|
+
// edits should hit the read-only banner since these are all
|
|
117
|
+
// `managedBy: 'better-auth'`.
|
|
118
|
+
//
|
|
119
|
+
// M10.30b changes:
|
|
120
|
+
// - Removed the 3 OAuth satellite menus (access tokens / refresh
|
|
121
|
+
// tokens / consents). They live under their parent OAuth App.
|
|
122
|
+
// - Renamed "Linked Accounts" → "Identity Links" to distinguish
|
|
123
|
+
// from sys_user / org members.
|
|
124
|
+
// - Demoted "All Metadata" from the (now-deleted) Platform group
|
|
125
|
+
// to this Advanced/debug bucket.
|
|
126
|
+
// - The marketplace-only `sys_app` / `sys_package` /
|
|
127
|
+
// `sys_package_installation` menus have been removed entirely;
|
|
128
|
+
// they are contributed by `@objectstack/service-tenant`
|
|
129
|
+
// (control-plane) and are not present in single-project runtimes.
|
|
130
|
+
{ id: "nav_oauth_apps", type: "object", label: "OAuth Applications", objectName: "sys_oauth_application", icon: "app-window" },
|
|
131
|
+
{ id: "nav_jwks", type: "object", label: "Signing Keys (JWKS)", objectName: "sys_jwks", icon: "key-round" },
|
|
132
|
+
{ id: "nav_verifications", type: "object", label: "Verifications", objectName: "sys_verification", icon: "mail-check" },
|
|
133
|
+
{ id: "nav_two_factor", type: "object", label: "Two-Factor", objectName: "sys_two_factor", icon: "smartphone" },
|
|
134
|
+
{ id: "nav_device_codes", type: "object", label: "Device Codes", objectName: "sys_device_code", icon: "qr-code" },
|
|
135
|
+
{ id: "nav_accounts", type: "object", label: "Identity Links", objectName: "sys_account", icon: "link-2" },
|
|
136
|
+
{ id: "nav_user_preferences", type: "object", label: "User Preferences", objectName: "sys_user_preference", icon: "sliders" },
|
|
137
|
+
{ id: "nav_metadata", type: "object", label: "All Metadata", objectName: "sys_metadata", icon: "file-cog" }
|
|
72
138
|
]
|
|
73
139
|
}
|
|
74
140
|
]
|
|
75
141
|
};
|
|
76
|
-
|
|
77
|
-
// src/apps/views/users.view.ts
|
|
78
|
-
var UsersView = {
|
|
79
|
-
name: "users",
|
|
80
|
-
label: "Users",
|
|
81
|
-
type: "grid",
|
|
82
|
-
data: {
|
|
83
|
-
provider: "object",
|
|
84
|
-
object: "sys_user"
|
|
85
|
-
},
|
|
86
|
-
columns: [
|
|
87
|
-
{ field: "name", label: "Name", sortable: true },
|
|
88
|
-
{ field: "email", label: "Email", sortable: true },
|
|
89
|
-
{ field: "phone", label: "Phone" },
|
|
90
|
-
{ field: "status", label: "Status", sortable: true },
|
|
91
|
-
{ field: "active", label: "Active", sortable: true },
|
|
92
|
-
{ field: "created_at", label: "Created", sortable: true }
|
|
93
|
-
],
|
|
94
|
-
sort: [{ field: "created_at", order: "desc" }],
|
|
95
|
-
filter: [],
|
|
96
|
-
searchableFields: ["name", "email"],
|
|
97
|
-
pagination: {
|
|
98
|
-
pageSize: 20
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// src/apps/views/organizations.view.ts
|
|
103
|
-
var OrganizationsView = {
|
|
104
|
-
name: "organizations",
|
|
105
|
-
label: "Organizations",
|
|
106
|
-
type: "grid",
|
|
107
|
-
data: {
|
|
108
|
-
provider: "object",
|
|
109
|
-
object: "sys_organization"
|
|
110
|
-
},
|
|
111
|
-
columns: [
|
|
112
|
-
{ field: "name", label: "Name", sortable: true },
|
|
113
|
-
{ field: "status", label: "Status", sortable: true },
|
|
114
|
-
{ field: "plan_tier", label: "Plan Tier" },
|
|
115
|
-
{ field: "member_count", label: "Members" },
|
|
116
|
-
{ field: "created_at", label: "Created", sortable: true }
|
|
117
|
-
],
|
|
118
|
-
sort: [{ field: "created_at", order: "desc" }],
|
|
119
|
-
filter: [],
|
|
120
|
-
searchableFields: ["name"],
|
|
121
|
-
pagination: {
|
|
122
|
-
pageSize: 20
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
// src/apps/views/roles.view.ts
|
|
127
|
-
var RolesView = {
|
|
128
|
-
name: "roles",
|
|
129
|
-
label: "Roles",
|
|
130
|
-
type: "grid",
|
|
131
|
-
data: {
|
|
132
|
-
provider: "object",
|
|
133
|
-
object: "sys_role"
|
|
134
|
-
},
|
|
135
|
-
columns: [
|
|
136
|
-
{ field: "name", label: "Name", sortable: true },
|
|
137
|
-
{ field: "description", label: "Description" },
|
|
138
|
-
{ field: "is_system", label: "System Role" },
|
|
139
|
-
{ field: "created_at", label: "Created", sortable: true }
|
|
140
|
-
],
|
|
141
|
-
sort: [{ field: "created_at", order: "desc" }],
|
|
142
|
-
filter: [],
|
|
143
|
-
searchableFields: ["name", "description"],
|
|
144
|
-
pagination: {
|
|
145
|
-
pageSize: 20
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// src/apps/views/sessions.view.ts
|
|
150
|
-
var SessionsView = {
|
|
151
|
-
name: "sessions",
|
|
152
|
-
label: "Sessions",
|
|
153
|
-
type: "grid",
|
|
154
|
-
data: {
|
|
155
|
-
provider: "object",
|
|
156
|
-
object: "sys_session"
|
|
157
|
-
},
|
|
158
|
-
columns: [
|
|
159
|
-
{ field: "user_id", label: "User", sortable: true },
|
|
160
|
-
{ field: "ip_address", label: "IP Address" },
|
|
161
|
-
{ field: "created_at", label: "Created", sortable: true },
|
|
162
|
-
{ field: "expires_at", label: "Expires", sortable: true }
|
|
163
|
-
],
|
|
164
|
-
sort: [{ field: "created_at", order: "desc" }],
|
|
165
|
-
filter: [],
|
|
166
|
-
searchableFields: ["user_id"],
|
|
167
|
-
pagination: {
|
|
168
|
-
pageSize: 20
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// src/apps/views/audit_logs.view.ts
|
|
173
|
-
var AuditLogsView = {
|
|
174
|
-
name: "audit_logs",
|
|
175
|
-
label: "Audit Logs",
|
|
176
|
-
type: "grid",
|
|
177
|
-
data: {
|
|
178
|
-
provider: "object",
|
|
179
|
-
object: "sys_audit_log"
|
|
180
|
-
},
|
|
181
|
-
columns: [
|
|
182
|
-
{ field: "created_at", label: "Timestamp", sortable: true },
|
|
183
|
-
{ field: "action", label: "Action", sortable: true },
|
|
184
|
-
{ field: "user_id", label: "Actor" },
|
|
185
|
-
{ field: "object_name", label: "Object" },
|
|
186
|
-
{ field: "record_id", label: "Record ID" }
|
|
187
|
-
],
|
|
188
|
-
sort: [{ field: "created_at", order: "desc" }],
|
|
189
|
-
filter: [],
|
|
190
|
-
searchableFields: ["action", "object_name", "record_id"],
|
|
191
|
-
pagination: {
|
|
192
|
-
pageSize: 20
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
// src/apps/views/package_installations.view.ts
|
|
197
|
-
var PackageInstallationsView = {
|
|
198
|
-
name: "package_installations",
|
|
199
|
-
label: "Package Installations",
|
|
200
|
-
type: "grid",
|
|
201
|
-
data: {
|
|
202
|
-
provider: "object",
|
|
203
|
-
object: "sys_package_installation"
|
|
204
|
-
},
|
|
205
|
-
columns: [
|
|
206
|
-
{ field: "package_id", label: "Package", sortable: true },
|
|
207
|
-
{ field: "project_id", label: "Project", sortable: true },
|
|
208
|
-
{ field: "package_version_id", label: "Version" },
|
|
209
|
-
{ field: "status", label: "Status", sortable: true },
|
|
210
|
-
{ field: "installed_at", label: "Installed", sortable: true }
|
|
211
|
-
],
|
|
212
|
-
sort: [{ field: "installed_at", order: "desc" }],
|
|
213
|
-
filter: [],
|
|
214
|
-
searchableFields: ["package_id", "project_id"],
|
|
215
|
-
pagination: {
|
|
216
|
-
pageSize: 20
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
142
|
var SystemOverviewDashboard = Dashboard.create({
|
|
220
143
|
name: "system_overview",
|
|
221
144
|
label: "System Overview",
|
|
@@ -281,25 +204,29 @@ var SystemOverviewDashboard = Dashboard.create({
|
|
|
281
204
|
title: "Packages Installed",
|
|
282
205
|
type: "metric",
|
|
283
206
|
object: "sys_package_installation",
|
|
207
|
+
// Cloud-only object — only registered when service-tenant is loaded.
|
|
208
|
+
// Hide this widget gracefully in single-project runtimes.
|
|
209
|
+
requiresObject: "sys_package_installation",
|
|
284
210
|
layout: {
|
|
285
211
|
x: 9,
|
|
286
212
|
y: 0,
|
|
287
213
|
w: 3,
|
|
288
214
|
h: 2
|
|
289
215
|
},
|
|
290
|
-
filter: {
|
|
291
|
-
field: "status",
|
|
292
|
-
operator: "equals",
|
|
293
|
-
value: "installed"
|
|
294
|
-
},
|
|
216
|
+
filter: { status: "installed" },
|
|
295
217
|
aggregate: "count",
|
|
296
218
|
colorVariant: "success",
|
|
297
219
|
description: "Active package installations across projects"
|
|
298
220
|
},
|
|
299
|
-
// ── Audit Actions by Type
|
|
221
|
+
// ── Audit Actions by Type ───────────────────────────────────────
|
|
222
|
+
// Note: relative date filters like `NOW() - INTERVAL 7 DAY` are not
|
|
223
|
+
// currently substituted by the analytics layer (see
|
|
224
|
+
// service-analytics/strategies/filter-normalizer.ts). The dashboard's
|
|
225
|
+
// `globalFilters` date-range bar at the bottom is the supported way
|
|
226
|
+
// to scope this widget.
|
|
300
227
|
{
|
|
301
228
|
id: "widget_audit_actions",
|
|
302
|
-
title: "Audit Actions
|
|
229
|
+
title: "Audit Actions",
|
|
303
230
|
description: "Distribution of audit events by action type",
|
|
304
231
|
type: "pie",
|
|
305
232
|
object: "sys_audit_log",
|
|
@@ -310,12 +237,7 @@ var SystemOverviewDashboard = Dashboard.create({
|
|
|
310
237
|
h: 4
|
|
311
238
|
},
|
|
312
239
|
categoryField: "action",
|
|
313
|
-
aggregate: "count"
|
|
314
|
-
filter: {
|
|
315
|
-
field: "created_at",
|
|
316
|
-
operator: "gte",
|
|
317
|
-
value: "NOW() - INTERVAL 7 DAY"
|
|
318
|
-
}
|
|
240
|
+
aggregate: "count"
|
|
319
241
|
},
|
|
320
242
|
// ── Session Status Overview ─────────────────────────────────────
|
|
321
243
|
{
|
|
@@ -334,20 +256,27 @@ var SystemOverviewDashboard = Dashboard.create({
|
|
|
334
256
|
aggregate: "count"
|
|
335
257
|
},
|
|
336
258
|
// ── Recent Audit Log (Table) ────────────────────────────────────
|
|
259
|
+
// `type: 'table'` renders the underlying rows directly, so this
|
|
260
|
+
// panel actually shows the latest events instead of just repeating
|
|
261
|
+
// the total-count metric. `valueField`/`aggregate` are intentionally
|
|
262
|
+
// omitted — table widgets pull raw records.
|
|
337
263
|
{
|
|
338
264
|
id: "widget_recent_events",
|
|
339
265
|
title: "Recent Audit Events",
|
|
340
266
|
description: "Latest platform events",
|
|
341
|
-
type: "
|
|
267
|
+
type: "table",
|
|
342
268
|
object: "sys_audit_log",
|
|
343
269
|
layout: {
|
|
344
270
|
x: 0,
|
|
345
271
|
y: 6,
|
|
346
272
|
w: 12,
|
|
347
|
-
h:
|
|
273
|
+
h: 4
|
|
348
274
|
},
|
|
349
|
-
|
|
350
|
-
|
|
275
|
+
options: {
|
|
276
|
+
columns: ["created_at", "user_id", "action", "object_name", "record_id"],
|
|
277
|
+
sort: [{ field: "created_at", order: "desc" }],
|
|
278
|
+
pageSize: 20
|
|
279
|
+
}
|
|
351
280
|
}
|
|
352
281
|
],
|
|
353
282
|
globalFilters: [
|
|
@@ -368,10 +297,14 @@ var SecurityOverviewDashboard = Dashboard.create({
|
|
|
368
297
|
columns: 12,
|
|
369
298
|
gap: 4,
|
|
370
299
|
widgets: [
|
|
371
|
-
// ──
|
|
300
|
+
// ── Login Events Widget ─────────────────────────────────────────
|
|
301
|
+
// The `sys_audit_log.action` enum doesn't distinguish failed vs
|
|
302
|
+
// successful logins (both fold into `action='login'`). Surfacing a
|
|
303
|
+
// total Login Events count is honest; a "Failed Logins" widget will
|
|
304
|
+
// need a richer enum or a separate detail field first.
|
|
372
305
|
{
|
|
373
|
-
id: "
|
|
374
|
-
title: "
|
|
306
|
+
id: "widget_login_events",
|
|
307
|
+
title: "Login Events",
|
|
375
308
|
type: "metric",
|
|
376
309
|
object: "sys_audit_log",
|
|
377
310
|
layout: {
|
|
@@ -380,14 +313,10 @@ var SecurityOverviewDashboard = Dashboard.create({
|
|
|
380
313
|
w: 3,
|
|
381
314
|
h: 2
|
|
382
315
|
},
|
|
383
|
-
filter: {
|
|
384
|
-
field: "action",
|
|
385
|
-
operator: "equals",
|
|
386
|
-
value: "login"
|
|
387
|
-
},
|
|
316
|
+
filter: { action: "login" },
|
|
388
317
|
aggregate: "count",
|
|
389
|
-
colorVariant: "
|
|
390
|
-
description: "
|
|
318
|
+
colorVariant: "blue",
|
|
319
|
+
description: "Authentication events recorded by the audit log"
|
|
391
320
|
},
|
|
392
321
|
// ── Permission Changes Widget ───────────────────────────────────
|
|
393
322
|
{
|
|
@@ -401,11 +330,7 @@ var SecurityOverviewDashboard = Dashboard.create({
|
|
|
401
330
|
w: 3,
|
|
402
331
|
h: 2
|
|
403
332
|
},
|
|
404
|
-
filter: {
|
|
405
|
-
field: "action",
|
|
406
|
-
operator: "equals",
|
|
407
|
-
value: "permission_change"
|
|
408
|
-
},
|
|
333
|
+
filter: { action: "permission_change" },
|
|
409
334
|
aggregate: "count",
|
|
410
335
|
colorVariant: "warning",
|
|
411
336
|
description: "Recent permission and role modifications"
|
|
@@ -422,11 +347,7 @@ var SecurityOverviewDashboard = Dashboard.create({
|
|
|
422
347
|
w: 3,
|
|
423
348
|
h: 2
|
|
424
349
|
},
|
|
425
|
-
filter: {
|
|
426
|
-
field: "action",
|
|
427
|
-
operator: "equals",
|
|
428
|
-
value: "config_change"
|
|
429
|
-
},
|
|
350
|
+
filter: { action: "config_change" },
|
|
430
351
|
aggregate: "count",
|
|
431
352
|
colorVariant: "blue",
|
|
432
353
|
description: "System configuration modifications"
|
|
@@ -480,20 +401,27 @@ var SecurityOverviewDashboard = Dashboard.create({
|
|
|
480
401
|
aggregate: "count"
|
|
481
402
|
},
|
|
482
403
|
// ── Recent Security Events (Table) ──────────────────────────────
|
|
404
|
+
// Real table widget — pulls the latest permission/config rows.
|
|
483
405
|
{
|
|
484
406
|
id: "widget_recent_security_events",
|
|
485
407
|
title: "Recent Security Events",
|
|
486
408
|
description: "Latest permission and config changes",
|
|
487
|
-
type: "
|
|
409
|
+
type: "table",
|
|
488
410
|
object: "sys_audit_log",
|
|
489
411
|
layout: {
|
|
490
412
|
x: 0,
|
|
491
413
|
y: 6,
|
|
492
414
|
w: 12,
|
|
493
|
-
h:
|
|
415
|
+
h: 4
|
|
494
416
|
},
|
|
495
|
-
|
|
496
|
-
|
|
417
|
+
filter: {
|
|
418
|
+
action: { $in: ["login", "logout", "permission_change", "config_change"] }
|
|
419
|
+
},
|
|
420
|
+
options: {
|
|
421
|
+
columns: ["created_at", "user_id", "action", "object_name", "record_id"],
|
|
422
|
+
sort: [{ field: "created_at", order: "desc" }],
|
|
423
|
+
pageSize: 20
|
|
424
|
+
}
|
|
497
425
|
}
|
|
498
426
|
],
|
|
499
427
|
globalFilters: [
|
|
@@ -507,6 +435,6 @@ var SecurityOverviewDashboard = Dashboard.create({
|
|
|
507
435
|
]
|
|
508
436
|
});
|
|
509
437
|
|
|
510
|
-
export {
|
|
438
|
+
export { SETUP_APP, SecurityOverviewDashboard, SystemOverviewDashboard };
|
|
511
439
|
//# sourceMappingURL=index.mjs.map
|
|
512
440
|
//# sourceMappingURL=index.mjs.map
|