@burdenoff/microfe-vibecontrols 2026.531.10 → 2026.531.12
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.
|
@@ -16,13 +16,13 @@ import { Suspense as m, lazy as h, useCallback as g, useMemo as _, useState as v
|
|
|
16
16
|
import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
17
|
import { Download as b, Printer as x } from "lucide-react";
|
|
18
18
|
import { usePermissions as S } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
19
|
-
import {
|
|
20
|
-
import { MotionPage as
|
|
19
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
20
|
+
import { MotionPage as E } from "@burdenoff/fe-libs/shared/motion";
|
|
21
21
|
//#region src/pages/AnalyticsPage.tsx
|
|
22
|
-
var
|
|
22
|
+
var D = h(() => import("../components/analytics/AnalyticsTimeSeriesChart.js").then((e) => ({ default: e.AnalyticsTimeSeriesChart }))), O = h(() => import("../components/analytics/AnalyticsBreakdownChart.js").then((e) => ({ default: e.AnalyticsBreakdownChart }))), k = () => /* @__PURE__ */ w("div", {
|
|
23
23
|
className: "bg-bg-surface border border-border-default rounded-lg p-4",
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
}),
|
|
24
|
+
children: /* @__PURE__ */ w(a, { height: "h-40" })
|
|
25
|
+
}), ee = [
|
|
26
26
|
"overview",
|
|
27
27
|
"agents",
|
|
28
28
|
"sessions",
|
|
@@ -40,7 +40,7 @@ var E = h(() => import("../components/analytics/AnalyticsTimeSeriesChart.js").th
|
|
|
40
40
|
warning: "var(--color-status-warning-text)"
|
|
41
41
|
};
|
|
42
42
|
function j() {
|
|
43
|
-
let { workspaceId: a } = t(), { t: h } = y(), j = n(), { hasPermission: I, isLoading: L } = S(), [R, z] = v("LAST_7D"), [B, V] = v("DAY"), [H, U] = o(
|
|
43
|
+
let { workspaceId: a } = t(), { t: h } = y(), j = n(), { hasPermission: I, isLoading: L } = S(), [R, z] = v("LAST_7D"), [B, V] = v("DAY"), [H, U] = o(ee, "overview"), W = g((e, t) => {
|
|
44
44
|
let n = h(e);
|
|
45
45
|
return n === e ? t : n;
|
|
46
46
|
}, [h]), { startDate: G, endDate: K } = _(() => c(R), [R]), q = _(() => s(H), [H]), { data: J, loading: Y, error: X, refetch: Z } = e({
|
|
@@ -56,41 +56,72 @@ function j() {
|
|
|
56
56
|
skip: !a
|
|
57
57
|
}), Q = J?.vibecontrolsAnalytics, $ = g(() => {
|
|
58
58
|
Z();
|
|
59
|
-
}, [Z]),
|
|
59
|
+
}, [Z]), te = g(() => {
|
|
60
60
|
typeof window < "u" && window.print();
|
|
61
|
-
}, []),
|
|
61
|
+
}, []), ne = g(() => {
|
|
62
62
|
if (!Q) return;
|
|
63
63
|
let e = F(H, Q);
|
|
64
64
|
if (e.length === 0) return;
|
|
65
65
|
let t = P(e), n = new Blob([t], { type: "text/csv;charset=utf-8;" }), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
66
66
|
i.href = r, i.download = `vibecontrols-analytics-${H}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
|
|
67
|
-
}, [Q, H]),
|
|
67
|
+
}, [Q, H]), re = g((e) => {
|
|
68
68
|
j(e);
|
|
69
69
|
}, [j]);
|
|
70
|
-
|
|
70
|
+
if (L) return /* @__PURE__ */ w("div", {
|
|
71
71
|
className: "flex items-center justify-center min-h-[400px]",
|
|
72
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ w("p", {
|
|
73
73
|
className: "text-text-secondary",
|
|
74
74
|
children: "Loading permissions…"
|
|
75
75
|
})
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
});
|
|
77
|
+
if (!I(i.ANALYTICS_READ)) return /* @__PURE__ */ w("div", {
|
|
78
|
+
className: "flex items-center justify-center min-h-[400px]",
|
|
79
|
+
children: /* @__PURE__ */ T("div", {
|
|
80
|
+
className: "text-center space-y-2",
|
|
81
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
82
|
+
className: "text-lg font-semibold text-foreground",
|
|
83
|
+
children: "Access Denied"
|
|
84
|
+
}), /* @__PURE__ */ w("p", {
|
|
85
|
+
className: "text-sm text-text-secondary",
|
|
86
|
+
children: "You don't have permission to access this page."
|
|
85
87
|
})]
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
if (!a) return /* @__PURE__ */ T(E, {
|
|
91
|
+
className: "min-h-screen space-y-6 bg-bg-surface p-4 sm:p-6",
|
|
92
|
+
children: [/* @__PURE__ */ w(r, { title: W("nav.analytics", "Analytics") }), /* @__PURE__ */ w("div", {
|
|
93
|
+
className: "text-sm text-text-secondary",
|
|
94
|
+
children: "Waiting for workspace context…"
|
|
86
95
|
})]
|
|
87
|
-
})
|
|
96
|
+
});
|
|
97
|
+
if (X && !Q) {
|
|
98
|
+
let e = X.message ?? "", t = e.includes("upstream connect error") || e.includes("Connection refused") || e.includes("disconnect/reset before headers") || e.includes("Unexpected response");
|
|
99
|
+
return /* @__PURE__ */ T(E, {
|
|
100
|
+
className: "min-h-screen space-y-6 bg-bg-surface p-4 sm:p-6",
|
|
101
|
+
children: [/* @__PURE__ */ w(r, { title: W("nav.analytics", "Analytics") }), /* @__PURE__ */ T("div", {
|
|
102
|
+
className: "space-y-3 rounded-lg border border-status-warning-border bg-status-warning-bg/10 p-4 text-sm text-text-primary",
|
|
103
|
+
children: [t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("p", {
|
|
104
|
+
className: "font-medium",
|
|
105
|
+
children: W("analyticsPage.transientUnavailable", "Analytics service is temporarily unreachable")
|
|
106
|
+
}), /* @__PURE__ */ w("p", {
|
|
107
|
+
className: "text-xs text-text-secondary",
|
|
108
|
+
children: W("analyticsPage.transientHint", "The svc is most likely rolling — give it a few seconds and retry. Other VibeControls surfaces are unaffected.")
|
|
109
|
+
})] }) : /* @__PURE__ */ T("p", { children: ["Failed to load analytics: ", X.message] }), /* @__PURE__ */ w("button", {
|
|
110
|
+
type: "button",
|
|
111
|
+
onClick: $,
|
|
112
|
+
className: "rounded-md bg-status-warning-bg/20 px-3 py-1.5 text-xs font-medium transition-colors hover:bg-status-warning-bg/30",
|
|
113
|
+
children: W("analyticsPage.retry", "Retry")
|
|
114
|
+
})]
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return /* @__PURE__ */ T(E, {
|
|
88
119
|
className: "min-h-screen space-y-4 bg-bg-surface p-4 sm:p-6 vc-printable",
|
|
89
120
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ w(r, { title: W("nav.analytics", "Analytics") }),
|
|
122
|
+
/* @__PURE__ */ w("div", {
|
|
92
123
|
"data-tour": "analytics-filter-bar",
|
|
93
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ w(l, {
|
|
94
125
|
timeRange: R,
|
|
95
126
|
granularity: B,
|
|
96
127
|
onTimeRangeChange: z,
|
|
@@ -101,48 +132,48 @@ function j() {
|
|
|
101
132
|
cached: Q?.cached
|
|
102
133
|
})
|
|
103
134
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ w("div", {
|
|
105
136
|
"data-tour": "analytics-entity-tabs",
|
|
106
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ w(f, {
|
|
107
138
|
activeTab: H,
|
|
108
139
|
onTabChange: U
|
|
109
140
|
})
|
|
110
141
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ T("div", {
|
|
112
143
|
"data-tour": "analytics-export-print-actions",
|
|
113
144
|
className: "flex flex-wrap items-center justify-end gap-2 vc-print-hide",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ T("button", {
|
|
115
146
|
type: "button",
|
|
116
|
-
onClick:
|
|
147
|
+
onClick: ne,
|
|
117
148
|
disabled: Y || !Q,
|
|
118
149
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-default px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
119
150
|
title: W("analytics.exportCsvTitle", "Export current tab as CSV"),
|
|
120
|
-
children: [/* @__PURE__ */
|
|
121
|
-
}), /* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ w(b, { size: 14 }), W("analytics.exportCsv", "Export CSV")]
|
|
152
|
+
}), /* @__PURE__ */ T("button", {
|
|
122
153
|
type: "button",
|
|
123
|
-
onClick:
|
|
154
|
+
onClick: te,
|
|
124
155
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-default px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
125
156
|
title: W("analytics.printTitle", "Print this report"),
|
|
126
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ w(x, { size: 14 }), W("analytics.print", "Print")]
|
|
127
158
|
})]
|
|
128
159
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
fallback: /* @__PURE__ */
|
|
131
|
-
children: /* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ w(m, {
|
|
161
|
+
fallback: /* @__PURE__ */ w(k, {}),
|
|
162
|
+
children: /* @__PURE__ */ T("section", {
|
|
132
163
|
id: `analytics-panel-${H}`,
|
|
133
164
|
role: "tabpanel",
|
|
134
165
|
"aria-labelledby": `analytics-tab-${H}`,
|
|
135
166
|
className: "space-y-4",
|
|
136
167
|
children: [
|
|
137
|
-
H === "overview" ? /* @__PURE__ */
|
|
168
|
+
H === "overview" ? /* @__PURE__ */ T("div", {
|
|
138
169
|
className: "space-y-4",
|
|
139
170
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ w(u, {
|
|
141
172
|
data: Q,
|
|
142
173
|
loading: Y,
|
|
143
|
-
onCardClick:
|
|
174
|
+
onCardClick: re
|
|
144
175
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ w(D, {
|
|
146
177
|
title: "Activity Over Time",
|
|
147
178
|
datasets: [
|
|
148
179
|
{
|
|
@@ -167,46 +198,46 @@ function j() {
|
|
|
167
198
|
}
|
|
168
199
|
]
|
|
169
200
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ T("div", {
|
|
171
202
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ w(O, {
|
|
173
204
|
title: "Sessions by Status",
|
|
174
205
|
data: Q?.sessions?.byStatus
|
|
175
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ w(O, {
|
|
176
207
|
title: "Vibes by Status",
|
|
177
208
|
data: Q?.vibes?.byStatus
|
|
178
209
|
})]
|
|
179
210
|
})
|
|
180
211
|
]
|
|
181
212
|
}) : null,
|
|
182
|
-
H === "agents" && Q?.agents ? /* @__PURE__ */
|
|
213
|
+
H === "agents" && Q?.agents ? /* @__PURE__ */ T("div", {
|
|
183
214
|
className: "space-y-4",
|
|
184
215
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ T("div", {
|
|
186
217
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
187
218
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ w(M, {
|
|
189
220
|
label: "Total",
|
|
190
221
|
value: Q.agents.total
|
|
191
222
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ w(M, {
|
|
193
224
|
label: "Active",
|
|
194
225
|
value: Q.agents.active,
|
|
195
226
|
variant: "success"
|
|
196
227
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ w(M, {
|
|
198
229
|
label: "Inactive",
|
|
199
230
|
value: Q.agents.inactive,
|
|
200
231
|
variant: "warning"
|
|
201
232
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ w(M, {
|
|
203
234
|
label: "Stale Heartbeat",
|
|
204
235
|
value: Q.agents.staleHeartbeatCount,
|
|
205
236
|
variant: "error"
|
|
206
237
|
})
|
|
207
238
|
]
|
|
208
239
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ w(D, {
|
|
210
241
|
title: "Agents Created Over Time",
|
|
211
242
|
datasets: [{
|
|
212
243
|
label: "Agents",
|
|
@@ -215,13 +246,13 @@ function j() {
|
|
|
215
246
|
}],
|
|
216
247
|
height: 250
|
|
217
248
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ T("div", {
|
|
219
250
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ w(d, {
|
|
221
252
|
title: "By Platform",
|
|
222
253
|
data: Q.agents.byPlatform,
|
|
223
254
|
keyLabel: "Platform"
|
|
224
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ w(d, {
|
|
225
256
|
title: "By Architecture",
|
|
226
257
|
data: Q.agents.byArchitecture,
|
|
227
258
|
keyLabel: "Architecture"
|
|
@@ -229,43 +260,43 @@ function j() {
|
|
|
229
260
|
})
|
|
230
261
|
]
|
|
231
262
|
}) : null,
|
|
232
|
-
H === "sessions" && Q?.sessions ? /* @__PURE__ */
|
|
263
|
+
H === "sessions" && Q?.sessions ? /* @__PURE__ */ T("div", {
|
|
233
264
|
className: "space-y-4",
|
|
234
265
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ T("div", {
|
|
236
267
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
237
268
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ w(M, {
|
|
239
270
|
label: "Total",
|
|
240
271
|
value: Q.sessions.total
|
|
241
272
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ w(M, {
|
|
243
274
|
label: "Running",
|
|
244
275
|
value: Q.sessions.active,
|
|
245
276
|
variant: "success"
|
|
246
277
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ w(M, {
|
|
248
279
|
label: "Collaborators",
|
|
249
280
|
value: Q.sessions.totalCollaborators
|
|
250
281
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ w(M, {
|
|
252
283
|
label: "Shares",
|
|
253
284
|
value: Q.sessions.totalShares + Q.sessions.totalShareLinks
|
|
254
285
|
})
|
|
255
286
|
]
|
|
256
287
|
}),
|
|
257
|
-
Q.sessions.avgDurationMs == null ? null : /* @__PURE__ */
|
|
288
|
+
Q.sessions.avgDurationMs == null ? null : /* @__PURE__ */ T("div", {
|
|
258
289
|
className: "text-sm text-text-secondary",
|
|
259
290
|
children: [
|
|
260
291
|
"Average duration:",
|
|
261
292
|
" ",
|
|
262
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ w("span", {
|
|
263
294
|
className: "font-medium text-text-primary",
|
|
264
295
|
children: N(Q.sessions.avgDurationMs)
|
|
265
296
|
})
|
|
266
297
|
]
|
|
267
298
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ w(D, {
|
|
269
300
|
title: "Sessions Created Over Time",
|
|
270
301
|
datasets: [{
|
|
271
302
|
label: "Sessions",
|
|
@@ -274,12 +305,12 @@ function j() {
|
|
|
274
305
|
}],
|
|
275
306
|
height: 250
|
|
276
307
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ T("div", {
|
|
278
309
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ w(O, {
|
|
280
311
|
title: "Sessions by Type",
|
|
281
312
|
data: Q.sessions.byType
|
|
282
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ w(d, {
|
|
283
314
|
title: "Sessions by Status",
|
|
284
315
|
data: Q.sessions.byStatus,
|
|
285
316
|
keyLabel: "Status"
|
|
@@ -287,29 +318,29 @@ function j() {
|
|
|
287
318
|
})
|
|
288
319
|
]
|
|
289
320
|
}) : null,
|
|
290
|
-
H === "sandbox" ? /* @__PURE__ */
|
|
291
|
-
H === "vibes" && Q?.vibes ? /* @__PURE__ */
|
|
321
|
+
H === "sandbox" ? /* @__PURE__ */ w(p, {}) : null,
|
|
322
|
+
H === "vibes" && Q?.vibes ? /* @__PURE__ */ T("div", {
|
|
292
323
|
className: "space-y-4",
|
|
293
324
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ T("div", {
|
|
295
326
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
296
327
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ w(M, {
|
|
298
329
|
label: "Total",
|
|
299
330
|
value: Q.vibes.total
|
|
300
331
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ w(M, {
|
|
302
333
|
label: "With Agent",
|
|
303
334
|
value: Q.vibes.withAgent,
|
|
304
335
|
variant: "success"
|
|
305
336
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ w(M, {
|
|
307
338
|
label: "Without Agent",
|
|
308
339
|
value: Q.vibes.withoutAgent
|
|
309
340
|
})
|
|
310
341
|
]
|
|
311
342
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ w(D, {
|
|
313
344
|
title: "Vibes Created Over Time",
|
|
314
345
|
datasets: [{
|
|
315
346
|
label: "Vibes",
|
|
@@ -318,44 +349,44 @@ function j() {
|
|
|
318
349
|
}],
|
|
319
350
|
height: 250
|
|
320
351
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ T("div", {
|
|
322
353
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ w(O, {
|
|
324
355
|
title: "Vibes by Type",
|
|
325
356
|
data: Q.vibes.byType
|
|
326
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ w(O, {
|
|
327
358
|
title: "Vibes by Status",
|
|
328
359
|
data: Q.vibes.byStatus
|
|
329
360
|
})]
|
|
330
361
|
})
|
|
331
362
|
]
|
|
332
363
|
}) : null,
|
|
333
|
-
H === "actions" && Q?.actions ? /* @__PURE__ */
|
|
364
|
+
H === "actions" && Q?.actions ? /* @__PURE__ */ T("div", {
|
|
334
365
|
className: "space-y-4",
|
|
335
366
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ T("div", {
|
|
337
368
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
338
369
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ w(M, {
|
|
340
371
|
label: "Total Actions",
|
|
341
372
|
value: Q.actions.total
|
|
342
373
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ w(M, {
|
|
344
375
|
label: "Executions",
|
|
345
376
|
value: Q.actions.totalExecutions
|
|
346
377
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ w(M, {
|
|
348
379
|
label: "Success Rate",
|
|
349
380
|
value: Q.actions.successRate == null ? "N/A" : `${Q.actions.successRate.toFixed(1)}%`,
|
|
350
381
|
variant: Q.actions.successRate != null && Q.actions.successRate >= 90 ? "success" : "warning"
|
|
351
382
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ w(M, {
|
|
353
384
|
label: "Avg Duration",
|
|
354
385
|
value: Q.actions.avgDurationMs == null ? "N/A" : N(Q.actions.avgDurationMs)
|
|
355
386
|
})
|
|
356
387
|
]
|
|
357
388
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ w(D, {
|
|
359
390
|
title: "Executions Over Time",
|
|
360
391
|
datasets: [{
|
|
361
392
|
label: "Executions",
|
|
@@ -364,23 +395,23 @@ function j() {
|
|
|
364
395
|
}],
|
|
365
396
|
height: 250
|
|
366
397
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ T("div", {
|
|
368
399
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ w(O, {
|
|
370
401
|
title: "By Action Type",
|
|
371
402
|
data: Q.actions.byActionType
|
|
372
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ w(O, {
|
|
373
404
|
title: "Execution Status",
|
|
374
405
|
data: Q.actions.executionsByStatus
|
|
375
406
|
})]
|
|
376
407
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ T("div", {
|
|
378
409
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ w(d, {
|
|
380
411
|
title: "By Trigger Type",
|
|
381
412
|
data: Q.actions.byTriggerType,
|
|
382
413
|
keyLabel: "Trigger"
|
|
383
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ w(d, {
|
|
384
415
|
title: "By Source Type",
|
|
385
416
|
data: Q.actions.bySourceType,
|
|
386
417
|
keyLabel: "Source"
|
|
@@ -388,30 +419,30 @@ function j() {
|
|
|
388
419
|
})
|
|
389
420
|
]
|
|
390
421
|
}) : null,
|
|
391
|
-
H === "vibedecks" && Q?.vibeDecks ? /* @__PURE__ */
|
|
422
|
+
H === "vibedecks" && Q?.vibeDecks ? /* @__PURE__ */ T("div", {
|
|
392
423
|
className: "space-y-4",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ T("div", {
|
|
394
425
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ w(M, {
|
|
396
427
|
label: "Decks",
|
|
397
428
|
value: Q.vibeDecks.totalDecks
|
|
398
|
-
}), /* @__PURE__ */
|
|
429
|
+
}), /* @__PURE__ */ w(M, {
|
|
399
430
|
label: "Buttons",
|
|
400
431
|
value: Q.vibeDecks.totalButtons
|
|
401
432
|
})]
|
|
402
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ w(O, {
|
|
403
434
|
title: "Buttons by Action Type",
|
|
404
435
|
data: Q.vibeDecks.buttonsByActionType
|
|
405
436
|
})]
|
|
406
437
|
}) : null,
|
|
407
|
-
H === "aievents" && Q?.aiEvents ? /* @__PURE__ */
|
|
438
|
+
H === "aievents" && Q?.aiEvents ? /* @__PURE__ */ T("div", {
|
|
408
439
|
className: "space-y-4",
|
|
409
440
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ w(M, {
|
|
411
442
|
label: "Total AI Events",
|
|
412
443
|
value: Q.aiEvents.total
|
|
413
444
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ w(D, {
|
|
415
446
|
title: "AI Events Over Time",
|
|
416
447
|
datasets: [{
|
|
417
448
|
label: "Events",
|
|
@@ -420,12 +451,12 @@ function j() {
|
|
|
420
451
|
}],
|
|
421
452
|
height: 250
|
|
422
453
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ T("div", {
|
|
424
455
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
456
|
+
children: [/* @__PURE__ */ w(O, {
|
|
426
457
|
title: "By Source",
|
|
427
458
|
data: Q.aiEvents.bySource
|
|
428
|
-
}), /* @__PURE__ */
|
|
459
|
+
}), /* @__PURE__ */ w(d, {
|
|
429
460
|
title: "By Event Type",
|
|
430
461
|
data: Q.aiEvents.byEventType,
|
|
431
462
|
keyLabel: "Event Type"
|
|
@@ -433,14 +464,14 @@ function j() {
|
|
|
433
464
|
})
|
|
434
465
|
]
|
|
435
466
|
}) : null,
|
|
436
|
-
H === "audit" && Q?.audit ? /* @__PURE__ */
|
|
467
|
+
H === "audit" && Q?.audit ? /* @__PURE__ */ T("div", {
|
|
437
468
|
className: "space-y-4",
|
|
438
469
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ w(M, {
|
|
440
471
|
label: "Total Audit Logs",
|
|
441
472
|
value: Q.audit.total
|
|
442
473
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ w(D, {
|
|
444
475
|
title: "Audit Events Over Time",
|
|
445
476
|
datasets: [{
|
|
446
477
|
label: "Events",
|
|
@@ -449,52 +480,52 @@ function j() {
|
|
|
449
480
|
}],
|
|
450
481
|
height: 250
|
|
451
482
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ T("div", {
|
|
453
484
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ w(O, {
|
|
455
486
|
title: "By Action",
|
|
456
487
|
data: Q.audit.byAction
|
|
457
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ w(O, {
|
|
458
489
|
title: "By Status",
|
|
459
490
|
data: Q.audit.byStatus
|
|
460
491
|
})]
|
|
461
492
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ w(d, {
|
|
463
494
|
title: "By Resource Type",
|
|
464
495
|
data: Q.audit.byResourceType,
|
|
465
496
|
keyLabel: "Resource"
|
|
466
497
|
})
|
|
467
498
|
]
|
|
468
499
|
}) : null,
|
|
469
|
-
H === "docs" && Q?.docs ? /* @__PURE__ */
|
|
500
|
+
H === "docs" && Q?.docs ? /* @__PURE__ */ T("div", {
|
|
470
501
|
className: "space-y-4",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ T("div", {
|
|
472
503
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
473
504
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ w(M, {
|
|
475
506
|
label: "Sites",
|
|
476
507
|
value: Q.docs.totalSites
|
|
477
508
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ w(M, {
|
|
479
510
|
label: "Pages",
|
|
480
511
|
value: Q.docs.totalPages
|
|
481
512
|
}),
|
|
482
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ w(M, {
|
|
483
514
|
label: "Revisions",
|
|
484
515
|
value: Q.docs.totalRevisions
|
|
485
516
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ w(M, {
|
|
487
518
|
label: "Build Success",
|
|
488
519
|
value: Q.docs.buildSuccessRate == null ? "N/A" : `${Q.docs.buildSuccessRate.toFixed(1)}%`,
|
|
489
520
|
variant: Q.docs.buildSuccessRate != null && Q.docs.buildSuccessRate >= 90 ? "success" : "warning"
|
|
490
521
|
})
|
|
491
522
|
]
|
|
492
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ T("div", {
|
|
493
524
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ w(O, {
|
|
495
526
|
title: "Pages by Status",
|
|
496
527
|
data: Q.docs.pagesByStatus
|
|
497
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ w(O, {
|
|
498
529
|
title: "Revisions by Status",
|
|
499
530
|
data: Q.docs.revisionsByStatus
|
|
500
531
|
})]
|
|
@@ -504,33 +535,15 @@ function j() {
|
|
|
504
535
|
})
|
|
505
536
|
})
|
|
506
537
|
]
|
|
507
|
-
}) : /* @__PURE__ */ w(T, {
|
|
508
|
-
className: "min-h-screen space-y-6 bg-bg-surface p-4 sm:p-6",
|
|
509
|
-
children: [/* @__PURE__ */ C(r, { title: W("nav.analytics", "Analytics") }), /* @__PURE__ */ C("div", {
|
|
510
|
-
className: "text-sm text-text-secondary",
|
|
511
|
-
children: "Waiting for workspace context…"
|
|
512
|
-
})]
|
|
513
|
-
}) : /* @__PURE__ */ C("div", {
|
|
514
|
-
className: "flex items-center justify-center min-h-[400px]",
|
|
515
|
-
children: /* @__PURE__ */ w("div", {
|
|
516
|
-
className: "text-center space-y-2",
|
|
517
|
-
children: [/* @__PURE__ */ C("h2", {
|
|
518
|
-
className: "text-lg font-semibold text-foreground",
|
|
519
|
-
children: "Access Denied"
|
|
520
|
-
}), /* @__PURE__ */ C("p", {
|
|
521
|
-
className: "text-sm text-text-secondary",
|
|
522
|
-
children: "You don't have permission to access this page."
|
|
523
|
-
})]
|
|
524
|
-
})
|
|
525
538
|
});
|
|
526
539
|
}
|
|
527
540
|
function M({ label: e, value: t, variant: n }) {
|
|
528
|
-
return /* @__PURE__ */
|
|
541
|
+
return /* @__PURE__ */ T("div", {
|
|
529
542
|
className: `${n === "success" ? "bg-status-success-bg/10" : n === "warning" ? "bg-status-warning-bg/10" : n === "error" ? "bg-status-error-bg/10" : "bg-bg-surface"} rounded-lg border border-border-default p-3`,
|
|
530
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ w("p", {
|
|
531
544
|
className: "text-xs text-text-secondary",
|
|
532
545
|
children: e
|
|
533
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ w("p", {
|
|
534
547
|
className: "mt-1 text-xl font-bold text-text-primary",
|
|
535
548
|
children: typeof t == "number" ? t.toLocaleString() : t
|
|
536
549
|
})]
|