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