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