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