@burdenoff/microfe-bigconsole 2026.1124.1 → 2026.1124.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/fleet/FleetChildrenPanel.d.ts +4 -0
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +174 -184
- package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +13 -0
- package/dist/bigconsole/components/fleet/FleetCopySection.js +266 -0
- package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +8 -1
- package/dist/bigconsole/hooks/useFleetBreadcrumb.js +4 -1
- package/dist/bigconsole/hooks/useFleetChildren.d.ts +2 -0
- package/dist/bigconsole/hooks/useFleetChildren.js +10 -6
- package/dist/bigconsole/hooks/useFleetCopyActions.d.ts +23 -0
- package/dist/bigconsole/hooks/useFleetCopyActions.js +74 -0
- package/dist/bigconsole/hooks/useFleetFlags.d.ts +16 -0
- package/dist/bigconsole/hooks/useFleetFlags.js +79 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +33 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.js +41 -0
- package/dist/bigconsole/pages/DashboardViewPage.js +290 -287
- package/dist/bigconsole/pages/DashboardsPage.js +13 -13
- package/dist/bigconsole/utils/fleetFlags.d.ts +22 -0
- package/dist/bigconsole/utils/fleetFlags.js +40 -0
- package/dist/bigconsole/utils/fleetTree.d.ts +9 -0
- package/dist/bigconsole/utils/fleetTree.js +5 -1
- package/dist/generated/wspace-operations.d.ts +101 -0
- package/dist/generated/wspace-operations.js +609 -90
- package/dist/generated/wspace-types.js +6 -4
- package/package.json +1 -1
|
@@ -11,55 +11,56 @@ import te from "../hooks/useDashboardOperations.js";
|
|
|
11
11
|
import { FleetBreadcrumb as ne } from "../components/fleet/FleetBreadcrumb.js";
|
|
12
12
|
import { FleetChildrenPanel as re } from "../components/fleet/FleetChildrenPanel.js";
|
|
13
13
|
import ie from "../hooks/usePageOperations.js";
|
|
14
|
+
import { directMasterName as ae } from "../utils/fleetTree.js";
|
|
15
|
+
import { AsOfProvider as c, HideWhenAsOf as l, useAsOf as oe } from "../asof/AsOfProvider.js";
|
|
14
16
|
import "../components/dashboard/index.js";
|
|
15
|
-
import { AsOfProvider as c, HideWhenAsOf as l, useAsOf as ae } from "../asof/AsOfProvider.js";
|
|
16
17
|
import { useReconcileAgentTool as u } from "../components/reconcile/useReconcileAgentTool.js";
|
|
17
18
|
import "../components/common/index.js";
|
|
18
19
|
import "../components/narrative/index.js";
|
|
20
|
+
import { DashboardCanvas as se } from "../components/dashboard/DashboardCanvas.js";
|
|
19
21
|
import "../store/index.js";
|
|
20
|
-
import {
|
|
22
|
+
import { LiveCanvasToggle as ce } from "../components/dashboard/LiveCanvasToggle.js";
|
|
23
|
+
import { ExportDashboardDialog as le } from "../components/dashboard/ExportDashboardDialog.js";
|
|
24
|
+
import { DrilldownBreadcrumb as ue } from "../components/dashboard/DrilldownBreadcrumb.js";
|
|
25
|
+
import { PublishToStoreDialog as de } from "../components/dashboard/PublishToStoreDialog.js";
|
|
26
|
+
import { DashboardReviewDialog as fe } from "../components/dashboard/DashboardReviewDialog.js";
|
|
27
|
+
import { DashboardPresenceBar as pe } from "../components/dashboard/DashboardPresenceBar.js";
|
|
28
|
+
import { DashboardCommentsDrawer as me } from "../components/dashboard/DashboardCommentsDrawer.js";
|
|
21
29
|
import "../hooks/index.js";
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import { loadBigConsoleSettings as ve } from "../hooks/useBigConsoleSettings.js";
|
|
33
|
-
import { LIVE_STRUCTURE_POLL_MS as ye, isLiveDataRefreshDue as be } from "../utils/liveBoardRefresh.js";
|
|
34
|
-
import { registerBreadcrumbName as xe, unregisterBreadcrumbName as Se } from "../utils/breadcrumbRegistry.js";
|
|
35
|
-
import { DigestPanel as Ce } from "../components/narrative/DigestPanel.js";
|
|
36
|
-
import { GetWidgetDocument as we } from "../../generated/wspace-operations.js";
|
|
37
|
-
import { dashboardSuggestAnchorProps as Te } from "../proactive/entities.js";
|
|
38
|
-
import { memo as d, useCallback as f, useEffect as p, useMemo as Ee, useRef as De, useState as m } from "react";
|
|
30
|
+
import he, { parseUrlToGlobalFilterValues as ge } from "../hooks/useFilterUrlSync.js";
|
|
31
|
+
import _e from "../hooks/useActivePage.js";
|
|
32
|
+
import { dashboardPageTabs as ve } from "../assistant/pageControls.js";
|
|
33
|
+
import { loadBigConsoleSettings as ye } from "../hooks/useBigConsoleSettings.js";
|
|
34
|
+
import { LIVE_STRUCTURE_POLL_MS as be, isLiveDataRefreshDue as xe } from "../utils/liveBoardRefresh.js";
|
|
35
|
+
import { registerBreadcrumbName as Se, unregisterBreadcrumbName as Ce } from "../utils/breadcrumbRegistry.js";
|
|
36
|
+
import { DigestPanel as we } from "../components/narrative/DigestPanel.js";
|
|
37
|
+
import { GetWidgetDocument as Te } from "../../generated/wspace-operations.js";
|
|
38
|
+
import { dashboardSuggestAnchorProps as Ee } from "../proactive/entities.js";
|
|
39
|
+
import { memo as d, useCallback as f, useEffect as p, useMemo as m, useRef as De, useState as h } from "react";
|
|
39
40
|
import { useLocation as Oe, useParams as ke } from "react-router";
|
|
40
41
|
import { AccessDenied as Ae } from "@burdenoff/fe-libs/shared/components";
|
|
41
42
|
import { usePermissions as je } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
42
43
|
import { ArrowLeft as Me, MessageSquare as Ne, Network as Pe, Sparkles as Fe } from "lucide-react";
|
|
43
|
-
import { Button as
|
|
44
|
+
import { Button as g, IllustratedEmptyState as Ie } from "@burdenoff/fe-libs/ui";
|
|
44
45
|
import { useI18n as Le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
45
46
|
import { useApolloClient as Re } from "@apollo/client/react";
|
|
46
|
-
import { Fragment as
|
|
47
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
47
48
|
import { useAssistantPageControls as ze } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
48
49
|
// src/bigconsole/pages/DashboardViewPage.tsx
|
|
49
|
-
var
|
|
50
|
-
let { dashboardId: r } = ke(), c = a(), u = i(), { t: d } = Le(),
|
|
50
|
+
var b = d(function() {
|
|
51
|
+
let { dashboardId: r } = ke(), c = a(), u = i(), { t: d } = Le(), b = oe().asOf !== null, x = Re(), { hasPermission: S, isLoading: C } = je(), w = S(n.DASHBOARD_READ), Ve = S(n.DASHBOARD_UPDATE), He = S(n.DASHBOARD_EXPORT), Ue = S(n.DASHBOARD_PUBLISH), [We, Ge] = h(!1), [T, E] = h(!1), [Ke, qe] = h(!1), [D, Je] = h(!1), [Ye, Xe] = h(!1), [Ze, Qe] = h(!1), [O, $e] = h(!1), { isInDrilldown: k, getContextFromUrl: A, getDrilldownMetadata: j } = he(), M = t((e) => e.currentDashboard), N = t((e) => e.setCurrentDashboard), P = t((e) => e.setGlobalFilterValue), F = t((e) => e.viewMode), I = t((e) => e.setViewMode);
|
|
51
52
|
p(() => {
|
|
52
|
-
|
|
53
|
+
b && F === "edit" && I("view");
|
|
53
54
|
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
b,
|
|
56
|
+
F,
|
|
57
|
+
I
|
|
57
58
|
]);
|
|
58
|
-
let
|
|
59
|
+
let L = e((e) => e.closeConfigPanel);
|
|
59
60
|
p(() => {
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
let
|
|
61
|
+
b && L();
|
|
62
|
+
}, [b, L]);
|
|
63
|
+
let et = t((e) => e.clearAllGlobalFilters), tt = t((e) => e.setGlobalFilterValues), R = e((e) => e.widgets), nt = Oe(), { activePageId: z, setActivePage: B } = _e(M?.id === r ? M?.pages : void 0), V = e((e) => e.clipboardWidgetId), H = e((e) => e.clipboardAction), U = e((e) => e.clearClipboard), W = e((e) => e.selectWidget), { loading: G, error: K, fetchDashboard: q, updateDashboard: rt } = te(), { createWidget: it, deleteWidget: at, duplicateWidget: ot, batchUpdatePositions: st, refetch: J } = ee(z || void 0, r), { createPage: ct, updatePage: lt, deletePage: ut, duplicatePage: dt, reorderPages: ft } = ie(), pt = f((e) => {
|
|
63
64
|
let t = e?.parentElement;
|
|
64
65
|
if (!e || !t) return;
|
|
65
66
|
let n = t;
|
|
@@ -80,138 +81,138 @@ var y = d(function() {
|
|
|
80
81
|
}, []);
|
|
81
82
|
p(() => {
|
|
82
83
|
if (!r) c("/dashboards");
|
|
83
|
-
else return
|
|
84
|
-
e ||
|
|
84
|
+
else return tt(ge(window.location.search, "filter_")), E(!1), q(r).then((e) => {
|
|
85
|
+
e || E(!0);
|
|
85
86
|
}), () => {
|
|
86
|
-
|
|
87
|
+
N(null), et(), E(!1);
|
|
87
88
|
};
|
|
88
89
|
}, [
|
|
89
90
|
r,
|
|
90
91
|
c,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
q,
|
|
93
|
+
N,
|
|
94
|
+
et,
|
|
95
|
+
tt
|
|
95
96
|
]), p(() => {
|
|
96
|
-
if (!
|
|
97
|
-
let e =
|
|
97
|
+
if (!k) return;
|
|
98
|
+
let e = A(), t = j();
|
|
98
99
|
Object.entries(e).forEach(([e, t]) => {
|
|
99
|
-
|
|
100
|
-
}), t.depth > 0 && (
|
|
100
|
+
P(`ctx_${e}`, t);
|
|
101
|
+
}), t.depth > 0 && (P("__drilldown_depth", t.depth), P("__drilldown_parent", t.parent), P("__drilldown_path", t.path)), Object.keys(e).length;
|
|
101
102
|
}, [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
k,
|
|
104
|
+
A,
|
|
105
|
+
j,
|
|
106
|
+
P,
|
|
107
|
+
nt.search
|
|
107
108
|
]);
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
if (!
|
|
109
|
+
let mt = De(J);
|
|
110
|
+
mt.current = J, p(() => {
|
|
111
|
+
if (!D || !r || b) return;
|
|
111
112
|
let e = null, n = () => {
|
|
112
113
|
if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
|
|
113
|
-
|
|
114
|
+
q(r, { silent: !0 }), mt.current();
|
|
114
115
|
let n = Date.now();
|
|
115
|
-
|
|
116
|
+
xe(e, n) && (e = n, x.refetchQueries({ include: [Te] }).catch((e) => {
|
|
116
117
|
console.warn("[DashboardViewPage] Live widget data refresh failed", e);
|
|
117
118
|
}));
|
|
118
119
|
};
|
|
119
120
|
n();
|
|
120
|
-
let i = window.setInterval(n,
|
|
121
|
+
let i = window.setInterval(n, be), a = () => {
|
|
121
122
|
document.visibilityState === "visible" && (e = null, n());
|
|
122
123
|
};
|
|
123
124
|
return document.addEventListener("visibilitychange", a), () => {
|
|
124
125
|
window.clearInterval(i), document.removeEventListener("visibilitychange", a);
|
|
125
126
|
};
|
|
126
127
|
}, [
|
|
127
|
-
|
|
128
|
+
D,
|
|
128
129
|
r,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
b,
|
|
131
|
+
q,
|
|
132
|
+
x
|
|
132
133
|
]);
|
|
133
|
-
let
|
|
134
|
-
if (r && !
|
|
135
|
-
|
|
134
|
+
let ht = f(async () => {
|
|
135
|
+
if (r && !b) {
|
|
136
|
+
Ge(!0);
|
|
136
137
|
try {
|
|
137
|
-
let e = Array.from(
|
|
138
|
+
let e = Array.from(R.values());
|
|
138
139
|
if (e.length > 0) {
|
|
139
140
|
let t = e.map((e) => ({
|
|
140
141
|
id: e.id,
|
|
141
142
|
position: e.position
|
|
142
143
|
}));
|
|
143
|
-
await
|
|
144
|
+
await st(t);
|
|
144
145
|
}
|
|
145
|
-
|
|
146
|
+
M && await rt({
|
|
146
147
|
id: r,
|
|
147
|
-
name:
|
|
148
|
-
description:
|
|
148
|
+
name: M.name,
|
|
149
|
+
description: M.description
|
|
149
150
|
});
|
|
150
151
|
} catch {} finally {
|
|
151
|
-
|
|
152
|
+
Ge(!1);
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
}, [
|
|
155
156
|
r,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
]),
|
|
157
|
+
b,
|
|
158
|
+
R,
|
|
159
|
+
M,
|
|
160
|
+
st,
|
|
161
|
+
rt
|
|
162
|
+
]), gt = f(() => {
|
|
162
163
|
c("/dashboards");
|
|
163
|
-
}, [c]),
|
|
164
|
-
|
|
165
|
-
}, [
|
|
164
|
+
}, [c]), { ancestors: Y, directMasterId: _t } = s(b ? void 0 : r), vt = f((e) => c(`/dashboards/${e}`), [c]), X = f((e) => {
|
|
165
|
+
B(e);
|
|
166
|
+
}, [B]), Z = m(() => (M?.pages || []).map((e, t) => ({
|
|
166
167
|
id: e.id,
|
|
167
168
|
name: e.name || d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
|
|
168
169
|
order: e.order ?? 0
|
|
169
|
-
})), [
|
|
170
|
+
})), [M?.pages, d]), Q = M && M.id === r ? M.name : null, $ = z || M?.pages?.[0]?.id || null;
|
|
170
171
|
p(() => {
|
|
171
|
-
if (r &&
|
|
172
|
-
}, [r,
|
|
173
|
-
let
|
|
174
|
-
dashboardName:
|
|
175
|
-
tabs:
|
|
172
|
+
if (r && Q) return Se(r, Q), () => Ce(r);
|
|
173
|
+
}, [r, Q]);
|
|
174
|
+
let yt = m(() => !C && w && !K && !T && !G && Q !== null ? ve({
|
|
175
|
+
dashboardName: Q || d("bigconsole.dashboards.title", "Dashboards"),
|
|
176
|
+
tabs: Z.map((e) => ({
|
|
176
177
|
id: e.id,
|
|
177
178
|
label: e.name
|
|
178
179
|
})),
|
|
179
|
-
current:
|
|
180
|
-
select:
|
|
180
|
+
current: $,
|
|
181
|
+
select: X
|
|
181
182
|
}) : null, [
|
|
182
|
-
S,
|
|
183
183
|
C,
|
|
184
|
-
|
|
185
|
-
E,
|
|
184
|
+
w,
|
|
186
185
|
K,
|
|
186
|
+
T,
|
|
187
|
+
G,
|
|
188
|
+
Q,
|
|
187
189
|
Z,
|
|
190
|
+
$,
|
|
188
191
|
X,
|
|
189
|
-
Q,
|
|
190
|
-
Y,
|
|
191
192
|
d
|
|
192
193
|
]);
|
|
193
|
-
ze(
|
|
194
|
-
let
|
|
195
|
-
let e =
|
|
196
|
-
if (!
|
|
197
|
-
let t =
|
|
194
|
+
ze(yt);
|
|
195
|
+
let bt = f(async () => {
|
|
196
|
+
let e = z || M?.pages?.[0]?.id;
|
|
197
|
+
if (!V || !r || !e) return;
|
|
198
|
+
let t = R.get(V);
|
|
198
199
|
if (!t) {
|
|
199
|
-
|
|
200
|
+
U();
|
|
200
201
|
return;
|
|
201
202
|
}
|
|
202
203
|
let n = {
|
|
203
204
|
x: 0,
|
|
204
|
-
y: Array.from(
|
|
205
|
+
y: Array.from(R.values()).reduce((e, t) => {
|
|
205
206
|
let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
|
|
206
207
|
return Math.max(e, n);
|
|
207
208
|
}, 0),
|
|
208
|
-
width: Math.min(t.positionWidth ?? 4,
|
|
209
|
+
width: Math.min(t.positionWidth ?? 4, M?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
|
|
209
210
|
height: t.positionHeight ?? 4
|
|
210
|
-
}, i =
|
|
211
|
+
}, i = H === "copy" ? d("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, a = null;
|
|
211
212
|
try {
|
|
212
|
-
a = await
|
|
213
|
+
a = await ot(V, n, i);
|
|
213
214
|
} catch {}
|
|
214
|
-
a ||= await
|
|
215
|
+
a ||= await it({
|
|
215
216
|
pageId: e,
|
|
216
217
|
dashboardId: r,
|
|
217
218
|
type: t.type,
|
|
@@ -225,354 +226,356 @@ var y = d(function() {
|
|
|
225
226
|
position: n,
|
|
226
227
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
227
228
|
metadata: t.metadata
|
|
228
|
-
}), a && (
|
|
229
|
+
}), a && (W(a.id), H === "cut" && await at(V)), U();
|
|
229
230
|
}, [
|
|
231
|
+
V,
|
|
230
232
|
H,
|
|
231
|
-
U,
|
|
232
233
|
r,
|
|
233
|
-
B,
|
|
234
|
-
I,
|
|
235
234
|
z,
|
|
235
|
+
M,
|
|
236
|
+
R,
|
|
237
|
+
ot,
|
|
236
238
|
it,
|
|
237
|
-
|
|
238
|
-
rt,
|
|
239
|
-
G,
|
|
239
|
+
at,
|
|
240
240
|
W,
|
|
241
|
+
U,
|
|
241
242
|
d
|
|
242
|
-
]),
|
|
243
|
-
|
|
244
|
-
}, []), [
|
|
245
|
-
|
|
246
|
-
}, []), wt = f(() => {
|
|
247
|
-
St(!1);
|
|
243
|
+
]), xt = f(() => {
|
|
244
|
+
qe(!0);
|
|
245
|
+
}, []), [St, Ct] = h(!1), wt = f(() => {
|
|
246
|
+
Ct(!0);
|
|
248
247
|
}, []), Tt = f(() => {
|
|
249
|
-
|
|
250
|
-
}, []),
|
|
251
|
-
|
|
252
|
-
|
|
248
|
+
Ct(!1);
|
|
249
|
+
}, []), Et = f(() => {
|
|
250
|
+
qe(!1);
|
|
251
|
+
}, []), [Dt, Ot] = h(!1), kt = f(() => Ot(!0), []), At = f(() => Ot(!1), []), jt = f(async () => {
|
|
252
|
+
if (!M || !r || b) return;
|
|
253
|
+
let e = (M.pages?.length || 0) + 1, t = d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await ct({
|
|
253
254
|
dashboardId: r,
|
|
254
255
|
name: t,
|
|
255
|
-
gridColumns:
|
|
256
|
+
gridColumns: ye().defaultGridColumns
|
|
256
257
|
});
|
|
257
|
-
n && (
|
|
258
|
-
...
|
|
259
|
-
pages: [...
|
|
260
|
-
}),
|
|
258
|
+
n && (N({
|
|
259
|
+
...M,
|
|
260
|
+
pages: [...M.pages || [], n]
|
|
261
|
+
}), B(n.id));
|
|
261
262
|
}, [
|
|
262
|
-
|
|
263
|
+
M,
|
|
263
264
|
r,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
b,
|
|
266
|
+
N,
|
|
267
|
+
ct,
|
|
268
|
+
B,
|
|
268
269
|
d
|
|
269
|
-
]),
|
|
270
|
-
|
|
270
|
+
]), Mt = f(async (e, t) => {
|
|
271
|
+
M && !b && await lt({
|
|
271
272
|
id: e,
|
|
272
273
|
name: t
|
|
273
|
-
}) &&
|
|
274
|
-
...
|
|
275
|
-
pages:
|
|
274
|
+
}) && N({
|
|
275
|
+
...M,
|
|
276
|
+
pages: M.pages?.map((n) => n.id === e ? {
|
|
276
277
|
...n,
|
|
277
278
|
name: t
|
|
278
279
|
} : n)
|
|
279
280
|
});
|
|
280
281
|
}, [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
]),
|
|
286
|
-
if (!
|
|
287
|
-
let t =
|
|
282
|
+
M,
|
|
283
|
+
b,
|
|
284
|
+
N,
|
|
285
|
+
lt
|
|
286
|
+
]), Nt = f(async (e) => {
|
|
287
|
+
if (!M || !r || b) return;
|
|
288
|
+
let t = M.pages?.find((t) => t.id === e);
|
|
288
289
|
if (!t) return;
|
|
289
|
-
let n = await
|
|
290
|
-
n && (
|
|
291
|
-
...
|
|
292
|
-
pages: [...
|
|
293
|
-
}),
|
|
290
|
+
let n = await dt(e, d("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
|
|
291
|
+
n && (N({
|
|
292
|
+
...M,
|
|
293
|
+
pages: [...M.pages || [], n]
|
|
294
|
+
}), B(n.id));
|
|
294
295
|
}, [
|
|
295
|
-
|
|
296
|
+
M,
|
|
296
297
|
r,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
b,
|
|
299
|
+
N,
|
|
300
|
+
dt,
|
|
301
|
+
B,
|
|
301
302
|
d
|
|
302
|
-
]),
|
|
303
|
-
if (!(!
|
|
304
|
-
let t =
|
|
303
|
+
]), Pt = f(async (e) => {
|
|
304
|
+
if (!(!M || b || (M.pages?.length || 0) <= 1) && await ut(e)) {
|
|
305
|
+
let t = M.pages?.filter((t) => t.id !== e).map((e, t) => ({
|
|
305
306
|
...e,
|
|
306
307
|
order: t
|
|
307
308
|
}));
|
|
308
|
-
|
|
309
|
-
...
|
|
309
|
+
N({
|
|
310
|
+
...M,
|
|
310
311
|
pages: t
|
|
311
312
|
});
|
|
312
313
|
let n = t?.[0]?.id;
|
|
313
|
-
|
|
314
|
+
z === e && n && B(n, { replace: !0 });
|
|
314
315
|
}
|
|
315
316
|
}, [
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
]),
|
|
323
|
-
if (!
|
|
324
|
-
|
|
325
|
-
...
|
|
317
|
+
M,
|
|
318
|
+
b,
|
|
319
|
+
N,
|
|
320
|
+
z,
|
|
321
|
+
ut,
|
|
322
|
+
B
|
|
323
|
+
]), Ft = f(async (e) => {
|
|
324
|
+
if (!M || !r || b) return;
|
|
325
|
+
N({
|
|
326
|
+
...M,
|
|
326
327
|
pages: e.map((e, t) => ({
|
|
327
328
|
...e,
|
|
328
329
|
order: t
|
|
329
330
|
}))
|
|
330
331
|
});
|
|
331
332
|
let t = e.map((e) => e.id);
|
|
332
|
-
await
|
|
333
|
+
await ft(r, t);
|
|
333
334
|
}, [
|
|
334
|
-
|
|
335
|
+
M,
|
|
335
336
|
r,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
b,
|
|
338
|
+
N,
|
|
339
|
+
ft
|
|
339
340
|
]);
|
|
340
|
-
return
|
|
341
|
+
return C ? /* @__PURE__ */ v("div", {
|
|
341
342
|
className: "flex items-center justify-center h-full",
|
|
342
|
-
children: /* @__PURE__ */
|
|
343
|
-
}) :
|
|
343
|
+
children: /* @__PURE__ */ v("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
344
|
+
}) : w ? K ? /* @__PURE__ */ v("div", {
|
|
344
345
|
className: "flex h-full flex-col items-center justify-center",
|
|
345
346
|
style: { padding: "var(--space-pagePadding)" },
|
|
346
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ v(o, {
|
|
347
348
|
headingLevel: 2,
|
|
348
349
|
tone: "danger",
|
|
349
350
|
title: d("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
350
|
-
description: /* @__PURE__ */
|
|
351
|
+
description: /* @__PURE__ */ v("span", {
|
|
351
352
|
className: "break-words",
|
|
352
|
-
children:
|
|
353
|
+
children: K.message
|
|
353
354
|
}),
|
|
354
355
|
className: "w-full max-w-md",
|
|
355
356
|
"data-testid": "dashboard-view-error",
|
|
356
|
-
actions: /* @__PURE__ */
|
|
357
|
+
actions: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(g, {
|
|
357
358
|
size: "sm",
|
|
358
|
-
onClick: () =>
|
|
359
|
+
onClick: () => q(r),
|
|
359
360
|
children: d("bigconsole.dashboards.view.retry", "Retry")
|
|
360
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ v(g, {
|
|
361
362
|
size: "sm",
|
|
362
363
|
variant: "outline",
|
|
363
364
|
onClick: () => c("/dashboards"),
|
|
364
365
|
children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
365
366
|
})] })
|
|
366
367
|
})
|
|
367
|
-
}) :
|
|
368
|
+
}) : T ? /* @__PURE__ */ v("div", {
|
|
368
369
|
className: "flex flex-col items-center justify-center h-full",
|
|
369
370
|
style: { padding: "var(--space-pagePadding)" },
|
|
370
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ v(Ie, {
|
|
371
372
|
illustration: "empty-data",
|
|
372
373
|
kind: "not-found",
|
|
373
374
|
size: "page",
|
|
374
375
|
title: d("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
|
|
375
|
-
description: /* @__PURE__ */
|
|
376
|
+
description: /* @__PURE__ */ y(_, { children: [d("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ v("span", {
|
|
376
377
|
className: "mt-2 block font-mono text-xs text-text-muted break-all",
|
|
377
378
|
children: d("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: r ?? "" })
|
|
378
379
|
})] }),
|
|
379
|
-
action: /* @__PURE__ */
|
|
380
|
+
action: /* @__PURE__ */ v(g, {
|
|
380
381
|
onClick: () => c("/dashboards"),
|
|
381
382
|
children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
382
383
|
})
|
|
383
384
|
})
|
|
384
|
-
}) :
|
|
385
|
+
}) : G || !M ? /* @__PURE__ */ v("div", {
|
|
385
386
|
className: "flex items-center justify-center h-full",
|
|
386
387
|
role: "status",
|
|
387
388
|
"aria-live": "polite",
|
|
388
|
-
children: /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ y("div", {
|
|
389
390
|
className: "flex flex-col items-center gap-4",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ v("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ v("p", {
|
|
391
392
|
className: "text-sm text-text-secondary",
|
|
392
393
|
children: d("bigconsole.dashboards.view.loading", "Loading dashboard...")
|
|
393
394
|
})]
|
|
394
395
|
})
|
|
395
|
-
}) : /* @__PURE__ */
|
|
396
|
-
ref:
|
|
396
|
+
}) : /* @__PURE__ */ y(_, { children: [!b && /* @__PURE__ */ v(Be, {}), /* @__PURE__ */ y("div", {
|
|
397
|
+
ref: pt,
|
|
397
398
|
className: "h-full flex flex-col overflow-hidden",
|
|
398
399
|
children: [
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ v(o, {
|
|
400
401
|
emphasis: "bare",
|
|
401
402
|
padding: "none",
|
|
402
403
|
"data-testid": "dashboard-route-header",
|
|
403
404
|
"aria-label": "Dashboard",
|
|
404
405
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
405
406
|
headerClassName: "",
|
|
406
|
-
header: /* @__PURE__ */
|
|
407
|
+
header: /* @__PURE__ */ y("div", {
|
|
407
408
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
408
409
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
onClick:
|
|
410
|
+
/* @__PURE__ */ y(g, {
|
|
411
|
+
onClick: gt,
|
|
411
412
|
variant: "ghost",
|
|
412
413
|
size: "sm",
|
|
413
414
|
title: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
414
415
|
"aria-label": d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
415
416
|
className: "flex-shrink-0",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ v(Me, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.back", "Back")]
|
|
417
418
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ v("h1", {
|
|
419
420
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
420
|
-
title:
|
|
421
|
-
...
|
|
422
|
-
children:
|
|
421
|
+
title: M.name,
|
|
422
|
+
...Ee(M.id),
|
|
423
|
+
children: M.name
|
|
423
424
|
}),
|
|
424
|
-
!
|
|
425
|
-
dashboardId:
|
|
426
|
-
enabled: !
|
|
425
|
+
!b && /* @__PURE__ */ v(pe, {
|
|
426
|
+
dashboardId: M.id,
|
|
427
|
+
enabled: !b
|
|
427
428
|
}),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
|
|
429
430
|
className: "flex-shrink-0",
|
|
430
|
-
children: /* @__PURE__ */
|
|
431
|
-
onClick: () =>
|
|
432
|
-
variant:
|
|
431
|
+
children: /* @__PURE__ */ y(g, {
|
|
432
|
+
onClick: () => $e((e) => !e),
|
|
433
|
+
variant: O ? "secondary" : "ghost",
|
|
433
434
|
size: "sm",
|
|
434
|
-
"aria-pressed":
|
|
435
|
+
"aria-pressed": O,
|
|
435
436
|
"data-testid": "dashboard-comments-button",
|
|
436
437
|
title: d("bigconsole.dashboard.comments.openButton", "Console comments"),
|
|
437
438
|
"aria-label": d("bigconsole.dashboard.comments.openButton", "Console comments"),
|
|
438
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ v(Ne, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboard.comments.buttonLabel", "Comments")]
|
|
439
440
|
})
|
|
440
441
|
}) }),
|
|
441
|
-
!
|
|
442
|
+
!b && /* @__PURE__ */ v("div", {
|
|
442
443
|
className: "flex-shrink-0",
|
|
443
|
-
children: /* @__PURE__ */
|
|
444
|
-
isLive:
|
|
445
|
-
onToggle: () =>
|
|
444
|
+
children: /* @__PURE__ */ v(ce, {
|
|
445
|
+
isLive: D,
|
|
446
|
+
onToggle: () => Je((e) => !e)
|
|
446
447
|
})
|
|
447
448
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
|
|
449
450
|
className: "flex-shrink-0",
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
-
onClick: () =>
|
|
451
|
+
children: /* @__PURE__ */ y(g, {
|
|
452
|
+
onClick: () => Qe((e) => !e),
|
|
452
453
|
variant: "ghost",
|
|
453
454
|
size: "sm",
|
|
454
|
-
"aria-pressed":
|
|
455
|
+
"aria-pressed": Ze,
|
|
455
456
|
title: d("bigconsole.fleet.children.title", "Children"),
|
|
456
457
|
"aria-label": d("bigconsole.fleet.children.title", "Children"),
|
|
457
458
|
"data-testid": "fleet-children-toggle",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ v(Pe, { className: "w-4 h-4 mr-2" }), d("bigconsole.fleet.children.title", "Children")]
|
|
459
460
|
})
|
|
460
461
|
}) }),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
|
|
462
463
|
className: "flex-shrink-0",
|
|
463
|
-
children: /* @__PURE__ */
|
|
464
|
-
onClick: () =>
|
|
464
|
+
children: /* @__PURE__ */ y(g, {
|
|
465
|
+
onClick: () => Xe((e) => !e),
|
|
465
466
|
variant: "ghost",
|
|
466
467
|
size: "sm",
|
|
467
|
-
"aria-pressed":
|
|
468
|
+
"aria-pressed": Ye,
|
|
468
469
|
title: d("bigconsole.dashboards.view.digest", "Console digest"),
|
|
469
470
|
"aria-label": d("bigconsole.dashboards.view.digest", "Console digest"),
|
|
470
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ v(Fe, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.digest", "Digest")]
|
|
471
472
|
})
|
|
472
473
|
}) })
|
|
473
474
|
]
|
|
474
475
|
})
|
|
475
476
|
}),
|
|
476
|
-
|
|
477
|
+
Y.length > 0 && !b && /* @__PURE__ */ v("div", {
|
|
477
478
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
478
|
-
children: /* @__PURE__ */
|
|
479
|
-
ancestors:
|
|
480
|
-
currentName:
|
|
481
|
-
onNavigate:
|
|
479
|
+
children: /* @__PURE__ */ v(ne, {
|
|
480
|
+
ancestors: Y,
|
|
481
|
+
currentName: M.name,
|
|
482
|
+
onNavigate: vt
|
|
482
483
|
})
|
|
483
484
|
}),
|
|
484
|
-
|
|
485
|
+
Ze && M && !b && /* @__PURE__ */ v("div", {
|
|
485
486
|
className: "flex-shrink-0 overflow-y-auto border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
|
|
486
487
|
style: { maxHeight: "50vh" },
|
|
487
488
|
"data-testid": "fleet-children-scroll",
|
|
488
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ v("div", {
|
|
489
490
|
className: "mx-auto max-w-3xl",
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
dashboardId:
|
|
492
|
-
dashboardName:
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
491
|
+
children: /* @__PURE__ */ v(re, {
|
|
492
|
+
dashboardId: M.id,
|
|
493
|
+
dashboardName: M.name,
|
|
494
|
+
masterName: ae(Y, _t),
|
|
495
|
+
onBoardChanged: J,
|
|
496
|
+
onClose: () => Qe(!1),
|
|
497
|
+
onOpenBoard: vt
|
|
498
|
+
}, M.id)
|
|
496
499
|
})
|
|
497
500
|
}),
|
|
498
|
-
|
|
501
|
+
Ye && M && /* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
|
|
499
502
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
|
|
500
|
-
children: /* @__PURE__ */
|
|
503
|
+
children: /* @__PURE__ */ v("div", {
|
|
501
504
|
className: "mx-auto max-w-3xl",
|
|
502
|
-
children: /* @__PURE__ */
|
|
503
|
-
dashboardId:
|
|
504
|
-
onClose: () =>
|
|
505
|
+
children: /* @__PURE__ */ v(we, {
|
|
506
|
+
dashboardId: M.id,
|
|
507
|
+
onClose: () => Xe(!1)
|
|
505
508
|
})
|
|
506
509
|
})
|
|
507
510
|
}) }),
|
|
508
|
-
|
|
509
|
-
currentDashboardId:
|
|
510
|
-
currentDashboardName:
|
|
511
|
+
k && !b && /* @__PURE__ */ v(ue, {
|
|
512
|
+
currentDashboardId: M.id,
|
|
513
|
+
currentDashboardName: M.name,
|
|
511
514
|
basePath: `${u}/dashboards`
|
|
512
515
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ v("div", {
|
|
514
517
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
515
|
-
children: /* @__PURE__ */
|
|
516
|
-
dashboardId:
|
|
517
|
-
pageId:
|
|
518
|
-
title:
|
|
519
|
-
onPaste:
|
|
520
|
-
onSave:
|
|
521
|
-
isSaving:
|
|
522
|
-
onReview:
|
|
523
|
-
onExport:
|
|
524
|
-
onPublishTemplate:
|
|
525
|
-
pages:
|
|
526
|
-
activePageId:
|
|
527
|
-
onPageChange:
|
|
528
|
-
onPageAdd:
|
|
529
|
-
onPageRename:
|
|
530
|
-
onPageDuplicate:
|
|
531
|
-
onPageDelete:
|
|
532
|
-
onPagesReorder:
|
|
518
|
+
children: /* @__PURE__ */ v(se, {
|
|
519
|
+
dashboardId: M.id,
|
|
520
|
+
pageId: z || M.pages?.[0]?.id,
|
|
521
|
+
title: M.name,
|
|
522
|
+
onPaste: bt,
|
|
523
|
+
onSave: Ve && !b ? ht : void 0,
|
|
524
|
+
isSaving: We,
|
|
525
|
+
onReview: b ? void 0 : kt,
|
|
526
|
+
onExport: He && !b ? xt : void 0,
|
|
527
|
+
onPublishTemplate: Ue && !b ? wt : void 0,
|
|
528
|
+
pages: Z,
|
|
529
|
+
activePageId: $ ?? void 0,
|
|
530
|
+
onPageChange: X,
|
|
531
|
+
onPageAdd: jt,
|
|
532
|
+
onPageRename: Mt,
|
|
533
|
+
onPageDuplicate: Nt,
|
|
534
|
+
onPageDelete: Pt,
|
|
535
|
+
onPagesReorder: Ft,
|
|
533
536
|
showPageTabs: !0
|
|
534
537
|
})
|
|
535
538
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
open:
|
|
538
|
-
onClose:
|
|
539
|
-
dashboardId:
|
|
540
|
-
pages:
|
|
541
|
-
canFix:
|
|
539
|
+
/* @__PURE__ */ v(fe, {
|
|
540
|
+
open: Dt && !b,
|
|
541
|
+
onClose: At,
|
|
542
|
+
dashboardId: M.id,
|
|
543
|
+
pages: Z,
|
|
544
|
+
canFix: Ve && !b
|
|
542
545
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
isOpen:
|
|
545
|
-
dashboardId:
|
|
546
|
-
dashboardName:
|
|
547
|
-
onClose:
|
|
546
|
+
/* @__PURE__ */ v(le, {
|
|
547
|
+
isOpen: Ke && !b,
|
|
548
|
+
dashboardId: M.id,
|
|
549
|
+
dashboardName: M.name,
|
|
550
|
+
onClose: Et
|
|
548
551
|
}),
|
|
549
|
-
!
|
|
550
|
-
dashboardId:
|
|
551
|
-
isOpen:
|
|
552
|
-
onClose: () =>
|
|
553
|
-
widgets: Array.from(
|
|
552
|
+
!b && /* @__PURE__ */ v(me, {
|
|
553
|
+
dashboardId: M.id,
|
|
554
|
+
isOpen: O && !b,
|
|
555
|
+
onClose: () => $e(!1),
|
|
556
|
+
widgets: Array.from(R.values()).map((e) => ({
|
|
554
557
|
id: e.id,
|
|
555
558
|
title: e.title || e.type
|
|
556
559
|
})),
|
|
557
|
-
onSelectWidget: (e) =>
|
|
560
|
+
onSelectWidget: (e) => W(e)
|
|
558
561
|
}),
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
isOpen:
|
|
561
|
-
dashboardId:
|
|
562
|
-
dashboardName:
|
|
563
|
-
dashboardDescription:
|
|
564
|
-
onClose:
|
|
562
|
+
/* @__PURE__ */ v(de, {
|
|
563
|
+
isOpen: St && !b,
|
|
564
|
+
dashboardId: M.id,
|
|
565
|
+
dashboardName: M.name,
|
|
566
|
+
dashboardDescription: M.description,
|
|
567
|
+
onClose: Tt
|
|
565
568
|
})
|
|
566
569
|
]
|
|
567
|
-
})] }) : /* @__PURE__ */
|
|
570
|
+
})] }) : /* @__PURE__ */ v(Ae, {
|
|
568
571
|
title: d("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
|
|
569
572
|
description: d("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
570
573
|
});
|
|
571
|
-
}), Be = () => (u(), null),
|
|
574
|
+
}), Be = () => (u(), null), x = d(function() {
|
|
572
575
|
let { workspaceId: e } = r();
|
|
573
|
-
return /* @__PURE__ */
|
|
576
|
+
return /* @__PURE__ */ v(c, {
|
|
574
577
|
workspaceId: e,
|
|
575
|
-
children: /* @__PURE__ */
|
|
578
|
+
children: /* @__PURE__ */ v(b, {})
|
|
576
579
|
});
|
|
577
580
|
});
|
|
578
|
-
export {
|
|
581
|
+
export { b as DashboardViewPage, x as default };
|