@burdenoff/microfe-bigconsole 2026.1113.1 → 2026.1113.2
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/bigconsole/components/datasink/DataSinkCard.js +60 -58
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +123 -121
- package/dist/bigconsole/context/BigConsoleContext.d.ts +2 -0
- package/dist/bigconsole/context/BigConsoleContext.js +14 -12
- package/dist/bigconsole/pages/DashboardViewPage.js +241 -239
- package/dist/bigconsole/pages/DashboardsPage.js +265 -262
- package/dist/bigconsole/pages/DataSinkViewPage.js +253 -251
- package/dist/bigconsole/pages/DataSinksPage.js +162 -160
- package/dist/bigconsole/pages/SettingsPage.js +127 -123
- package/dist/bigconsole/proactive/actions.d.ts +16 -0
- package/dist/bigconsole/proactive/actions.js +34 -0
- package/dist/bigconsole/proactive/activityEntity.d.ts +5 -0
- package/dist/bigconsole/proactive/activityEntity.js +27 -0
- package/dist/bigconsole/proactive/entities.d.ts +16 -0
- package/dist/bigconsole/proactive/entities.js +20 -0
- package/dist/bigconsole/proactive/index.d.ts +15 -0
- package/dist/bigconsole/proactive/index.js +5 -0
- package/dist/bigconsole/proactive/routes.d.ts +11 -0
- package/dist/bigconsole/proactive/routes.js +6 -0
- package/dist/bigconsole/types/index.d.ts +7 -0
- package/dist/generated/wspace-operations.js +213 -19
- package/dist/node_modules/zod/v4/classic/errors.js +42 -0
- package/dist/node_modules/zod/v4/classic/parse.js +5 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +622 -0
- package/dist/node_modules/zod/v4/core/api.js +427 -0
- package/dist/node_modules/zod/v4/core/checks.js +141 -0
- package/dist/node_modules/zod/v4/core/core.js +82 -0
- package/dist/node_modules/zod/v4/core/doc.js +27 -0
- package/dist/node_modules/zod/v4/core/errors.js +88 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +190 -0
- package/dist/node_modules/zod/v4/core/memoizer.js +186 -0
- package/dist/node_modules/zod/v4/core/parse.js +157 -0
- package/dist/node_modules/zod/v4/core/regexes.js +32 -0
- package/dist/node_modules/zod/v4/core/registries.js +39 -0
- package/dist/node_modules/zod/v4/core/schemas.js +856 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +328 -0
- package/dist/node_modules/zod/v4/core/util.js +415 -0
- package/dist/node_modules/zod/v4/core/versions.js +7 -0
- package/dist/node_modules/zod/v4/locales/en.js +94 -0
- package/package.json +8 -4
|
@@ -14,30 +14,31 @@ import ee from "../hooks/usePageOperations.js";
|
|
|
14
14
|
import "../hooks/index.js";
|
|
15
15
|
import te, { parseUrlToGlobalFilterValues as ne } from "../hooks/useFilterUrlSync.js";
|
|
16
16
|
import re from "../hooks/useActivePage.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
17
|
+
import { dashboardPageTabs as ie } from "../assistant/pageControls.js";
|
|
18
|
+
import { DashboardCanvas as ae } from "../components/dashboard/DashboardCanvas.js";
|
|
19
|
+
import { loadBigConsoleSettings as oe } from "../hooks/useBigConsoleSettings.js";
|
|
20
|
+
import { LiveCanvasToggle as se } from "../components/dashboard/LiveCanvasToggle.js";
|
|
21
|
+
import { ExportDashboardDialog as ce } from "../components/dashboard/ExportDashboardDialog.js";
|
|
22
|
+
import { DrilldownBreadcrumb as le } from "../components/dashboard/DrilldownBreadcrumb.js";
|
|
23
|
+
import { PublishToStoreDialog as ue } from "../components/dashboard/PublishToStoreDialog.js";
|
|
24
24
|
import { LIVE_STRUCTURE_POLL_MS as de, isLiveDataRefreshDue as fe } from "../utils/liveBoardRefresh.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import { registerBreadcrumbName as pe, unregisterBreadcrumbName as me } from "../utils/breadcrumbRegistry.js";
|
|
26
|
+
import { DigestPanel as he } from "../components/narrative/DigestPanel.js";
|
|
27
27
|
import { GetWidgetDocument as ge } from "../../generated/wspace-operations.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
28
|
+
import { dashboardSuggestAnchorProps as _e } from "../proactive/entities.js";
|
|
29
|
+
import { memo as c, useCallback as l, useEffect as u, useMemo as ve, useRef as ye, useState as d } from "react";
|
|
30
|
+
import { useLocation as be, useParams as xe } from "react-router";
|
|
31
|
+
import { AccessDenied as Se } from "@burdenoff/fe-libs/shared/components";
|
|
32
|
+
import { usePermissions as Ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
33
|
+
import { ArrowLeft as we, Sparkles as Te } from "lucide-react";
|
|
34
|
+
import { Button as f, IllustratedEmptyState as Ee } from "@burdenoff/fe-libs/ui";
|
|
35
|
+
import { useI18n as De } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
36
|
+
import { useApolloClient as Oe } from "@apollo/client/react";
|
|
37
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
38
|
+
import { useAssistantPageControls as ke } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
38
39
|
// src/bigconsole/pages/DashboardViewPage.tsx
|
|
39
|
-
var
|
|
40
|
-
let { dashboardId: c } =
|
|
40
|
+
var g = c(function() {
|
|
41
|
+
let { dashboardId: c } = xe(), g = i(), Ae = r(), { t: _ } = De(), je = Oe(), { hasPermission: v, isLoading: y } = Ce(), b = v(n.DASHBOARD_READ), Me = v(n.DASHBOARD_UPDATE), Ne = v(n.DASHBOARD_EXPORT), Pe = v(n.DASHBOARD_PUBLISH), [Fe, x] = d(!1), [S, C] = d(!1), [Ie, w] = d(!1), [T, Le] = d(!1), [Re, ze] = d(!1), { isInDrilldown: E, getContextFromUrl: Be, getDrilldownMetadata: D } = te(), O = t((e) => e.currentDashboard), k = t((e) => e.setCurrentDashboard), A = t((e) => e.setGlobalFilterValue), j = t((e) => e.clearAllGlobalFilters), M = t((e) => e.setGlobalFilterValues), N = e((e) => e.widgets), Ve = be(), { activePageId: P, setActivePage: F } = re(O?.id === c ? O?.pages : void 0), I = e((e) => e.clipboardWidgetId), L = e((e) => e.clipboardAction), R = e((e) => e.clearClipboard), z = e((e) => e.selectWidget), { loading: B, error: V, fetchDashboard: H, updateDashboard: U } = s(), { createWidget: W, deleteWidget: G, duplicateWidget: K, batchUpdatePositions: q, refetch: J } = o(P || void 0, c), { createPage: Y, updatePage: He, deletePage: Ue, duplicatePage: We, reorderPages: Ge } = ee(), Ke = l((e) => {
|
|
41
42
|
let t = e?.parentElement;
|
|
42
43
|
if (!e || !t) return;
|
|
43
44
|
let n = t;
|
|
@@ -57,40 +58,40 @@ var _ = c(function() {
|
|
|
57
58
|
};
|
|
58
59
|
}, []);
|
|
59
60
|
u(() => {
|
|
60
|
-
if (!c)
|
|
61
|
-
else return
|
|
62
|
-
e ||
|
|
61
|
+
if (!c) g("/dashboards");
|
|
62
|
+
else return M(ne(window.location.search, "filter_")), C(!1), H(c).then((e) => {
|
|
63
|
+
e || C(!0);
|
|
63
64
|
}), () => {
|
|
64
|
-
|
|
65
|
+
k(null), j(), C(!1);
|
|
65
66
|
};
|
|
66
67
|
}, [
|
|
67
68
|
c,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
g,
|
|
70
|
+
H,
|
|
71
|
+
k,
|
|
72
|
+
j,
|
|
73
|
+
M
|
|
73
74
|
]), u(() => {
|
|
74
|
-
if (!
|
|
75
|
-
let e =
|
|
75
|
+
if (!E) return;
|
|
76
|
+
let e = Be(), t = D();
|
|
76
77
|
Object.entries(e).forEach(([e, t]) => {
|
|
77
|
-
|
|
78
|
-
}), t.depth > 0 && (
|
|
78
|
+
A(`ctx_${e}`, t);
|
|
79
|
+
}), t.depth > 0 && (A("__drilldown_depth", t.depth), A("__drilldown_parent", t.parent), A("__drilldown_path", t.path)), Object.keys(e).length;
|
|
79
80
|
}, [
|
|
81
|
+
E,
|
|
82
|
+
Be,
|
|
83
|
+
D,
|
|
80
84
|
A,
|
|
81
|
-
|
|
82
|
-
M,
|
|
83
|
-
F,
|
|
84
|
-
Fe.search
|
|
85
|
+
Ve.search
|
|
85
86
|
]);
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
if (!
|
|
87
|
+
let qe = ye(J);
|
|
88
|
+
qe.current = J, u(() => {
|
|
89
|
+
if (!T || !c) return;
|
|
89
90
|
let e = null, n = () => {
|
|
90
91
|
if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
|
|
91
|
-
|
|
92
|
+
H(c, { silent: !0 }), qe.current();
|
|
92
93
|
let n = Date.now();
|
|
93
|
-
fe(e, n) && (e = n,
|
|
94
|
+
fe(e, n) && (e = n, je.refetchQueries({ include: [ge] }).catch((e) => {
|
|
94
95
|
console.warn("[DashboardViewPage] Live widget data refresh failed", e);
|
|
95
96
|
}));
|
|
96
97
|
};
|
|
@@ -102,52 +103,52 @@ var _ = c(function() {
|
|
|
102
103
|
window.clearInterval(r), document.removeEventListener("visibilitychange", i);
|
|
103
104
|
};
|
|
104
105
|
}, [
|
|
105
|
-
|
|
106
|
+
T,
|
|
106
107
|
c,
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
H,
|
|
109
|
+
je
|
|
109
110
|
]);
|
|
110
|
-
let
|
|
111
|
+
let Je = l(async () => {
|
|
111
112
|
if (c) {
|
|
112
|
-
|
|
113
|
+
x(!0);
|
|
113
114
|
try {
|
|
114
|
-
let e = Array.from(
|
|
115
|
+
let e = Array.from(N.values());
|
|
115
116
|
if (e.length > 0) {
|
|
116
117
|
let t = e.map((e) => ({
|
|
117
118
|
id: e.id,
|
|
118
119
|
position: e.position
|
|
119
120
|
}));
|
|
120
|
-
await
|
|
121
|
+
await q(t);
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
+
O && await U({
|
|
123
124
|
id: c,
|
|
124
|
-
name:
|
|
125
|
-
description:
|
|
125
|
+
name: O.name,
|
|
126
|
+
description: O.description
|
|
126
127
|
});
|
|
127
128
|
} catch {} finally {
|
|
128
|
-
|
|
129
|
+
x(!1);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
}, [
|
|
132
133
|
c,
|
|
133
|
-
R,
|
|
134
134
|
N,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
O,
|
|
136
|
+
q,
|
|
137
|
+
U
|
|
138
|
+
]), Ye = l(() => {
|
|
139
|
+
g("/dashboards");
|
|
140
|
+
}, [g]), X = l((e) => {
|
|
141
|
+
F(e);
|
|
142
|
+
}, [F]), Z = ve(() => (O?.pages || []).map((e, t) => ({
|
|
142
143
|
id: e.id,
|
|
143
|
-
name: e.name ||
|
|
144
|
+
name: e.name || _("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
|
|
144
145
|
order: e.order ?? 0
|
|
145
|
-
})), [
|
|
146
|
+
})), [O?.pages, _]), Q = O && O.id === c ? O.name : null, $ = P || O?.pages?.[0]?.id || null;
|
|
146
147
|
u(() => {
|
|
147
|
-
if (c && Q) return
|
|
148
|
+
if (c && Q) return pe(c, Q), () => me(c);
|
|
148
149
|
}, [c, Q]);
|
|
149
|
-
let
|
|
150
|
-
dashboardName: Q ||
|
|
150
|
+
let Xe = ve(() => !y && b && !V && !S && !B && Q !== null ? ie({
|
|
151
|
+
dashboardName: Q || _("bigconsole.dashboards.title", "Dashboards"),
|
|
151
152
|
tabs: Z.map((e) => ({
|
|
152
153
|
id: e.id,
|
|
153
154
|
label: e.name
|
|
@@ -155,39 +156,39 @@ var _ = c(function() {
|
|
|
155
156
|
current: $,
|
|
156
157
|
select: X
|
|
157
158
|
}) : null, [
|
|
158
|
-
|
|
159
|
+
y,
|
|
160
|
+
b,
|
|
161
|
+
V,
|
|
159
162
|
S,
|
|
160
|
-
|
|
161
|
-
w,
|
|
162
|
-
G,
|
|
163
|
+
B,
|
|
163
164
|
Q,
|
|
164
165
|
Z,
|
|
165
166
|
$,
|
|
166
167
|
X,
|
|
167
|
-
|
|
168
|
+
_
|
|
168
169
|
]);
|
|
169
|
-
|
|
170
|
-
let
|
|
171
|
-
let e =
|
|
172
|
-
if (!
|
|
173
|
-
let t =
|
|
170
|
+
ke(Xe);
|
|
171
|
+
let Ze = l(async () => {
|
|
172
|
+
let e = P || O?.pages?.[0]?.id;
|
|
173
|
+
if (!I || !c || !e) return;
|
|
174
|
+
let t = N.get(I);
|
|
174
175
|
if (!t) {
|
|
175
|
-
|
|
176
|
+
R();
|
|
176
177
|
return;
|
|
177
178
|
}
|
|
178
179
|
let n = {
|
|
179
180
|
x: 0,
|
|
180
|
-
y: Array.from(
|
|
181
|
+
y: Array.from(N.values()).reduce((e, t) => {
|
|
181
182
|
let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
|
|
182
183
|
return Math.max(e, n);
|
|
183
184
|
}, 0),
|
|
184
|
-
width: Math.min(t.positionWidth ?? 4,
|
|
185
|
+
width: Math.min(t.positionWidth ?? 4, O?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
|
|
185
186
|
height: t.positionHeight ?? 4
|
|
186
|
-
}, r =
|
|
187
|
+
}, r = L === "copy" ? _("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
|
|
187
188
|
try {
|
|
188
|
-
i = await
|
|
189
|
+
i = await K(I, n, r);
|
|
189
190
|
} catch {}
|
|
190
|
-
i ||= await
|
|
191
|
+
i ||= await W({
|
|
191
192
|
pageId: e,
|
|
192
193
|
dashboardId: c,
|
|
193
194
|
type: t.type,
|
|
@@ -201,270 +202,271 @@ var _ = c(function() {
|
|
|
201
202
|
position: n,
|
|
202
203
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
203
204
|
metadata: t.metadata
|
|
204
|
-
}), i && (
|
|
205
|
+
}), i && (z(i.id), L === "cut" && await G(I)), R();
|
|
205
206
|
}, [
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
I,
|
|
208
|
+
L,
|
|
208
209
|
c,
|
|
209
|
-
|
|
210
|
+
P,
|
|
211
|
+
O,
|
|
210
212
|
N,
|
|
211
|
-
|
|
212
|
-
Le,
|
|
213
|
-
Y,
|
|
214
|
-
Ie,
|
|
213
|
+
K,
|
|
215
214
|
W,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}, []), tt = l(() => {
|
|
223
|
-
|
|
215
|
+
G,
|
|
216
|
+
z,
|
|
217
|
+
R,
|
|
218
|
+
_
|
|
219
|
+
]), Qe = l(() => {
|
|
220
|
+
w(!0);
|
|
221
|
+
}, []), [$e, et] = d(!1), tt = l(() => {
|
|
222
|
+
et(!0);
|
|
224
223
|
}, []), nt = l(() => {
|
|
225
|
-
|
|
226
|
-
}, []), rt = l(
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
et(!1);
|
|
225
|
+
}, []), rt = l(() => {
|
|
226
|
+
w(!1);
|
|
227
|
+
}, []), it = l(async () => {
|
|
228
|
+
if (!O || !c) return;
|
|
229
|
+
let e = (O.pages?.length || 0) + 1, t = _("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await Y({
|
|
229
230
|
dashboardId: c,
|
|
230
231
|
name: t,
|
|
231
|
-
gridColumns:
|
|
232
|
+
gridColumns: oe().defaultGridColumns
|
|
232
233
|
});
|
|
233
|
-
n && (
|
|
234
|
-
...
|
|
235
|
-
pages: [...
|
|
236
|
-
}),
|
|
234
|
+
n && (k({
|
|
235
|
+
...O,
|
|
236
|
+
pages: [...O.pages || [], n]
|
|
237
|
+
}), F(n.id));
|
|
237
238
|
}, [
|
|
238
|
-
|
|
239
|
+
O,
|
|
239
240
|
c,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
]),
|
|
245
|
-
|
|
241
|
+
k,
|
|
242
|
+
Y,
|
|
243
|
+
F,
|
|
244
|
+
_
|
|
245
|
+
]), at = l(async (e, t) => {
|
|
246
|
+
O && await He({
|
|
246
247
|
id: e,
|
|
247
248
|
name: t
|
|
248
|
-
}) &&
|
|
249
|
-
...
|
|
250
|
-
pages:
|
|
249
|
+
}) && k({
|
|
250
|
+
...O,
|
|
251
|
+
pages: O.pages?.map((n) => n.id === e ? {
|
|
251
252
|
...n,
|
|
252
253
|
name: t
|
|
253
254
|
} : n)
|
|
254
255
|
});
|
|
255
256
|
}, [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
]),
|
|
260
|
-
if (!
|
|
261
|
-
let t =
|
|
257
|
+
O,
|
|
258
|
+
k,
|
|
259
|
+
He
|
|
260
|
+
]), ot = l(async (e) => {
|
|
261
|
+
if (!O || !c) return;
|
|
262
|
+
let t = O.pages?.find((t) => t.id === e);
|
|
262
263
|
if (!t) return;
|
|
263
|
-
let n = await
|
|
264
|
-
n && (
|
|
265
|
-
...
|
|
266
|
-
pages: [...
|
|
267
|
-
}),
|
|
264
|
+
let n = await We(e, _("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
|
|
265
|
+
n && (k({
|
|
266
|
+
...O,
|
|
267
|
+
pages: [...O.pages || [], n]
|
|
268
|
+
}), F(n.id));
|
|
268
269
|
}, [
|
|
269
|
-
|
|
270
|
+
O,
|
|
270
271
|
c,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
]),
|
|
276
|
-
if (!(!
|
|
277
|
-
let t =
|
|
272
|
+
k,
|
|
273
|
+
We,
|
|
274
|
+
F,
|
|
275
|
+
_
|
|
276
|
+
]), st = l(async (e) => {
|
|
277
|
+
if (!(!O || (O.pages?.length || 0) <= 1) && await Ue(e)) {
|
|
278
|
+
let t = O.pages?.filter((t) => t.id !== e).map((e, t) => ({
|
|
278
279
|
...e,
|
|
279
280
|
order: t
|
|
280
281
|
}));
|
|
281
|
-
|
|
282
|
-
...
|
|
282
|
+
k({
|
|
283
|
+
...O,
|
|
283
284
|
pages: t
|
|
284
285
|
});
|
|
285
286
|
let n = t?.[0]?.id;
|
|
286
|
-
|
|
287
|
+
P === e && n && F(n, { replace: !0 });
|
|
287
288
|
}
|
|
288
289
|
}, [
|
|
289
|
-
|
|
290
|
+
O,
|
|
291
|
+
k,
|
|
290
292
|
P,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
...N,
|
|
293
|
+
Ue,
|
|
294
|
+
F
|
|
295
|
+
]), ct = l(async (e) => {
|
|
296
|
+
if (!O || !c) return;
|
|
297
|
+
k({
|
|
298
|
+
...O,
|
|
298
299
|
pages: e.map((e, t) => ({
|
|
299
300
|
...e,
|
|
300
301
|
order: t
|
|
301
302
|
}))
|
|
302
303
|
});
|
|
303
304
|
let t = e.map((e) => e.id);
|
|
304
|
-
await
|
|
305
|
+
await Ge(c, t);
|
|
305
306
|
}, [
|
|
306
|
-
|
|
307
|
+
O,
|
|
307
308
|
c,
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
k,
|
|
310
|
+
Ge
|
|
310
311
|
]);
|
|
311
|
-
return
|
|
312
|
+
return y ? /* @__PURE__ */ m("div", {
|
|
312
313
|
className: "flex items-center justify-center h-full",
|
|
313
|
-
children: /* @__PURE__ */
|
|
314
|
-
}) :
|
|
314
|
+
children: /* @__PURE__ */ m("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
315
|
+
}) : b ? V ? /* @__PURE__ */ m("div", {
|
|
315
316
|
className: "flex h-full flex-col items-center justify-center",
|
|
316
317
|
style: { padding: "var(--space-pagePadding)" },
|
|
317
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ m(a, {
|
|
318
319
|
headingLevel: 2,
|
|
319
320
|
tone: "danger",
|
|
320
|
-
title:
|
|
321
|
-
description: /* @__PURE__ */
|
|
321
|
+
title: _("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
322
|
+
description: /* @__PURE__ */ m("span", {
|
|
322
323
|
className: "break-words",
|
|
323
|
-
children:
|
|
324
|
+
children: V.message
|
|
324
325
|
}),
|
|
325
326
|
className: "w-full max-w-md",
|
|
326
327
|
"data-testid": "dashboard-view-error",
|
|
327
|
-
actions: /* @__PURE__ */
|
|
328
|
+
actions: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(f, {
|
|
328
329
|
size: "sm",
|
|
329
|
-
onClick: () =>
|
|
330
|
-
children:
|
|
331
|
-
}), /* @__PURE__ */
|
|
330
|
+
onClick: () => H(c),
|
|
331
|
+
children: _("bigconsole.dashboards.view.retry", "Retry")
|
|
332
|
+
}), /* @__PURE__ */ m(f, {
|
|
332
333
|
size: "sm",
|
|
333
334
|
variant: "outline",
|
|
334
|
-
onClick: () =>
|
|
335
|
-
children:
|
|
335
|
+
onClick: () => g("/dashboards"),
|
|
336
|
+
children: _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
336
337
|
})] })
|
|
337
338
|
})
|
|
338
|
-
}) :
|
|
339
|
+
}) : S ? /* @__PURE__ */ m("div", {
|
|
339
340
|
className: "flex flex-col items-center justify-center h-full",
|
|
340
341
|
style: { padding: "var(--space-pagePadding)" },
|
|
341
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ m(Ee, {
|
|
342
343
|
illustration: "empty-data",
|
|
343
|
-
title:
|
|
344
|
-
description: /* @__PURE__ */
|
|
344
|
+
title: _("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
|
|
345
|
+
description: /* @__PURE__ */ h(p, { children: [_("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ m("span", {
|
|
345
346
|
className: "mt-2 block font-mono text-xs text-text-muted break-all",
|
|
346
|
-
children:
|
|
347
|
+
children: _("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: c ?? "" })
|
|
347
348
|
})] }),
|
|
348
|
-
action: /* @__PURE__ */
|
|
349
|
-
onClick: () =>
|
|
350
|
-
children:
|
|
349
|
+
action: /* @__PURE__ */ m(f, {
|
|
350
|
+
onClick: () => g("/dashboards"),
|
|
351
|
+
children: _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
351
352
|
})
|
|
352
353
|
})
|
|
353
|
-
}) :
|
|
354
|
+
}) : B || !O ? /* @__PURE__ */ m("div", {
|
|
354
355
|
className: "flex items-center justify-center h-full",
|
|
355
356
|
role: "status",
|
|
356
357
|
"aria-live": "polite",
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ h("div", {
|
|
358
359
|
className: "flex flex-col items-center gap-4",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ m("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ m("p", {
|
|
360
361
|
className: "text-sm text-text-secondary",
|
|
361
|
-
children:
|
|
362
|
+
children: _("bigconsole.dashboards.view.loading", "Loading dashboard...")
|
|
362
363
|
})]
|
|
363
364
|
})
|
|
364
|
-
}) : /* @__PURE__ */
|
|
365
|
-
ref:
|
|
365
|
+
}) : /* @__PURE__ */ h("div", {
|
|
366
|
+
ref: Ke,
|
|
366
367
|
className: "h-full flex flex-col overflow-hidden",
|
|
367
368
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ m(a, {
|
|
369
370
|
emphasis: "bare",
|
|
370
371
|
padding: "none",
|
|
371
372
|
"data-testid": "dashboard-route-header",
|
|
372
373
|
"aria-label": "Dashboard",
|
|
373
374
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
374
375
|
headerClassName: "",
|
|
375
|
-
header: /* @__PURE__ */
|
|
376
|
+
header: /* @__PURE__ */ h("div", {
|
|
376
377
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
377
378
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
onClick:
|
|
379
|
+
/* @__PURE__ */ h(f, {
|
|
380
|
+
onClick: Ye,
|
|
380
381
|
variant: "ghost",
|
|
381
382
|
size: "sm",
|
|
382
|
-
title:
|
|
383
|
-
"aria-label":
|
|
383
|
+
title: _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
384
|
+
"aria-label": _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
384
385
|
className: "flex-shrink-0",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ m(we, { className: "w-4 h-4 mr-2" }), _("bigconsole.dashboards.view.back", "Back")]
|
|
386
387
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ m("h1", {
|
|
388
389
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
389
|
-
title:
|
|
390
|
-
|
|
390
|
+
title: O.name,
|
|
391
|
+
..._e(O.id),
|
|
392
|
+
children: O.name
|
|
391
393
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ m("div", {
|
|
393
395
|
className: "flex-shrink-0",
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
-
isLive:
|
|
396
|
-
onToggle: () =>
|
|
396
|
+
children: /* @__PURE__ */ m(se, {
|
|
397
|
+
isLive: T,
|
|
398
|
+
onToggle: () => Le((e) => !e)
|
|
397
399
|
})
|
|
398
400
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ m("div", {
|
|
400
402
|
className: "flex-shrink-0",
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
onClick: () =>
|
|
403
|
+
children: /* @__PURE__ */ h(f, {
|
|
404
|
+
onClick: () => ze((e) => !e),
|
|
403
405
|
variant: "ghost",
|
|
404
406
|
size: "sm",
|
|
405
|
-
"aria-pressed":
|
|
406
|
-
title:
|
|
407
|
-
"aria-label":
|
|
408
|
-
children: [/* @__PURE__ */
|
|
407
|
+
"aria-pressed": Re,
|
|
408
|
+
title: _("bigconsole.dashboards.view.digest", "Console digest"),
|
|
409
|
+
"aria-label": _("bigconsole.dashboards.view.digest", "Console digest"),
|
|
410
|
+
children: [/* @__PURE__ */ m(Te, { className: "w-4 h-4 mr-2" }), _("bigconsole.dashboards.view.digest", "Digest")]
|
|
409
411
|
})
|
|
410
412
|
})
|
|
411
413
|
]
|
|
412
414
|
})
|
|
413
415
|
}),
|
|
414
|
-
|
|
416
|
+
Re && O && /* @__PURE__ */ m("div", {
|
|
415
417
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
|
|
416
|
-
children: /* @__PURE__ */
|
|
418
|
+
children: /* @__PURE__ */ m("div", {
|
|
417
419
|
className: "mx-auto max-w-3xl",
|
|
418
|
-
children: /* @__PURE__ */
|
|
419
|
-
dashboardId:
|
|
420
|
-
onClose: () =>
|
|
420
|
+
children: /* @__PURE__ */ m(he, {
|
|
421
|
+
dashboardId: O.id,
|
|
422
|
+
onClose: () => ze(!1)
|
|
421
423
|
})
|
|
422
424
|
})
|
|
423
425
|
}),
|
|
424
|
-
|
|
425
|
-
currentDashboardId:
|
|
426
|
-
currentDashboardName:
|
|
427
|
-
basePath: `${
|
|
426
|
+
E && /* @__PURE__ */ m(le, {
|
|
427
|
+
currentDashboardId: O.id,
|
|
428
|
+
currentDashboardName: O.name,
|
|
429
|
+
basePath: `${Ae}/dashboards`
|
|
428
430
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ m("div", {
|
|
430
432
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
-
dashboardId:
|
|
433
|
-
pageId:
|
|
434
|
-
title:
|
|
435
|
-
onPaste:
|
|
436
|
-
onSave:
|
|
437
|
-
isSaving:
|
|
438
|
-
onExport:
|
|
439
|
-
onPublishTemplate:
|
|
433
|
+
children: /* @__PURE__ */ m(ae, {
|
|
434
|
+
dashboardId: O.id,
|
|
435
|
+
pageId: P || O.pages?.[0]?.id,
|
|
436
|
+
title: O.name,
|
|
437
|
+
onPaste: Ze,
|
|
438
|
+
onSave: Me ? Je : void 0,
|
|
439
|
+
isSaving: Fe,
|
|
440
|
+
onExport: Ne ? Qe : void 0,
|
|
441
|
+
onPublishTemplate: Pe ? tt : void 0,
|
|
440
442
|
pages: Z,
|
|
441
443
|
activePageId: $ ?? void 0,
|
|
442
444
|
onPageChange: X,
|
|
443
|
-
onPageAdd:
|
|
444
|
-
onPageRename:
|
|
445
|
-
onPageDuplicate:
|
|
446
|
-
onPageDelete:
|
|
447
|
-
onPagesReorder:
|
|
445
|
+
onPageAdd: it,
|
|
446
|
+
onPageRename: at,
|
|
447
|
+
onPageDuplicate: ot,
|
|
448
|
+
onPageDelete: st,
|
|
449
|
+
onPagesReorder: ct,
|
|
448
450
|
showPageTabs: !0
|
|
449
451
|
})
|
|
450
452
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
isOpen:
|
|
453
|
-
dashboardId:
|
|
454
|
-
dashboardName:
|
|
455
|
-
onClose:
|
|
453
|
+
/* @__PURE__ */ m(ce, {
|
|
454
|
+
isOpen: Ie,
|
|
455
|
+
dashboardId: O.id,
|
|
456
|
+
dashboardName: O.name,
|
|
457
|
+
onClose: rt
|
|
456
458
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
isOpen:
|
|
459
|
-
dashboardId:
|
|
460
|
-
dashboardName:
|
|
461
|
-
dashboardDescription:
|
|
462
|
-
onClose:
|
|
459
|
+
/* @__PURE__ */ m(ue, {
|
|
460
|
+
isOpen: $e,
|
|
461
|
+
dashboardId: O.id,
|
|
462
|
+
dashboardName: O.name,
|
|
463
|
+
dashboardDescription: O.description,
|
|
464
|
+
onClose: nt
|
|
463
465
|
})
|
|
464
466
|
]
|
|
465
|
-
}) : /* @__PURE__ */
|
|
466
|
-
title:
|
|
467
|
-
description:
|
|
467
|
+
}) : /* @__PURE__ */ m(Se, {
|
|
468
|
+
title: _("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
|
|
469
|
+
description: _("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
468
470
|
});
|
|
469
471
|
});
|
|
470
|
-
export {
|
|
472
|
+
export { g as DashboardViewPage, g as default };
|