@burdenoff/microfe-bigconsole 2026.1118.6 → 2026.1118.8
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/dashboard/DashboardCanvas.d.ts +2 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +69 -68
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.d.ts +13 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +136 -0
- package/dist/bigconsole/components/dashboard/DashboardToolbar.d.ts +2 -0
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +102 -89
- package/dist/bigconsole/components/dashboard/index.d.ts +1 -0
- package/dist/bigconsole/components/dashboard/index.js +2 -1
- package/dist/bigconsole/components/explore/SavedQueryWidget.d.ts +3 -1
- package/dist/bigconsole/components/explore/SavedQueryWidget.js +22 -18
- package/dist/bigconsole/components/insights/BoardLintPanel.d.ts +18 -8
- package/dist/bigconsole/components/insights/BoardLintPanel.js +52 -52
- package/dist/bigconsole/components/widgets/WidgetMenu.js +86 -75
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +221 -209
- package/dist/bigconsole/pages/DashboardViewPage.js +191 -182
- package/dist/bigconsole/utils/boardLint.d.ts +8 -0
- package/dist/bigconsole/utils/boardLint.js +4 -0
- package/dist/bigconsole/utils/savedBoardLint.d.ts +102 -0
- package/dist/bigconsole/utils/savedBoardLint.js +100 -0
- package/package.json +1 -1
|
@@ -21,25 +21,26 @@ import { LiveCanvasToggle as se } from "../components/dashboard/LiveCanvasToggle
|
|
|
21
21
|
import { ExportDashboardDialog as ce } from "../components/dashboard/ExportDashboardDialog.js";
|
|
22
22
|
import { DrilldownBreadcrumb as le } from "../components/dashboard/DrilldownBreadcrumb.js";
|
|
23
23
|
import { PublishToStoreDialog as ue } from "../components/dashboard/PublishToStoreDialog.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
24
|
+
import { DashboardReviewDialog as de } from "../components/dashboard/DashboardReviewDialog.js";
|
|
25
|
+
import { loadBigConsoleSettings as fe } from "../hooks/useBigConsoleSettings.js";
|
|
26
|
+
import { LIVE_STRUCTURE_POLL_MS as pe, isLiveDataRefreshDue as me } from "../utils/liveBoardRefresh.js";
|
|
27
|
+
import { registerBreadcrumbName as he, unregisterBreadcrumbName as ge } from "../utils/breadcrumbRegistry.js";
|
|
28
|
+
import { DigestPanel as _e } from "../components/narrative/DigestPanel.js";
|
|
29
|
+
import { GetWidgetDocument as ve } from "../../generated/wspace-operations.js";
|
|
30
|
+
import { dashboardSuggestAnchorProps as ye } from "../proactive/entities.js";
|
|
31
|
+
import { memo as c, useCallback as l, useEffect as u, useMemo as d, useRef as be, useState as f } from "react";
|
|
32
|
+
import { useLocation as xe, useParams as Se } from "react-router";
|
|
33
|
+
import { AccessDenied as Ce } from "@burdenoff/fe-libs/shared/components";
|
|
34
|
+
import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
35
|
+
import { ArrowLeft as Te, Sparkles as Ee } from "lucide-react";
|
|
36
|
+
import { Button as p, IllustratedEmptyState as De } from "@burdenoff/fe-libs/ui";
|
|
37
|
+
import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
38
|
+
import { useApolloClient as ke } from "@apollo/client/react";
|
|
38
39
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
39
|
-
import { useAssistantPageControls as
|
|
40
|
+
import { useAssistantPageControls as Ae } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
40
41
|
// src/bigconsole/pages/DashboardViewPage.tsx
|
|
41
42
|
var _ = c(function() {
|
|
42
|
-
let { dashboardId: c } =
|
|
43
|
+
let { dashboardId: c } = Se(), _ = i(), je = r(), { t: v } = Oe(), y = ke(), { hasPermission: b, isLoading: x } = we(), S = b(n.DASHBOARD_READ), Me = b(n.DASHBOARD_UPDATE), Ne = b(n.DASHBOARD_EXPORT), Pe = b(n.DASHBOARD_PUBLISH), [Fe, C] = f(!1), [w, T] = f(!1), [Ie, E] = f(!1), [D, Le] = f(!1), [Re, ze] = f(!1), { isInDrilldown: O, getContextFromUrl: k, getDrilldownMetadata: A } = ne(), j = t((e) => e.currentDashboard), M = t((e) => e.setCurrentDashboard), N = t((e) => e.setGlobalFilterValue), P = t((e) => e.clearAllGlobalFilters), F = t((e) => e.setGlobalFilterValues), I = e((e) => e.widgets), Be = xe(), { activePageId: L, setActivePage: R } = ie(j?.id === c ? j?.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: K } = ee(), { createWidget: q, deleteWidget: J, duplicateWidget: Ve, batchUpdatePositions: He, refetch: Y } = s(L || void 0, c), { createPage: Ue, updatePage: We, deletePage: Ge, duplicatePage: Ke, reorderPages: qe } = te(), Je = l((e) => {
|
|
43
44
|
let t = e?.parentElement;
|
|
44
45
|
if (!e || !t) return;
|
|
45
46
|
let n = t;
|
|
@@ -60,95 +61,95 @@ var _ = c(function() {
|
|
|
60
61
|
}, []);
|
|
61
62
|
u(() => {
|
|
62
63
|
if (!c) _("/dashboards");
|
|
63
|
-
else return
|
|
64
|
-
e ||
|
|
64
|
+
else return F(re(window.location.search, "filter_")), T(!1), G(c).then((e) => {
|
|
65
|
+
e || T(!0);
|
|
65
66
|
}), () => {
|
|
66
|
-
|
|
67
|
+
M(null), P(), T(!1);
|
|
67
68
|
};
|
|
68
69
|
}, [
|
|
69
70
|
c,
|
|
70
71
|
_,
|
|
71
|
-
|
|
72
|
-
A,
|
|
72
|
+
G,
|
|
73
73
|
M,
|
|
74
|
-
|
|
74
|
+
P,
|
|
75
|
+
F
|
|
75
76
|
]), u(() => {
|
|
76
77
|
if (!O) return;
|
|
77
|
-
let e =
|
|
78
|
+
let e = k(), t = A();
|
|
78
79
|
Object.entries(e).forEach(([e, t]) => {
|
|
79
|
-
|
|
80
|
-
}), t.depth > 0 && (
|
|
80
|
+
N(`ctx_${e}`, t);
|
|
81
|
+
}), t.depth > 0 && (N("__drilldown_depth", t.depth), N("__drilldown_parent", t.parent), N("__drilldown_path", t.path)), Object.keys(e).length;
|
|
81
82
|
}, [
|
|
82
83
|
O,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
k,
|
|
85
|
+
A,
|
|
86
|
+
N,
|
|
87
|
+
Be.search
|
|
87
88
|
]);
|
|
88
|
-
let
|
|
89
|
-
|
|
90
|
-
if (!
|
|
89
|
+
let Ye = be(Y);
|
|
90
|
+
Ye.current = Y, u(() => {
|
|
91
|
+
if (!D || !c) return;
|
|
91
92
|
let e = null, n = () => {
|
|
92
93
|
if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
|
|
93
|
-
|
|
94
|
+
G(c, { silent: !0 }), Ye.current();
|
|
94
95
|
let n = Date.now();
|
|
95
|
-
|
|
96
|
+
me(e, n) && (e = n, y.refetchQueries({ include: [ve] }).catch((e) => {
|
|
96
97
|
console.warn("[DashboardViewPage] Live widget data refresh failed", e);
|
|
97
98
|
}));
|
|
98
99
|
};
|
|
99
100
|
n();
|
|
100
|
-
let r = window.setInterval(n,
|
|
101
|
+
let r = window.setInterval(n, pe), i = () => {
|
|
101
102
|
document.visibilityState === "visible" && (e = null, n());
|
|
102
103
|
};
|
|
103
104
|
return document.addEventListener("visibilitychange", i), () => {
|
|
104
105
|
window.clearInterval(r), document.removeEventListener("visibilitychange", i);
|
|
105
106
|
};
|
|
106
107
|
}, [
|
|
107
|
-
|
|
108
|
+
D,
|
|
108
109
|
c,
|
|
109
|
-
|
|
110
|
+
G,
|
|
110
111
|
y
|
|
111
112
|
]);
|
|
112
|
-
let
|
|
113
|
+
let Xe = l(async () => {
|
|
113
114
|
if (c) {
|
|
114
|
-
|
|
115
|
+
C(!0);
|
|
115
116
|
try {
|
|
116
|
-
let e = Array.from(
|
|
117
|
+
let e = Array.from(I.values());
|
|
117
118
|
if (e.length > 0) {
|
|
118
119
|
let t = e.map((e) => ({
|
|
119
120
|
id: e.id,
|
|
120
121
|
position: e.position
|
|
121
122
|
}));
|
|
122
|
-
await
|
|
123
|
+
await He(t);
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
j && await K({
|
|
125
126
|
id: c,
|
|
126
|
-
name:
|
|
127
|
-
description:
|
|
127
|
+
name: j.name,
|
|
128
|
+
description: j.description
|
|
128
129
|
});
|
|
129
130
|
} catch {} finally {
|
|
130
|
-
|
|
131
|
+
C(!1);
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
}, [
|
|
134
135
|
c,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
]),
|
|
136
|
+
I,
|
|
137
|
+
j,
|
|
138
|
+
He,
|
|
139
|
+
K
|
|
140
|
+
]), Ze = l(() => {
|
|
140
141
|
_("/dashboards");
|
|
141
142
|
}, [_]), X = l((e) => {
|
|
142
|
-
|
|
143
|
-
}, [
|
|
143
|
+
R(e);
|
|
144
|
+
}, [R]), Z = d(() => (j?.pages || []).map((e, t) => ({
|
|
144
145
|
id: e.id,
|
|
145
146
|
name: e.name || v("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
|
|
146
147
|
order: e.order ?? 0
|
|
147
|
-
})), [
|
|
148
|
+
})), [j?.pages, v]), Q = j && j.id === c ? j.name : null, $ = L || j?.pages?.[0]?.id || null;
|
|
148
149
|
u(() => {
|
|
149
|
-
if (c && Q) return
|
|
150
|
+
if (c && Q) return he(c, Q), () => ge(c);
|
|
150
151
|
}, [c, Q]);
|
|
151
|
-
let
|
|
152
|
+
let Qe = d(() => !x && S && !W && !w && !U && Q !== null ? oe({
|
|
152
153
|
dashboardName: Q || v("bigconsole.dashboards.title", "Dashboards"),
|
|
153
154
|
tabs: Z.map((e) => ({
|
|
154
155
|
id: e.id,
|
|
@@ -159,37 +160,37 @@ var _ = c(function() {
|
|
|
159
160
|
}) : null, [
|
|
160
161
|
x,
|
|
161
162
|
S,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
W,
|
|
164
|
+
w,
|
|
165
|
+
U,
|
|
165
166
|
Q,
|
|
166
167
|
Z,
|
|
167
168
|
$,
|
|
168
169
|
X,
|
|
169
170
|
v
|
|
170
171
|
]);
|
|
171
|
-
|
|
172
|
-
let
|
|
173
|
-
let e =
|
|
174
|
-
if (!
|
|
175
|
-
let t =
|
|
172
|
+
Ae(Qe), o();
|
|
173
|
+
let $e = l(async () => {
|
|
174
|
+
let e = L || j?.pages?.[0]?.id;
|
|
175
|
+
if (!z || !c || !e) return;
|
|
176
|
+
let t = I.get(z);
|
|
176
177
|
if (!t) {
|
|
177
|
-
|
|
178
|
+
V();
|
|
178
179
|
return;
|
|
179
180
|
}
|
|
180
181
|
let n = {
|
|
181
182
|
x: 0,
|
|
182
|
-
y: Array.from(
|
|
183
|
+
y: Array.from(I.values()).reduce((e, t) => {
|
|
183
184
|
let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
|
|
184
185
|
return Math.max(e, n);
|
|
185
186
|
}, 0),
|
|
186
|
-
width: Math.min(t.positionWidth ?? 4,
|
|
187
|
+
width: Math.min(t.positionWidth ?? 4, j?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
|
|
187
188
|
height: t.positionHeight ?? 4
|
|
188
|
-
}, r =
|
|
189
|
+
}, r = B === "copy" ? v("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
|
|
189
190
|
try {
|
|
190
|
-
i = await
|
|
191
|
+
i = await Ve(z, n, r);
|
|
191
192
|
} catch {}
|
|
192
|
-
i ||= await
|
|
193
|
+
i ||= await q({
|
|
193
194
|
pageId: e,
|
|
194
195
|
dashboardId: c,
|
|
195
196
|
type: t.type,
|
|
@@ -203,117 +204,117 @@ var _ = c(function() {
|
|
|
203
204
|
position: n,
|
|
204
205
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
205
206
|
metadata: t.metadata
|
|
206
|
-
}), i && (
|
|
207
|
+
}), i && (H(i.id), B === "cut" && await J(z)), V();
|
|
207
208
|
}, [
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
z,
|
|
210
|
+
B,
|
|
210
211
|
c,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
L,
|
|
213
|
+
j,
|
|
214
|
+
I,
|
|
215
|
+
Ve,
|
|
214
216
|
q,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
z,
|
|
217
|
+
J,
|
|
218
|
+
H,
|
|
219
|
+
V,
|
|
219
220
|
v
|
|
220
|
-
]),
|
|
221
|
-
|
|
222
|
-
}, []), [
|
|
223
|
-
|
|
224
|
-
}, []), rt = l(() => {
|
|
225
|
-
tt(!1);
|
|
221
|
+
]), et = l(() => {
|
|
222
|
+
E(!0);
|
|
223
|
+
}, []), [tt, nt] = f(!1), rt = l(() => {
|
|
224
|
+
nt(!0);
|
|
226
225
|
}, []), it = l(() => {
|
|
227
|
-
|
|
228
|
-
}, []), at = l(
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
nt(!1);
|
|
227
|
+
}, []), at = l(() => {
|
|
228
|
+
E(!1);
|
|
229
|
+
}, []), [ot, st] = f(!1), ct = l(() => st(!0), []), lt = l(() => st(!1), []), ut = l(async () => {
|
|
230
|
+
if (!j || !c) return;
|
|
231
|
+
let e = (j.pages?.length || 0) + 1, t = v("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await Ue({
|
|
231
232
|
dashboardId: c,
|
|
232
233
|
name: t,
|
|
233
|
-
gridColumns:
|
|
234
|
+
gridColumns: fe().defaultGridColumns
|
|
234
235
|
});
|
|
235
|
-
n && (
|
|
236
|
-
...
|
|
237
|
-
pages: [...
|
|
238
|
-
}),
|
|
236
|
+
n && (M({
|
|
237
|
+
...j,
|
|
238
|
+
pages: [...j.pages || [], n]
|
|
239
|
+
}), R(n.id));
|
|
239
240
|
}, [
|
|
240
|
-
|
|
241
|
+
j,
|
|
241
242
|
c,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
M,
|
|
244
|
+
Ue,
|
|
245
|
+
R,
|
|
245
246
|
v
|
|
246
|
-
]),
|
|
247
|
-
|
|
247
|
+
]), dt = l(async (e, t) => {
|
|
248
|
+
j && await We({
|
|
248
249
|
id: e,
|
|
249
250
|
name: t
|
|
250
|
-
}) &&
|
|
251
|
-
...
|
|
252
|
-
pages:
|
|
251
|
+
}) && M({
|
|
252
|
+
...j,
|
|
253
|
+
pages: j.pages?.map((n) => n.id === e ? {
|
|
253
254
|
...n,
|
|
254
255
|
name: t
|
|
255
256
|
} : n)
|
|
256
257
|
});
|
|
257
258
|
}, [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
]),
|
|
262
|
-
if (!
|
|
263
|
-
let t =
|
|
259
|
+
j,
|
|
260
|
+
M,
|
|
261
|
+
We
|
|
262
|
+
]), ft = l(async (e) => {
|
|
263
|
+
if (!j || !c) return;
|
|
264
|
+
let t = j.pages?.find((t) => t.id === e);
|
|
264
265
|
if (!t) return;
|
|
265
|
-
let n = await
|
|
266
|
-
n && (
|
|
267
|
-
...
|
|
268
|
-
pages: [...
|
|
269
|
-
}),
|
|
266
|
+
let n = await Ke(e, v("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
|
|
267
|
+
n && (M({
|
|
268
|
+
...j,
|
|
269
|
+
pages: [...j.pages || [], n]
|
|
270
|
+
}), R(n.id));
|
|
270
271
|
}, [
|
|
271
|
-
|
|
272
|
+
j,
|
|
272
273
|
c,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
M,
|
|
275
|
+
Ke,
|
|
276
|
+
R,
|
|
276
277
|
v
|
|
277
|
-
]),
|
|
278
|
-
if (!(!
|
|
279
|
-
let t =
|
|
278
|
+
]), pt = l(async (e) => {
|
|
279
|
+
if (!(!j || (j.pages?.length || 0) <= 1) && await Ge(e)) {
|
|
280
|
+
let t = j.pages?.filter((t) => t.id !== e).map((e, t) => ({
|
|
280
281
|
...e,
|
|
281
282
|
order: t
|
|
282
283
|
}));
|
|
283
|
-
|
|
284
|
-
...
|
|
284
|
+
M({
|
|
285
|
+
...j,
|
|
285
286
|
pages: t
|
|
286
287
|
});
|
|
287
288
|
let n = t?.[0]?.id;
|
|
288
|
-
|
|
289
|
+
L === e && n && R(n, { replace: !0 });
|
|
289
290
|
}
|
|
290
291
|
}, [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
]),
|
|
297
|
-
if (!
|
|
298
|
-
|
|
299
|
-
...
|
|
292
|
+
j,
|
|
293
|
+
M,
|
|
294
|
+
L,
|
|
295
|
+
Ge,
|
|
296
|
+
R
|
|
297
|
+
]), mt = l(async (e) => {
|
|
298
|
+
if (!j || !c) return;
|
|
299
|
+
M({
|
|
300
|
+
...j,
|
|
300
301
|
pages: e.map((e, t) => ({
|
|
301
302
|
...e,
|
|
302
303
|
order: t
|
|
303
304
|
}))
|
|
304
305
|
});
|
|
305
306
|
let t = e.map((e) => e.id);
|
|
306
|
-
await
|
|
307
|
+
await qe(c, t);
|
|
307
308
|
}, [
|
|
308
|
-
|
|
309
|
+
j,
|
|
309
310
|
c,
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
M,
|
|
312
|
+
qe
|
|
312
313
|
]);
|
|
313
314
|
return x ? /* @__PURE__ */ h("div", {
|
|
314
315
|
className: "flex items-center justify-center h-full",
|
|
315
316
|
children: /* @__PURE__ */ h("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
316
|
-
}) : S ?
|
|
317
|
+
}) : S ? W ? /* @__PURE__ */ h("div", {
|
|
317
318
|
className: "flex h-full flex-col items-center justify-center",
|
|
318
319
|
style: { padding: "var(--space-pagePadding)" },
|
|
319
320
|
children: /* @__PURE__ */ h(a, {
|
|
@@ -322,13 +323,13 @@ var _ = c(function() {
|
|
|
322
323
|
title: v("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
323
324
|
description: /* @__PURE__ */ h("span", {
|
|
324
325
|
className: "break-words",
|
|
325
|
-
children:
|
|
326
|
+
children: W.message
|
|
326
327
|
}),
|
|
327
328
|
className: "w-full max-w-md",
|
|
328
329
|
"data-testid": "dashboard-view-error",
|
|
329
330
|
actions: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
|
|
330
331
|
size: "sm",
|
|
331
|
-
onClick: () =>
|
|
332
|
+
onClick: () => G(c),
|
|
332
333
|
children: v("bigconsole.dashboards.view.retry", "Retry")
|
|
333
334
|
}), /* @__PURE__ */ h(p, {
|
|
334
335
|
size: "sm",
|
|
@@ -337,10 +338,10 @@ var _ = c(function() {
|
|
|
337
338
|
children: v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
338
339
|
})] })
|
|
339
340
|
})
|
|
340
|
-
}) :
|
|
341
|
+
}) : w ? /* @__PURE__ */ h("div", {
|
|
341
342
|
className: "flex flex-col items-center justify-center h-full",
|
|
342
343
|
style: { padding: "var(--space-pagePadding)" },
|
|
343
|
-
children: /* @__PURE__ */ h(
|
|
344
|
+
children: /* @__PURE__ */ h(De, {
|
|
344
345
|
illustration: "empty-data",
|
|
345
346
|
title: v("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
|
|
346
347
|
description: /* @__PURE__ */ g(m, { children: [v("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ h("span", {
|
|
@@ -352,7 +353,7 @@ var _ = c(function() {
|
|
|
352
353
|
children: v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
353
354
|
})
|
|
354
355
|
})
|
|
355
|
-
}) :
|
|
356
|
+
}) : U || !j ? /* @__PURE__ */ h("div", {
|
|
356
357
|
className: "flex items-center justify-center h-full",
|
|
357
358
|
role: "status",
|
|
358
359
|
"aria-live": "polite",
|
|
@@ -364,7 +365,7 @@ var _ = c(function() {
|
|
|
364
365
|
})]
|
|
365
366
|
})
|
|
366
367
|
}) : /* @__PURE__ */ g("div", {
|
|
367
|
-
ref:
|
|
368
|
+
ref: Je,
|
|
368
369
|
className: "h-full flex flex-col overflow-hidden",
|
|
369
370
|
children: [
|
|
370
371
|
/* @__PURE__ */ h(a, {
|
|
@@ -378,94 +379,102 @@ var _ = c(function() {
|
|
|
378
379
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
379
380
|
children: [
|
|
380
381
|
/* @__PURE__ */ g(p, {
|
|
381
|
-
onClick:
|
|
382
|
+
onClick: Ze,
|
|
382
383
|
variant: "ghost",
|
|
383
384
|
size: "sm",
|
|
384
385
|
title: v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
385
386
|
"aria-label": v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
386
387
|
className: "flex-shrink-0",
|
|
387
|
-
children: [/* @__PURE__ */ h(
|
|
388
|
+
children: [/* @__PURE__ */ h(Te, { className: "w-4 h-4 mr-2" }), v("bigconsole.dashboards.view.back", "Back")]
|
|
388
389
|
}),
|
|
389
390
|
/* @__PURE__ */ h("h1", {
|
|
390
391
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
391
|
-
title:
|
|
392
|
-
...
|
|
393
|
-
children:
|
|
392
|
+
title: j.name,
|
|
393
|
+
...ye(j.id),
|
|
394
|
+
children: j.name
|
|
394
395
|
}),
|
|
395
396
|
/* @__PURE__ */ h("div", {
|
|
396
397
|
className: "flex-shrink-0",
|
|
397
398
|
children: /* @__PURE__ */ h(se, {
|
|
398
|
-
isLive:
|
|
399
|
+
isLive: D,
|
|
399
400
|
onToggle: () => Le((e) => !e)
|
|
400
401
|
})
|
|
401
402
|
}),
|
|
402
403
|
/* @__PURE__ */ h("div", {
|
|
403
404
|
className: "flex-shrink-0",
|
|
404
405
|
children: /* @__PURE__ */ g(p, {
|
|
405
|
-
onClick: () =>
|
|
406
|
+
onClick: () => ze((e) => !e),
|
|
406
407
|
variant: "ghost",
|
|
407
408
|
size: "sm",
|
|
408
|
-
"aria-pressed":
|
|
409
|
+
"aria-pressed": Re,
|
|
409
410
|
title: v("bigconsole.dashboards.view.digest", "Console digest"),
|
|
410
411
|
"aria-label": v("bigconsole.dashboards.view.digest", "Console digest"),
|
|
411
|
-
children: [/* @__PURE__ */ h(
|
|
412
|
+
children: [/* @__PURE__ */ h(Ee, { className: "w-4 h-4 mr-2" }), v("bigconsole.dashboards.view.digest", "Digest")]
|
|
412
413
|
})
|
|
413
414
|
})
|
|
414
415
|
]
|
|
415
416
|
})
|
|
416
417
|
}),
|
|
417
|
-
|
|
418
|
+
Re && j && /* @__PURE__ */ h("div", {
|
|
418
419
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
|
|
419
420
|
children: /* @__PURE__ */ h("div", {
|
|
420
421
|
className: "mx-auto max-w-3xl",
|
|
421
|
-
children: /* @__PURE__ */ h(
|
|
422
|
-
dashboardId:
|
|
423
|
-
onClose: () =>
|
|
422
|
+
children: /* @__PURE__ */ h(_e, {
|
|
423
|
+
dashboardId: j.id,
|
|
424
|
+
onClose: () => ze(!1)
|
|
424
425
|
})
|
|
425
426
|
})
|
|
426
427
|
}),
|
|
427
428
|
O && /* @__PURE__ */ h(le, {
|
|
428
|
-
currentDashboardId:
|
|
429
|
-
currentDashboardName:
|
|
430
|
-
basePath: `${
|
|
429
|
+
currentDashboardId: j.id,
|
|
430
|
+
currentDashboardName: j.name,
|
|
431
|
+
basePath: `${je}/dashboards`
|
|
431
432
|
}),
|
|
432
433
|
/* @__PURE__ */ h("div", {
|
|
433
434
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
434
435
|
children: /* @__PURE__ */ h(ae, {
|
|
435
|
-
dashboardId:
|
|
436
|
-
pageId:
|
|
437
|
-
title:
|
|
438
|
-
onPaste:
|
|
439
|
-
onSave:
|
|
440
|
-
isSaving:
|
|
441
|
-
|
|
442
|
-
|
|
436
|
+
dashboardId: j.id,
|
|
437
|
+
pageId: L || j.pages?.[0]?.id,
|
|
438
|
+
title: j.name,
|
|
439
|
+
onPaste: $e,
|
|
440
|
+
onSave: Me ? Xe : void 0,
|
|
441
|
+
isSaving: Fe,
|
|
442
|
+
onReview: ct,
|
|
443
|
+
onExport: Ne ? et : void 0,
|
|
444
|
+
onPublishTemplate: Pe ? rt : void 0,
|
|
443
445
|
pages: Z,
|
|
444
446
|
activePageId: $ ?? void 0,
|
|
445
447
|
onPageChange: X,
|
|
446
|
-
onPageAdd:
|
|
447
|
-
onPageRename:
|
|
448
|
-
onPageDuplicate:
|
|
449
|
-
onPageDelete:
|
|
450
|
-
onPagesReorder:
|
|
448
|
+
onPageAdd: ut,
|
|
449
|
+
onPageRename: dt,
|
|
450
|
+
onPageDuplicate: ft,
|
|
451
|
+
onPageDelete: pt,
|
|
452
|
+
onPagesReorder: mt,
|
|
451
453
|
showPageTabs: !0
|
|
452
454
|
})
|
|
453
455
|
}),
|
|
456
|
+
/* @__PURE__ */ h(de, {
|
|
457
|
+
open: ot,
|
|
458
|
+
onClose: lt,
|
|
459
|
+
dashboardId: j.id,
|
|
460
|
+
pages: Z,
|
|
461
|
+
canFix: Me
|
|
462
|
+
}),
|
|
454
463
|
/* @__PURE__ */ h(ce, {
|
|
455
464
|
isOpen: Ie,
|
|
456
|
-
dashboardId:
|
|
457
|
-
dashboardName:
|
|
458
|
-
onClose:
|
|
465
|
+
dashboardId: j.id,
|
|
466
|
+
dashboardName: j.name,
|
|
467
|
+
onClose: at
|
|
459
468
|
}),
|
|
460
469
|
/* @__PURE__ */ h(ue, {
|
|
461
|
-
isOpen:
|
|
462
|
-
dashboardId:
|
|
463
|
-
dashboardName:
|
|
464
|
-
dashboardDescription:
|
|
465
|
-
onClose:
|
|
470
|
+
isOpen: tt,
|
|
471
|
+
dashboardId: j.id,
|
|
472
|
+
dashboardName: j.name,
|
|
473
|
+
dashboardDescription: j.description,
|
|
474
|
+
onClose: it
|
|
466
475
|
})
|
|
467
476
|
]
|
|
468
|
-
}) : /* @__PURE__ */ h(
|
|
477
|
+
}) : /* @__PURE__ */ h(Ce, {
|
|
469
478
|
title: v("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
|
|
470
479
|
description: v("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
471
480
|
});
|
|
@@ -29,6 +29,12 @@ export interface LintableWidget {
|
|
|
29
29
|
dataSinkId?: string | null;
|
|
30
30
|
dataSourceId?: string | null;
|
|
31
31
|
parserId?: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the widget has a data source, when the host already knows. A saved widget can be bound in more
|
|
34
|
+
* ways than the three ids above (a dataset, a legacy sink key, a canonical binding), so the host passes its
|
|
35
|
+
* own answer here and it wins over the ids.
|
|
36
|
+
*/
|
|
37
|
+
connected?: boolean | null;
|
|
32
38
|
}
|
|
33
39
|
export interface LintablePage {
|
|
34
40
|
name: string;
|
|
@@ -61,6 +67,8 @@ export interface LintFinding {
|
|
|
61
67
|
}
|
|
62
68
|
/** One widget edit. Field names match `BigConsoleWidgetRefinementInput`. */
|
|
63
69
|
export interface LintFix {
|
|
70
|
+
/** The rule this fix repairs, so a host can re-plan it against a fresher copy of the board. */
|
|
71
|
+
ruleId?: LintRuleId;
|
|
64
72
|
widgetIndex: number;
|
|
65
73
|
title?: string;
|
|
66
74
|
/** Shallow-merged into the widget config. */
|
|
@@ -33,6 +33,7 @@ function a(t) {
|
|
|
33
33
|
return e.has(n) || n.endsWith("_chart");
|
|
34
34
|
}
|
|
35
35
|
function o(e) {
|
|
36
|
+
if (typeof e.connected == "boolean") return e.connected;
|
|
36
37
|
let t = n(e.config) ? e.config : {};
|
|
37
38
|
return !!(e.dataSinkId || e.dataSourceId || e.parserId || t.dataSinkId || t.dataSourceId);
|
|
38
39
|
}
|
|
@@ -228,6 +229,7 @@ function C(e, t) {
|
|
|
228
229
|
let r = b(e, t);
|
|
229
230
|
if (!r) return null;
|
|
230
231
|
if (t.ruleId === "TRUNCATED_AREA_AXIS") return {
|
|
232
|
+
ruleId: t.ruleId,
|
|
231
233
|
widgetIndex: t.widgetFlatIndex,
|
|
232
234
|
configOverrides: {
|
|
233
235
|
startAtZero: !0,
|
|
@@ -253,6 +255,7 @@ function C(e, t) {
|
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
return o && (a.columns = o), {
|
|
258
|
+
ruleId: t.ruleId,
|
|
256
259
|
widgetIndex: t.widgetFlatIndex,
|
|
257
260
|
configOverrides: a,
|
|
258
261
|
summary: u ? "Add an icon next to each colour-coded rule (check, alert, flag or dot) so the meaning does not rely on colour. Whole-row and card rules get bold text instead." : "Make the value bold wherever a colour rule matches, so the meaning does not rely on colour."
|
|
@@ -263,6 +266,7 @@ function C(e, t) {
|
|
|
263
266
|
if (!n) return null;
|
|
264
267
|
let i = x(n, r.title);
|
|
265
268
|
return {
|
|
269
|
+
ruleId: t.ruleId,
|
|
266
270
|
widgetIndex: t.widgetFlatIndex,
|
|
267
271
|
title: i,
|
|
268
272
|
summary: `Rename this widget to "${i}".`
|