@objectstack/platform-objects 0.1.0 → 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 -215
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/index.mjs +140 -210
- package/dist/apps/index.mjs.map +1 -1
- package/dist/audit/index.d.mts +40249 -150
- package/dist/audit/index.d.ts +40249 -150
- 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 +18792 -2520
- package/dist/identity/index.d.ts +18792 -2520
- package/dist/identity/index.js +1107 -6
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/index.mjs +1106 -7
- package/dist/identity/index.mjs.map +1 -1
- package/dist/index.d.mts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +3939 -1504
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3917 -1487
- 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 +1426 -19092
- package/dist/metadata/index.d.ts +1426 -19092
- 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 +10759 -60
- package/dist/security/index.d.ts +10759 -60
- package/dist/security/index.js +786 -0
- package/dist/security/index.js.map +1 -1
- package/dist/security/index.mjs +782 -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 -16454
- package/dist/tenant/index.d.ts +0 -16454
- 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,195 +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: "
|
|
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" }
|
|
43
64
|
]
|
|
44
65
|
},
|
|
45
66
|
{
|
|
46
|
-
id: "
|
|
67
|
+
id: "group_approvals",
|
|
47
68
|
type: "group",
|
|
48
|
-
label: "
|
|
49
|
-
icon: "
|
|
69
|
+
label: "Approvals",
|
|
70
|
+
icon: "check-circle",
|
|
50
71
|
children: [
|
|
51
|
-
{ id: "
|
|
52
|
-
{ id: "
|
|
53
|
-
{ id: "
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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" }
|
|
60
92
|
]
|
|
61
93
|
},
|
|
62
94
|
{
|
|
63
|
-
id: "
|
|
95
|
+
id: "group_diagnostics",
|
|
64
96
|
type: "group",
|
|
65
|
-
label: "
|
|
66
|
-
icon: "
|
|
97
|
+
label: "Diagnostics",
|
|
98
|
+
icon: "stethoscope",
|
|
67
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.
|
|
68
103
|
{ id: "nav_sessions", type: "object", label: "Sessions", objectName: "sys_session", icon: "monitor" },
|
|
69
104
|
{ id: "nav_audit_logs", type: "object", label: "Audit Logs", objectName: "sys_audit_log", icon: "scroll-text" },
|
|
70
|
-
{ id: "
|
|
71
|
-
|
|
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" }
|
|
72
140
|
]
|
|
73
141
|
}
|
|
74
142
|
]
|
|
75
143
|
};
|
|
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
144
|
var SystemOverviewDashboard = ui.Dashboard.create({
|
|
220
145
|
name: "system_overview",
|
|
221
146
|
label: "System Overview",
|
|
@@ -281,25 +206,29 @@ var SystemOverviewDashboard = ui.Dashboard.create({
|
|
|
281
206
|
title: "Packages Installed",
|
|
282
207
|
type: "metric",
|
|
283
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",
|
|
284
212
|
layout: {
|
|
285
213
|
x: 9,
|
|
286
214
|
y: 0,
|
|
287
215
|
w: 3,
|
|
288
216
|
h: 2
|
|
289
217
|
},
|
|
290
|
-
filter: {
|
|
291
|
-
field: "status",
|
|
292
|
-
operator: "equals",
|
|
293
|
-
value: "installed"
|
|
294
|
-
},
|
|
218
|
+
filter: { status: "installed" },
|
|
295
219
|
aggregate: "count",
|
|
296
220
|
colorVariant: "success",
|
|
297
221
|
description: "Active package installations across projects"
|
|
298
222
|
},
|
|
299
|
-
// ── 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.
|
|
300
229
|
{
|
|
301
230
|
id: "widget_audit_actions",
|
|
302
|
-
title: "Audit Actions
|
|
231
|
+
title: "Audit Actions",
|
|
303
232
|
description: "Distribution of audit events by action type",
|
|
304
233
|
type: "pie",
|
|
305
234
|
object: "sys_audit_log",
|
|
@@ -310,12 +239,7 @@ var SystemOverviewDashboard = ui.Dashboard.create({
|
|
|
310
239
|
h: 4
|
|
311
240
|
},
|
|
312
241
|
categoryField: "action",
|
|
313
|
-
aggregate: "count"
|
|
314
|
-
filter: {
|
|
315
|
-
field: "created_at",
|
|
316
|
-
operator: "gte",
|
|
317
|
-
value: "NOW() - INTERVAL 7 DAY"
|
|
318
|
-
}
|
|
242
|
+
aggregate: "count"
|
|
319
243
|
},
|
|
320
244
|
// ── Session Status Overview ─────────────────────────────────────
|
|
321
245
|
{
|
|
@@ -334,20 +258,27 @@ var SystemOverviewDashboard = ui.Dashboard.create({
|
|
|
334
258
|
aggregate: "count"
|
|
335
259
|
},
|
|
336
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.
|
|
337
265
|
{
|
|
338
266
|
id: "widget_recent_events",
|
|
339
267
|
title: "Recent Audit Events",
|
|
340
268
|
description: "Latest platform events",
|
|
341
|
-
type: "
|
|
269
|
+
type: "table",
|
|
342
270
|
object: "sys_audit_log",
|
|
343
271
|
layout: {
|
|
344
272
|
x: 0,
|
|
345
273
|
y: 6,
|
|
346
274
|
w: 12,
|
|
347
|
-
h:
|
|
275
|
+
h: 4
|
|
348
276
|
},
|
|
349
|
-
|
|
350
|
-
|
|
277
|
+
options: {
|
|
278
|
+
columns: ["created_at", "user_id", "action", "object_name", "record_id"],
|
|
279
|
+
sort: [{ field: "created_at", order: "desc" }],
|
|
280
|
+
pageSize: 20
|
|
281
|
+
}
|
|
351
282
|
}
|
|
352
283
|
],
|
|
353
284
|
globalFilters: [
|
|
@@ -368,10 +299,14 @@ var SecurityOverviewDashboard = ui.Dashboard.create({
|
|
|
368
299
|
columns: 12,
|
|
369
300
|
gap: 4,
|
|
370
301
|
widgets: [
|
|
371
|
-
// ──
|
|
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.
|
|
372
307
|
{
|
|
373
|
-
id: "
|
|
374
|
-
title: "
|
|
308
|
+
id: "widget_login_events",
|
|
309
|
+
title: "Login Events",
|
|
375
310
|
type: "metric",
|
|
376
311
|
object: "sys_audit_log",
|
|
377
312
|
layout: {
|
|
@@ -380,14 +315,10 @@ var SecurityOverviewDashboard = ui.Dashboard.create({
|
|
|
380
315
|
w: 3,
|
|
381
316
|
h: 2
|
|
382
317
|
},
|
|
383
|
-
filter: {
|
|
384
|
-
field: "action",
|
|
385
|
-
operator: "equals",
|
|
386
|
-
value: "login"
|
|
387
|
-
},
|
|
318
|
+
filter: { action: "login" },
|
|
388
319
|
aggregate: "count",
|
|
389
|
-
colorVariant: "
|
|
390
|
-
description: "
|
|
320
|
+
colorVariant: "blue",
|
|
321
|
+
description: "Authentication events recorded by the audit log"
|
|
391
322
|
},
|
|
392
323
|
// ── Permission Changes Widget ───────────────────────────────────
|
|
393
324
|
{
|
|
@@ -401,11 +332,7 @@ var SecurityOverviewDashboard = ui.Dashboard.create({
|
|
|
401
332
|
w: 3,
|
|
402
333
|
h: 2
|
|
403
334
|
},
|
|
404
|
-
filter: {
|
|
405
|
-
field: "action",
|
|
406
|
-
operator: "equals",
|
|
407
|
-
value: "permission_change"
|
|
408
|
-
},
|
|
335
|
+
filter: { action: "permission_change" },
|
|
409
336
|
aggregate: "count",
|
|
410
337
|
colorVariant: "warning",
|
|
411
338
|
description: "Recent permission and role modifications"
|
|
@@ -422,11 +349,7 @@ var SecurityOverviewDashboard = ui.Dashboard.create({
|
|
|
422
349
|
w: 3,
|
|
423
350
|
h: 2
|
|
424
351
|
},
|
|
425
|
-
filter: {
|
|
426
|
-
field: "action",
|
|
427
|
-
operator: "equals",
|
|
428
|
-
value: "config_change"
|
|
429
|
-
},
|
|
352
|
+
filter: { action: "config_change" },
|
|
430
353
|
aggregate: "count",
|
|
431
354
|
colorVariant: "blue",
|
|
432
355
|
description: "System configuration modifications"
|
|
@@ -480,20 +403,27 @@ var SecurityOverviewDashboard = ui.Dashboard.create({
|
|
|
480
403
|
aggregate: "count"
|
|
481
404
|
},
|
|
482
405
|
// ── Recent Security Events (Table) ──────────────────────────────
|
|
406
|
+
// Real table widget — pulls the latest permission/config rows.
|
|
483
407
|
{
|
|
484
408
|
id: "widget_recent_security_events",
|
|
485
409
|
title: "Recent Security Events",
|
|
486
410
|
description: "Latest permission and config changes",
|
|
487
|
-
type: "
|
|
411
|
+
type: "table",
|
|
488
412
|
object: "sys_audit_log",
|
|
489
413
|
layout: {
|
|
490
414
|
x: 0,
|
|
491
415
|
y: 6,
|
|
492
416
|
w: 12,
|
|
493
|
-
h:
|
|
417
|
+
h: 4
|
|
494
418
|
},
|
|
495
|
-
|
|
496
|
-
|
|
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
|
+
}
|
|
497
427
|
}
|
|
498
428
|
],
|
|
499
429
|
globalFilters: [
|
|
@@ -507,14 +437,8 @@ var SecurityOverviewDashboard = ui.Dashboard.create({
|
|
|
507
437
|
]
|
|
508
438
|
});
|
|
509
439
|
|
|
510
|
-
exports.AuditLogsView = AuditLogsView;
|
|
511
|
-
exports.OrganizationsView = OrganizationsView;
|
|
512
|
-
exports.PackageInstallationsView = PackageInstallationsView;
|
|
513
|
-
exports.RolesView = RolesView;
|
|
514
440
|
exports.SETUP_APP = SETUP_APP;
|
|
515
441
|
exports.SecurityOverviewDashboard = SecurityOverviewDashboard;
|
|
516
|
-
exports.SessionsView = SessionsView;
|
|
517
442
|
exports.SystemOverviewDashboard = SystemOverviewDashboard;
|
|
518
|
-
exports.UsersView = UsersView;
|
|
519
443
|
//# sourceMappingURL=index.js.map
|
|
520
444
|
//# sourceMappingURL=index.js.map
|