@burdenoff/microfe-bigconsole 2026.1124.8 → 2026.1124.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/components/dashboard/DashboardGalleryCard.d.ts +3 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +14 -9
- package/dist/bigconsole/components/fleet/FleetCardActions.d.ts +4 -0
- package/dist/bigconsole/components/fleet/FleetCardActions.js +49 -35
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +270 -186
- package/dist/bigconsole/hooks/useBoardDragLink.d.ts +41 -0
- package/dist/bigconsole/hooks/useBoardDragLink.js +62 -0
- package/dist/bigconsole/pages/DashboardsPage.js +497 -403
- package/dist/bigconsole/utils/fleetDetachCopies.d.ts +26 -0
- package/dist/bigconsole/utils/fleetDetachCopies.js +28 -0
- package/dist/bigconsole/utils/fleetDrag.d.ts +56 -0
- package/dist/bigconsole/utils/fleetDrag.js +26 -0
- package/package.json +1 -1
|
@@ -2,43 +2,48 @@ import { useBigConsole as e, useBigConsoleNavigate as t } from "../context/BigCo
|
|
|
2
2
|
import { useTr as n } from "../../shared/hooks/useTr.js";
|
|
3
3
|
import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
|
|
4
4
|
import { Section as i, SectionStack as a } from "../components/common/Section.js";
|
|
5
|
-
import { SortBySelect as
|
|
5
|
+
import { SortBySelect as ee } from "../components/common/SortBySelect.js";
|
|
6
6
|
import "../context/index.js";
|
|
7
|
-
import
|
|
8
|
-
import { isNative as
|
|
7
|
+
import te from "../hooks/useDashboardOperations.js";
|
|
8
|
+
import { isNative as o, nativeConfirm as s, nativeImpact as ne, nativeNotify as c } from "../../utils/nativeBridge.js";
|
|
9
9
|
import "../hooks/index.js";
|
|
10
|
-
import { useFleetLinks as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
10
|
+
import { useFleetLinks as re } from "../hooks/useFleetLinks.js";
|
|
11
|
+
import { useBoardDragLink as ie } from "../hooks/useBoardDragLink.js";
|
|
12
|
+
import { useFleetBoardActions as ae } from "../hooks/useFleetBoardActions.js";
|
|
13
|
+
import { useFleetConfirm as oe } from "../hooks/useFleetConfirm.js";
|
|
14
|
+
import { useFleetMasterActions as se } from "../hooks/useFleetMasterActions.js";
|
|
15
|
+
import { useFleetCopyTotals as ce } from "../hooks/useFleetCopyTotals.js";
|
|
16
|
+
import { useFleetMasterSearch as le } from "../hooks/useFleetMasterSearch.js";
|
|
17
|
+
import { FleetBadge as ue } from "../components/fleet/FleetBadge.js";
|
|
18
|
+
import { FleetCardActions as de } from "../components/fleet/FleetCardActions.js";
|
|
19
|
+
import { LinkToMasterDialog as fe } from "../components/fleet/LinkToMasterDialog.js";
|
|
20
|
+
import { buildFleetRows as pe, copyCounts as me, descendantIds as he, pendingMasterId as ge } from "../utils/fleetTree.js";
|
|
21
|
+
import { canDropOn as _e, canPickUp as ve, dropOutcome as ye } from "../utils/fleetDrag.js";
|
|
22
|
+
import { trCount as be } from "../utils/fleetPlural.js";
|
|
23
|
+
import { CreateDashboardDialog as xe } from "../components/dashboard/CreateDashboardDialog.js";
|
|
24
|
+
import { DashboardStatusPill as Se, useDashboardStatusLabel as Ce } from "../components/dashboard/DashboardStatusPill.js";
|
|
25
|
+
import { DashboardGalleryCard as we } from "../components/dashboard/DashboardGalleryCard.js";
|
|
26
|
+
import { ImportDashboardDialog as Te } from "../components/dashboard/ImportDashboardDialog.js";
|
|
27
|
+
import { ImportFromToolDialog as Ee } from "../components/dashboard/ImportFromToolDialog.js";
|
|
23
28
|
import "../components/common/index.js";
|
|
24
|
-
import { dashboardsListControls as
|
|
25
|
-
import { LIST_SORT_COPY as
|
|
26
|
-
import { selectDashboards as
|
|
27
|
-
import { categoryFacets as
|
|
28
|
-
import { useDashboardListQuery as
|
|
29
|
-
import { isBigConsoleQuotaError as
|
|
30
|
-
import { resolveCreateParam as
|
|
31
|
-
import { dashboardSuggestAnchorProps as
|
|
32
|
-
import { memo as
|
|
33
|
-
import { useSearchParams as
|
|
34
|
-
import { AccessDenied as
|
|
35
|
-
import { usePermissions as
|
|
36
|
-
import { ArrowRightLeft as g, Calendar as
|
|
37
|
-
import { AuroraBackground as _, Badge as
|
|
29
|
+
import { dashboardsListControls as De } from "../assistant/pageControls.js";
|
|
30
|
+
import { LIST_SORT_COPY as Oe, listSortOptions as ke } from "../utils/listSort.js";
|
|
31
|
+
import { selectDashboards as Ae } from "../utils/dashboardList.js";
|
|
32
|
+
import { categoryFacets as je, categoryFromRail as Me, categoryRailValue as Ne, dashboardListQueryKey as Pe, galleryPage as Fe, pageClampParams as Ie } from "../utils/dashboardGallery.js";
|
|
33
|
+
import { useDashboardListQuery as Le } from "../hooks/useDashboardListQuery.js";
|
|
34
|
+
import { isBigConsoleQuotaError as Re, reportBigConsoleQuotaError as ze } from "../utils/quota.js";
|
|
35
|
+
import { resolveCreateParam as Be, withoutCreateParam as Ve } from "../utils/createDialogParam.js";
|
|
36
|
+
import { dashboardSuggestAnchorProps as He } from "../proactive/entities.js";
|
|
37
|
+
import { memo as l, useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
38
|
+
import { useSearchParams as Ue } from "react-router";
|
|
39
|
+
import { AccessDenied as We, PermissionButton as h } from "@burdenoff/fe-libs/shared/components";
|
|
40
|
+
import { usePermissions as Ge } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
41
|
+
import { ArrowRightLeft as g, Calendar as Ke, Check as qe, ChevronDown as Je, ChevronRight as Ye, Copy as Xe, FileText as Ze, Layers as Qe, LayoutDashboard as $e, LayoutGrid as et, Link2 as tt, List as nt, ListTree as rt, Network as it, Pencil as at, Plus as ot, Search as st, Tag as ct, Trash2 as lt, Unlink as ut, Upload as dt, X as ft } from "lucide-react";
|
|
42
|
+
import { AuroraBackground as _, Badge as pt, Button as v, CTAOverflowMenu as y, Card as mt, CardContent as ht, EmptyState as gt, GALLERY_PAGE_SIZE as b, GalleryCategoryRail as _t, GalleryPager as vt, GlassCard as yt, GradientText as x, IllustratedEmptyState as bt, Input as xt, PagePurpose as St, Spinner as Ct, ThemedSelect as wt, pageRange as Tt, useGlassEmptyStates as Et } from "@burdenoff/fe-libs/ui";
|
|
38
43
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
39
|
-
import { useAssistantPageControls as
|
|
44
|
+
import { useAssistantPageControls as Dt } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
40
45
|
// src/bigconsole/pages/DashboardsPage.tsx
|
|
41
|
-
var
|
|
46
|
+
var Ot = "bf-bigconsole-dashboards-view", kt = "bf-bigconsole-dashboards-nested", w = b, At = l(function({ title: e, subtitle: t, createLabel: n, importLabel: r, importFromToolLabel: i, onCreate: a, onImport: ee, onImportFromTool: te, canCreate: o, canImport: s }) {
|
|
42
47
|
return /* @__PURE__ */ C("div", {
|
|
43
48
|
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
44
49
|
children: [/* @__PURE__ */ S(_, { intensity: "subtle" }), /* @__PURE__ */ S("div", {
|
|
@@ -69,7 +74,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
69
74
|
borderRadius: "var(--radius-card)",
|
|
70
75
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
71
76
|
},
|
|
72
|
-
children: /* @__PURE__ */ S(
|
|
77
|
+
children: /* @__PURE__ */ S($e, { style: {
|
|
73
78
|
height: "var(--size-icon-lg)",
|
|
74
79
|
width: "var(--size-icon-lg)",
|
|
75
80
|
color: "var(--color-action-primary-text)"
|
|
@@ -99,8 +104,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
99
104
|
primary: {
|
|
100
105
|
label: n,
|
|
101
106
|
onSelect: a,
|
|
102
|
-
disabled: !
|
|
103
|
-
icon: /* @__PURE__ */ S(
|
|
107
|
+
disabled: !o,
|
|
108
|
+
icon: /* @__PURE__ */ S(ot, { style: {
|
|
104
109
|
marginRight: "var(--space-iconGap)",
|
|
105
110
|
height: "var(--size-icon-sm)",
|
|
106
111
|
width: "var(--size-icon-sm)"
|
|
@@ -108,16 +113,16 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
108
113
|
},
|
|
109
114
|
actions: [{
|
|
110
115
|
label: r,
|
|
111
|
-
onSelect:
|
|
112
|
-
disabled: !
|
|
113
|
-
icon: /* @__PURE__ */ S(
|
|
116
|
+
onSelect: ee,
|
|
117
|
+
disabled: !s,
|
|
118
|
+
icon: /* @__PURE__ */ S(dt, { style: {
|
|
114
119
|
height: "var(--size-icon-sm)",
|
|
115
120
|
width: "var(--size-icon-sm)"
|
|
116
121
|
} })
|
|
117
122
|
}, {
|
|
118
123
|
label: i,
|
|
119
|
-
onSelect:
|
|
120
|
-
disabled: !
|
|
124
|
+
onSelect: te,
|
|
125
|
+
disabled: !s,
|
|
121
126
|
icon: /* @__PURE__ */ S(g, { style: {
|
|
122
127
|
height: "var(--size-icon-sm)",
|
|
123
128
|
width: "var(--size-icon-sm)"
|
|
@@ -128,368 +133,435 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
128
133
|
})
|
|
129
134
|
})]
|
|
130
135
|
});
|
|
131
|
-
}), T =
|
|
132
|
-
let
|
|
136
|
+
}), T = l(function() {
|
|
137
|
+
let l = t(), g = n(), _ = Le(), { search: y, category: b, status: x, sort: T } = _.query, { setSearch: jt, setCategory: Mt, setStatus: Nt, setSort: Pt, resetPage: Ft } = _, [It, Lt] = m(!1), [Rt, zt] = m(!1), [Bt, Vt] = m(!1), [Ht, Ut] = m(!1), [E, Wt] = m(() => {
|
|
133
138
|
try {
|
|
134
|
-
return window.localStorage.getItem(
|
|
139
|
+
return window.localStorage.getItem(Ot) === "list" ? "list" : "grid";
|
|
135
140
|
} catch {
|
|
136
141
|
return "grid";
|
|
137
142
|
}
|
|
138
|
-
}),
|
|
139
|
-
|
|
143
|
+
}), Gt = u((e) => {
|
|
144
|
+
Wt(e), Ft();
|
|
140
145
|
try {
|
|
141
|
-
window.localStorage.setItem(
|
|
146
|
+
window.localStorage.setItem(Ot, e);
|
|
142
147
|
} catch {}
|
|
143
|
-
}, [
|
|
148
|
+
}, [Ft]), { loading: D, error: O, dashboards: k, createDashboard: Kt, deleteDashboard: qt, cloneDashboard: Jt, refetch: A } = te(), { links: j, requests: M, loading: Yt, error: Xt, refetch: N } = re(), Zt = !Yt && !Xt, [Qt, P] = m(!1), { busy: $t, linkToMaster: en, detach: tn, respond: nn } = ae(), { setAsMaster: rn } = se(), F = $t || Qt, [I, an] = m(() => {
|
|
144
149
|
try {
|
|
145
|
-
return window.localStorage.getItem(
|
|
150
|
+
return window.localStorage.getItem(kt) !== "flat";
|
|
146
151
|
} catch {
|
|
147
152
|
return !0;
|
|
148
153
|
}
|
|
149
|
-
}), [
|
|
150
|
-
|
|
154
|
+
}), [on, sn] = m(() => /* @__PURE__ */ new Set()), [L, cn] = m(null), [ln, un] = m(null), { workspaceId: dn, currentUser: fn } = e(), R = `${dn ?? ""}:${fn?.id ?? ""}`, z = p(R), [pn, B] = m(null), mn = u((e) => {
|
|
155
|
+
an(e);
|
|
151
156
|
try {
|
|
152
|
-
window.localStorage.setItem(
|
|
157
|
+
window.localStorage.setItem(kt, e ? "nested" : "flat");
|
|
153
158
|
} catch {}
|
|
154
|
-
}, []),
|
|
155
|
-
|
|
159
|
+
}, []), hn = u((e) => {
|
|
160
|
+
sn((t) => {
|
|
156
161
|
let n = new Set(t);
|
|
157
162
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
158
163
|
});
|
|
159
|
-
}, []),
|
|
160
|
-
|
|
161
|
-
let e =
|
|
162
|
-
permissionsLoading:
|
|
163
|
-
canRead:
|
|
164
|
-
canCreate:
|
|
164
|
+
}, []), gn = f(() => me(j), [j]), _n = f(() => k.filter((e) => e.isMaster === !0).map((e) => e.id), [k]), vn = ce(_n, j), yn = f(() => new Map([...gn, ...vn]), [gn, vn]), bn = f(() => new Set(M.map((e) => e.childDashboardId)), [M]), xn = f(() => new Set(j.filter((e) => e.status === "ACTIVE").map((e) => e.childDashboardId)), [j]), Sn = xn.size > 0, { hasPermission: V, isLoading: H } = Ge(), U = V(r.DASHBOARD_READ), Cn = V(r.DASHBOARD_CREATE), wn = V(r.DASHBOARD_IMPORT), Tn = V(r.DASHBOARD_UPDATE), En = V(r.DASHBOARD_DELETE), Dn = Et(), [W, On] = Ue();
|
|
165
|
+
d(() => {
|
|
166
|
+
let e = Be(W, {
|
|
167
|
+
permissionsLoading: H,
|
|
168
|
+
canRead: U,
|
|
169
|
+
canCreate: Cn
|
|
165
170
|
});
|
|
166
|
-
e !== "none" && e !== "wait" && (e === "open" &&
|
|
171
|
+
e !== "none" && e !== "wait" && (e === "open" && Lt(!0), On(Ve(W), { replace: !0 }));
|
|
167
172
|
}, [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
W,
|
|
174
|
+
On,
|
|
175
|
+
H,
|
|
176
|
+
U,
|
|
177
|
+
Cn
|
|
173
178
|
]);
|
|
174
|
-
let
|
|
179
|
+
let kn = f(() => Array.from(new Set(k.flatMap((e) => e.category ? [e.category] : []))).sort(), [k]), { requestedPage: An } = _, { filtered: jn, pageItems: Mn } = Ae(k, {
|
|
175
180
|
search: y,
|
|
176
181
|
category: b,
|
|
177
182
|
status: x,
|
|
178
183
|
sort: T,
|
|
179
|
-
page:
|
|
184
|
+
page: An,
|
|
180
185
|
pageSize: w
|
|
181
|
-
}),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
]),
|
|
186
|
+
}), G = I && E === "list" && Sn, Nn = f(() => G ? pe(jn, j, on) : [], [
|
|
187
|
+
G,
|
|
188
|
+
jn,
|
|
189
|
+
j,
|
|
190
|
+
on
|
|
191
|
+
]), K = G ? Nn.length : jn.length, { page: q, totalPages: Pn } = Fe(W.get("page"), K, w), Fn = (q - 1) * w, In = G ? Nn.slice(Fn, Fn + w) : Mn.map((e) => ({
|
|
187
192
|
item: e,
|
|
188
193
|
depth: 0,
|
|
189
194
|
parentId: null,
|
|
190
195
|
childCount: 0,
|
|
191
196
|
collapsed: !1
|
|
192
|
-
})),
|
|
197
|
+
})), Ln = In.map((e) => e.item), J = new Map(In.map((e) => [e.item.id, e])), { facets: Rn, total: zn } = f(() => je(k, {
|
|
193
198
|
search: y,
|
|
194
199
|
status: x,
|
|
195
200
|
selected: b
|
|
196
201
|
}), [
|
|
197
|
-
|
|
202
|
+
k,
|
|
198
203
|
y,
|
|
199
204
|
x,
|
|
200
205
|
b
|
|
201
|
-
]),
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
|
|
206
|
+
]), Bn = p(!1), Vn = `${Pe(_.query)}\u0000${E}`, Hn = p(Vn);
|
|
207
|
+
d(() => {
|
|
208
|
+
if (D) {
|
|
209
|
+
Bn.current = !0;
|
|
205
210
|
return;
|
|
206
211
|
}
|
|
207
|
-
if (!
|
|
208
|
-
let e =
|
|
209
|
-
params:
|
|
210
|
-
requestedPage:
|
|
211
|
-
page:
|
|
212
|
-
totalPages:
|
|
213
|
-
previousKey:
|
|
214
|
-
key:
|
|
212
|
+
if (!Bn.current || O || W.has("create")) return;
|
|
213
|
+
let e = Ie({
|
|
214
|
+
params: W,
|
|
215
|
+
requestedPage: An,
|
|
216
|
+
page: q,
|
|
217
|
+
totalPages: Pn,
|
|
218
|
+
previousKey: Hn.current,
|
|
219
|
+
key: Vn
|
|
215
220
|
});
|
|
216
|
-
|
|
221
|
+
Hn.current = Vn, e && On(e, { replace: !0 });
|
|
217
222
|
}, [
|
|
223
|
+
D,
|
|
218
224
|
O,
|
|
219
|
-
k,
|
|
220
|
-
X,
|
|
221
|
-
Sn,
|
|
222
|
-
vn,
|
|
223
|
-
kn,
|
|
224
225
|
q,
|
|
225
|
-
|
|
226
|
+
Pn,
|
|
227
|
+
An,
|
|
228
|
+
Vn,
|
|
229
|
+
W,
|
|
230
|
+
On
|
|
226
231
|
]);
|
|
227
|
-
let
|
|
228
|
-
|
|
229
|
-
if (!
|
|
230
|
-
|
|
231
|
-
let e =
|
|
232
|
+
let Un = p(null), Wn = p(!1);
|
|
233
|
+
d(() => {
|
|
234
|
+
if (!Wn.current) return;
|
|
235
|
+
Wn.current = !1;
|
|
236
|
+
let e = Un.current;
|
|
232
237
|
e && (e.focus({ preventScroll: !0 }), e.scrollIntoView?.({ block: "start" }));
|
|
233
|
-
}, [
|
|
234
|
-
let { goToPage:
|
|
235
|
-
e !==
|
|
236
|
-
}, [
|
|
237
|
-
|
|
238
|
-
}, []),
|
|
239
|
-
|
|
240
|
-
}, [
|
|
241
|
-
|
|
242
|
-
}, [
|
|
243
|
-
|
|
238
|
+
}, [q]);
|
|
239
|
+
let { goToPage: Gn } = _, Kn = u((e) => {
|
|
240
|
+
e !== q && (Wn.current = !0, Gn(e));
|
|
241
|
+
}, [q, Gn]), qn = u(() => {
|
|
242
|
+
Lt(!0);
|
|
243
|
+
}, []), Jn = u(({ dashboardId: e }) => {
|
|
244
|
+
A(), l(`/dashboards/${e}`);
|
|
245
|
+
}, [A, l]), Yn = u(() => {
|
|
246
|
+
Rt || Lt(!1);
|
|
247
|
+
}, [Rt]), Xn = u(async (e) => {
|
|
248
|
+
zt(!0);
|
|
244
249
|
try {
|
|
245
|
-
let t = await
|
|
250
|
+
let t = await Kt({
|
|
246
251
|
name: e.name,
|
|
247
252
|
description: e.description,
|
|
248
253
|
category: e.category,
|
|
249
254
|
tags: e.tags
|
|
250
255
|
});
|
|
251
256
|
if (!t) throw Error(g("bigconsole.dashboards.createDialog.error.createFailed", "Failed to create dashboard. Please try again."));
|
|
252
|
-
|
|
257
|
+
Lt(!1), l(`/dashboards/${t.id}/builder`);
|
|
253
258
|
} catch (e) {
|
|
254
|
-
throw
|
|
259
|
+
throw Re(e) || console.error("Failed to create dashboard:", e), o() && c("error"), e;
|
|
255
260
|
} finally {
|
|
256
|
-
|
|
261
|
+
zt(!1);
|
|
257
262
|
}
|
|
258
263
|
}, [
|
|
259
|
-
|
|
260
|
-
|
|
264
|
+
Kt,
|
|
265
|
+
l,
|
|
261
266
|
g
|
|
262
|
-
]),
|
|
263
|
-
|
|
264
|
-
}, [
|
|
265
|
-
t?.stopPropagation(),
|
|
266
|
-
}, [
|
|
267
|
+
]), Zn = u((e) => {
|
|
268
|
+
l(`/dashboards/${e}`);
|
|
269
|
+
}, [l]), Qn = u((e, t) => {
|
|
270
|
+
t?.stopPropagation(), l(`/dashboards/${e}/builder`);
|
|
271
|
+
}, [l]), $n = u(async (e, t) => {
|
|
267
272
|
t?.stopPropagation();
|
|
268
|
-
let n = g("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"),
|
|
273
|
+
let n = k.find((t) => t.id === e)?.isMaster === !0, r = vn.get(e), i = r !== void 0 && r > 0 ? be(g, r, "bigconsole.fleet.delete.confirmWithCopies", "Are you sure you want to delete this dashboard? {{count}} copies follow it. They keep a plain copy of everything and stop following it.", "Are you sure you want to delete this dashboard? 1 copy follows it. It keeps a plain copy of everything and stops following it.") : n && r === void 0 ? g("bigconsole.fleet.delete.confirmMaster", "Are you sure you want to delete this dashboard? Boards that follow it keep a plain copy of everything and stop following it.") : g("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), a = await s({
|
|
269
274
|
title: "Delete dashboard?",
|
|
270
|
-
message:
|
|
275
|
+
message: i,
|
|
271
276
|
okButtonTitle: "Delete",
|
|
272
277
|
cancelButtonTitle: "Cancel"
|
|
273
278
|
});
|
|
274
|
-
if (
|
|
275
|
-
|
|
279
|
+
if (a === null ? window.confirm(i) : a) {
|
|
280
|
+
ne("medium");
|
|
276
281
|
try {
|
|
277
|
-
await
|
|
282
|
+
await qt(e), o() && c("success");
|
|
278
283
|
} catch (e) {
|
|
279
|
-
throw
|
|
284
|
+
throw o() && c("error"), e;
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
|
-
}, [
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
+
}, [
|
|
288
|
+
vn,
|
|
289
|
+
k,
|
|
290
|
+
qt,
|
|
291
|
+
g
|
|
292
|
+
]), Y = u((e) => ({
|
|
293
|
+
active: e.linkStatus === "ACTIVE" || xn.has(e.id),
|
|
294
|
+
pending: e.linkStatus === "PENDING" || ge(e.id, j) !== null
|
|
295
|
+
}), [xn, j]), er = u((e) => {
|
|
296
|
+
let t = Y(e);
|
|
287
297
|
return {
|
|
288
298
|
isMaster: e.isMaster === !0,
|
|
289
|
-
copyCount:
|
|
299
|
+
copyCount: yn.get(e.id) ?? 0,
|
|
290
300
|
isCopy: t.active,
|
|
291
301
|
isPending: t.pending
|
|
292
302
|
};
|
|
293
|
-
}, [
|
|
294
|
-
t?.stopPropagation(),
|
|
303
|
+
}, [Y, yn]), tr = u((e, t) => {
|
|
304
|
+
t?.stopPropagation(), un(null), cn({
|
|
295
305
|
id: e.id,
|
|
296
306
|
name: e.name
|
|
297
307
|
});
|
|
298
|
-
}, []), [
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}, [
|
|
302
|
-
let
|
|
303
|
-
if (!
|
|
304
|
-
let e =
|
|
305
|
-
return [...
|
|
308
|
+
}, []), [nr, rr] = m("");
|
|
309
|
+
d(() => {
|
|
310
|
+
z.current !== R && (z.current = R, cn(null), un(null), rr(""), B(null), P(!1));
|
|
311
|
+
}, [R]);
|
|
312
|
+
let ir = le(nr, L !== null), ar = f(() => {
|
|
313
|
+
if (!L) return [];
|
|
314
|
+
let e = he(L.id, j), t = /* @__PURE__ */ new Set();
|
|
315
|
+
return [...k.map((e) => ({
|
|
306
316
|
id: e.id,
|
|
307
317
|
name: e.name,
|
|
308
318
|
isMaster: e.isMaster === !0
|
|
309
|
-
})), ...
|
|
319
|
+
})), ...ir].filter((n) => n.id === L.id || e.has(n.id) || t.has(n.id) ? !1 : (t.add(n.id), !0));
|
|
320
|
+
}, [
|
|
321
|
+
k,
|
|
322
|
+
ir,
|
|
323
|
+
j,
|
|
324
|
+
L
|
|
325
|
+
]), X = p(null), or = u(async (e, t, n) => {
|
|
326
|
+
let r = z.current;
|
|
327
|
+
if (X.current === r) return;
|
|
328
|
+
X.current = r;
|
|
329
|
+
let i = () => z.current !== r;
|
|
330
|
+
P(!0);
|
|
331
|
+
try {
|
|
332
|
+
let n = await en(e.id, t);
|
|
333
|
+
if (i() || (cn(null), await Promise.all([A(), N()]), i())) return;
|
|
334
|
+
B(n === "PENDING" ? g("bigconsole.fleet.notice.requested", "Link requested. The owner of \"{{name}}\" has to accept it before it follows the master.", { name: e.name }) : g("bigconsole.fleet.notice.linked", "\"{{name}}\" now follows its master.", { name: e.name }));
|
|
335
|
+
} catch (e) {
|
|
336
|
+
if (i()) return;
|
|
337
|
+
n(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.link", "The board could not be linked."));
|
|
338
|
+
} finally {
|
|
339
|
+
X.current === r && (X.current = null), i() || P(!1);
|
|
340
|
+
}
|
|
310
341
|
}, [
|
|
342
|
+
en,
|
|
311
343
|
A,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
let
|
|
319
|
-
|
|
344
|
+
N,
|
|
345
|
+
g
|
|
346
|
+
]), sr = u(async (e) => {
|
|
347
|
+
L && (un(null), await or(L, e, un));
|
|
348
|
+
}, [or, L]), cr = u(async (e, t) => {
|
|
349
|
+
t?.stopPropagation();
|
|
350
|
+
let n = z.current;
|
|
351
|
+
if (X.current === n) return;
|
|
352
|
+
X.current = n;
|
|
353
|
+
let r = () => z.current !== n;
|
|
354
|
+
B(null), P(!0);
|
|
320
355
|
try {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
U(t === "PENDING" ? g("bigconsole.fleet.notice.requested", "Link requested. The owner of \"{{name}}\" has to accept it before it follows the master.", { name: R.name }) : g("bigconsole.fleet.notice.linked", "\"{{name}}\" now follows its master.", { name: R.name }));
|
|
356
|
+
if (await rn(e.id), r() || (await Promise.all([A(), N()]), r())) return;
|
|
357
|
+
B(g("bigconsole.fleet.notice.nowMaster", "\"{{name}}\" is now a master. Other boards can follow it.", { name: e.name }));
|
|
324
358
|
} catch (e) {
|
|
325
|
-
if (
|
|
326
|
-
B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.
|
|
359
|
+
if (r()) return;
|
|
360
|
+
B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.setMaster", "The board could not be made a master."));
|
|
327
361
|
} finally {
|
|
328
|
-
n() ||
|
|
362
|
+
X.current === n && (X.current = null), r() || P(!1);
|
|
363
|
+
}
|
|
364
|
+
}, [
|
|
365
|
+
A,
|
|
366
|
+
N,
|
|
367
|
+
rn,
|
|
368
|
+
g
|
|
369
|
+
]), lr = oe(), ur = u(async (e, t) => {
|
|
370
|
+
let n = ye({
|
|
371
|
+
id: e.id,
|
|
372
|
+
follows: Y(e)
|
|
373
|
+
}, t.id, j);
|
|
374
|
+
if (n.kind !== "link") {
|
|
375
|
+
let r = n.kind === "followsOther" || n.kind === "pendingOther" ? n.masterId : null, i = k.find((e) => e.id === r)?.name ?? g("bigconsole.fleet.drop.anotherBoard", "another board"), a = {
|
|
376
|
+
name: e.name,
|
|
377
|
+
master: t.name,
|
|
378
|
+
other: i
|
|
379
|
+
};
|
|
380
|
+
B(n.kind === "alreadyFollowsTarget" ? g("bigconsole.fleet.drop.alreadyFollows", "\"{{name}}\" already follows \"{{master}}\".", a) : n.kind === "pendingToTarget" ? g("bigconsole.fleet.drop.alreadyRequested", "A request for \"{{name}}\" to follow \"{{master}}\" is already waiting for its owner.", a) : n.kind === "followsOther" ? g("bigconsole.fleet.drop.followsOther", "\"{{name}}\" already follows \"{{other}}\". Detach it from that board first to link it to another.", a) : g("bigconsole.fleet.drop.requestedOther", "\"{{name}}\" has already asked to follow \"{{other}}\". Detach it first to link it to another.", a));
|
|
381
|
+
return;
|
|
329
382
|
}
|
|
383
|
+
let r = z.current;
|
|
384
|
+
await lr(g("bigconsole.fleet.drop.title", "Link to master?"), g("bigconsole.fleet.drop.confirm", "\"{{name}}\" will follow \"{{master}}\" and receive the widgets added to it. Its own widgets stay. If someone else owns \"{{name}}\", they are asked to accept first. Link it?", {
|
|
385
|
+
name: e.name,
|
|
386
|
+
master: t.name
|
|
387
|
+
}), g("bigconsole.fleet.drop.ok", "Link")) && z.current === r && (B(null), await or(e, t.id, B));
|
|
330
388
|
}, [
|
|
331
|
-
|
|
332
|
-
|
|
389
|
+
lr,
|
|
390
|
+
k,
|
|
391
|
+
Y,
|
|
392
|
+
or,
|
|
333
393
|
j,
|
|
334
|
-
P,
|
|
335
394
|
g
|
|
336
|
-
]),
|
|
395
|
+
]), Z = ie({
|
|
396
|
+
canPickUp: (e) => ve({
|
|
397
|
+
canUpdate: Tn,
|
|
398
|
+
linksReady: Zt,
|
|
399
|
+
busy: F,
|
|
400
|
+
awaitingAnswer: bn.has(e.id)
|
|
401
|
+
}),
|
|
402
|
+
canDrop: (e, t) => !F && _e(e.id, t.id, j),
|
|
403
|
+
onDrop: (e, t) => void ur(e, t)
|
|
404
|
+
}), dr = Z.reset;
|
|
405
|
+
d(() => {
|
|
406
|
+
dr();
|
|
407
|
+
}, [R, dr]);
|
|
408
|
+
let fr = u(async (e, t) => {
|
|
337
409
|
t?.stopPropagation();
|
|
338
|
-
let n =
|
|
410
|
+
let n = z.current, r = () => z.current !== n, i = g("bigconsole.fleet.detach.confirm", "\"{{name}}\" will keep a plain copy of everything and stop following its master. Detach it?", { name: e.name }), a = await s({
|
|
339
411
|
title: g("bigconsole.fleet.detach.title", "Detach from master?"),
|
|
340
412
|
message: i,
|
|
341
413
|
okButtonTitle: g("bigconsole.fleet.detach.ok", "Detach"),
|
|
342
414
|
cancelButtonTitle: g("bigconsole.fleet.link.cancel", "Cancel")
|
|
343
415
|
});
|
|
344
416
|
if ((a === null ? window.confirm(i) : a) && !r()) {
|
|
345
|
-
|
|
417
|
+
P(!0);
|
|
346
418
|
try {
|
|
347
|
-
if (await
|
|
348
|
-
|
|
419
|
+
if (await tn(e.id), await Promise.all([A(), N()]), r()) return;
|
|
420
|
+
B(g("bigconsole.fleet.notice.detached", "\"{{name}}\" no longer follows a master.", { name: e.name }));
|
|
349
421
|
} catch (e) {
|
|
350
422
|
if (r()) return;
|
|
351
|
-
|
|
423
|
+
B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.detach", "The board could not be detached."));
|
|
352
424
|
} finally {
|
|
353
|
-
r() ||
|
|
425
|
+
r() || P(!1);
|
|
354
426
|
}
|
|
355
427
|
}
|
|
356
428
|
}, [
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
429
|
+
tn,
|
|
430
|
+
A,
|
|
431
|
+
N,
|
|
360
432
|
g
|
|
361
|
-
]),
|
|
433
|
+
]), Q = u(async (e, t, n) => {
|
|
362
434
|
n?.stopPropagation();
|
|
363
|
-
let r =
|
|
364
|
-
|
|
435
|
+
let r = M.find((t) => t.childDashboardId === e.id)?.masterName ?? "", i = z.current, a = () => z.current !== i;
|
|
436
|
+
P(!0);
|
|
365
437
|
try {
|
|
366
|
-
if (await
|
|
367
|
-
|
|
438
|
+
if (await nn(e.id, t), await Promise.all([A(), N()]), a()) return;
|
|
439
|
+
B(t ? g("bigconsole.fleet.notice.accepted", "\"{{name}}\" now follows \"{{master}}\".", {
|
|
368
440
|
name: e.name,
|
|
369
441
|
master: r
|
|
370
442
|
}) : g("bigconsole.fleet.notice.declined", "Link request for \"{{name}}\" declined.", { name: e.name }));
|
|
371
443
|
} catch (e) {
|
|
372
444
|
if (a()) return;
|
|
373
|
-
|
|
445
|
+
B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.respond", "The request could not be answered."));
|
|
374
446
|
} finally {
|
|
375
|
-
a() ||
|
|
447
|
+
a() || P(!1);
|
|
376
448
|
}
|
|
377
449
|
}, [
|
|
378
|
-
|
|
379
|
-
P,
|
|
450
|
+
A,
|
|
380
451
|
N,
|
|
381
|
-
|
|
452
|
+
M,
|
|
453
|
+
nn,
|
|
382
454
|
g
|
|
383
|
-
]),
|
|
455
|
+
]), pr = u(async (e, t, n) => {
|
|
384
456
|
n?.stopPropagation();
|
|
385
457
|
let r = g("bigconsole.dashboards.clone.defaultSuffix", "{{sourceName}} (Copy)", { sourceName: t }), i = window.prompt(g("bigconsole.dashboards.clone.namePrompt", "Name for the cloned dashboard:"), r);
|
|
386
458
|
if (i && i.trim()) {
|
|
387
|
-
|
|
459
|
+
ne("medium");
|
|
388
460
|
try {
|
|
389
|
-
let t = await
|
|
390
|
-
t && (
|
|
461
|
+
let t = await Jt(e, i.trim());
|
|
462
|
+
t && (o() && c("success"), l(`/dashboards/${t.id}`));
|
|
391
463
|
} catch (e) {
|
|
392
|
-
if (
|
|
393
|
-
throw
|
|
464
|
+
if (ze(e, "project")) return;
|
|
465
|
+
throw o() && c("error"), e;
|
|
394
466
|
}
|
|
395
467
|
}
|
|
396
468
|
}, [
|
|
397
|
-
|
|
398
|
-
|
|
469
|
+
Jt,
|
|
470
|
+
l,
|
|
399
471
|
g
|
|
400
|
-
]),
|
|
401
|
-
|
|
402
|
-
}, []),
|
|
403
|
-
|
|
404
|
-
}, []),
|
|
405
|
-
|
|
406
|
-
}, []),
|
|
407
|
-
|
|
408
|
-
}, []),
|
|
409
|
-
|
|
410
|
-
}, [
|
|
411
|
-
let t = new Date(e), n = /* @__PURE__ */ new Date(), r = n.getTime() - t.getTime(), i = Math.floor(r / 6e4), a = Math.floor(r / 36e5),
|
|
412
|
-
return i < 1 ? g("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${g("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${g("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` :
|
|
472
|
+
]), mr = _.clearFilters, hr = u(() => {
|
|
473
|
+
Vt(!0);
|
|
474
|
+
}, []), gr = u(() => {
|
|
475
|
+
Vt(!1);
|
|
476
|
+
}, []), _r = u(() => {
|
|
477
|
+
Ut(!0);
|
|
478
|
+
}, []), vr = u(() => {
|
|
479
|
+
Ut(!1);
|
|
480
|
+
}, []), yr = u((e, t) => {
|
|
481
|
+
A();
|
|
482
|
+
}, [A]), br = (e) => {
|
|
483
|
+
let t = new Date(e), n = /* @__PURE__ */ new Date(), r = n.getTime() - t.getTime(), i = Math.floor(r / 6e4), a = Math.floor(r / 36e5), ee = Math.floor(r / 864e5);
|
|
484
|
+
return i < 1 ? g("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${g("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${g("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` : ee < 7 ? `${ee}${g("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
|
|
413
485
|
month: "short",
|
|
414
486
|
day: "numeric",
|
|
415
487
|
year: t.getFullYear() === n.getFullYear() ? void 0 : "numeric"
|
|
416
488
|
}).format(t);
|
|
417
|
-
},
|
|
489
|
+
}, xr = Ce(), Sr = f(() => Array.from(new Set(k.map((e) => e.status).filter((e) => e !== void 0))).sort().map((e) => ({
|
|
418
490
|
value: e,
|
|
419
|
-
label:
|
|
420
|
-
})), [
|
|
491
|
+
label: xr(e)
|
|
492
|
+
})), [k, xr]), Cr = f(() => ke(g, !0), [g]), wr = f(() => !H && U && !O ? De({
|
|
421
493
|
tr: g,
|
|
422
|
-
categories:
|
|
423
|
-
statuses:
|
|
494
|
+
categories: kn,
|
|
495
|
+
statuses: Sr,
|
|
424
496
|
category: b,
|
|
425
497
|
status: x,
|
|
426
|
-
setCategory:
|
|
427
|
-
setStatus:
|
|
428
|
-
setSearch:
|
|
498
|
+
setCategory: Mt,
|
|
499
|
+
setStatus: Nt,
|
|
500
|
+
setSearch: jt,
|
|
429
501
|
sort: T,
|
|
430
|
-
setSort:
|
|
502
|
+
setSort: Pt
|
|
431
503
|
}) : null, [
|
|
432
504
|
g,
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
505
|
+
H,
|
|
506
|
+
U,
|
|
507
|
+
O,
|
|
508
|
+
kn,
|
|
509
|
+
Sr,
|
|
438
510
|
b,
|
|
439
511
|
x,
|
|
440
512
|
T,
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
513
|
+
Mt,
|
|
514
|
+
Nt,
|
|
515
|
+
jt,
|
|
516
|
+
Pt
|
|
445
517
|
]);
|
|
446
|
-
|
|
447
|
-
let
|
|
518
|
+
Dt(wr);
|
|
519
|
+
let Tr = (e) => e.widgetCount ?? 0, Er = (e) => e.pageCount || 0, Dr = /* @__PURE__ */ S(At, {
|
|
448
520
|
title: g("bigconsole.dashboards.title", "Dashboards"),
|
|
449
521
|
subtitle: g("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards"),
|
|
450
522
|
createLabel: g("bigconsole.dashboards.actions.create", "Create Dashboard"),
|
|
451
523
|
importLabel: g("bigconsole.dashboards.actions.import", "Import"),
|
|
452
524
|
importFromToolLabel: g("bigconsole.dashboards.actions.importFromTool", "Import from another tool"),
|
|
453
|
-
onCreate:
|
|
454
|
-
onImport:
|
|
455
|
-
onImportFromTool:
|
|
456
|
-
canCreate:
|
|
457
|
-
canImport:
|
|
525
|
+
onCreate: qn,
|
|
526
|
+
onImport: hr,
|
|
527
|
+
onImportFromTool: _r,
|
|
528
|
+
canCreate: Cn,
|
|
529
|
+
canImport: wn
|
|
458
530
|
});
|
|
459
|
-
if (
|
|
531
|
+
if (H) return /* @__PURE__ */ S("div", {
|
|
460
532
|
style: {
|
|
461
533
|
display: "flex",
|
|
462
534
|
alignItems: "center",
|
|
463
535
|
justifyContent: "center",
|
|
464
536
|
padding: "80px 0"
|
|
465
537
|
},
|
|
466
|
-
children: /* @__PURE__ */ S(
|
|
538
|
+
children: /* @__PURE__ */ S(Ct, { style: {
|
|
467
539
|
height: "var(--size-icon-xl)",
|
|
468
540
|
width: "var(--size-icon-xl)"
|
|
469
541
|
} })
|
|
470
542
|
});
|
|
471
|
-
if (!
|
|
543
|
+
if (!U) return /* @__PURE__ */ S(We, {
|
|
472
544
|
title: g("bigconsole.dashboards.accessDenied.title", "Access Denied"),
|
|
473
545
|
description: g("bigconsole.dashboards.accessDenied.description", "You don't have permission to view dashboards.")
|
|
474
546
|
});
|
|
475
|
-
if (
|
|
547
|
+
if (O) return /* @__PURE__ */ C("div", {
|
|
476
548
|
"data-tour": "bigconsole-dashboards-list",
|
|
477
549
|
style: {
|
|
478
550
|
minHeight: "100vh",
|
|
479
551
|
backgroundColor: "var(--color-bg-canvas)"
|
|
480
552
|
},
|
|
481
|
-
children: [
|
|
553
|
+
children: [Dr, /* @__PURE__ */ S("div", {
|
|
482
554
|
style: { padding: "var(--space-pagePadding)" },
|
|
483
|
-
children:
|
|
555
|
+
children: Dn ? /* @__PURE__ */ S("div", {
|
|
484
556
|
"data-testid": "dashboards-error",
|
|
485
|
-
children: /* @__PURE__ */ S(
|
|
557
|
+
children: /* @__PURE__ */ S(gt, {
|
|
486
558
|
kind: "error",
|
|
487
559
|
size: "page",
|
|
488
560
|
title: g("bigconsole.dashboards.error.title", "Error loading dashboards"),
|
|
489
|
-
description:
|
|
561
|
+
description: O.message,
|
|
490
562
|
action: /* @__PURE__ */ S(v, {
|
|
491
563
|
size: "sm",
|
|
492
|
-
onClick: () =>
|
|
564
|
+
onClick: () => A(),
|
|
493
565
|
children: g("bigconsole.dashboards.error.retry", "Retry")
|
|
494
566
|
})
|
|
495
567
|
})
|
|
@@ -497,17 +569,17 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
497
569
|
headingLevel: 2,
|
|
498
570
|
tone: "danger",
|
|
499
571
|
title: g("bigconsole.dashboards.error.title", "Error loading dashboards"),
|
|
500
|
-
description:
|
|
572
|
+
description: O.message,
|
|
501
573
|
"data-testid": "dashboards-error",
|
|
502
574
|
actions: /* @__PURE__ */ S(v, {
|
|
503
575
|
size: "sm",
|
|
504
|
-
onClick: () =>
|
|
576
|
+
onClick: () => A(),
|
|
505
577
|
children: g("bigconsole.dashboards.error.retry", "Retry")
|
|
506
578
|
})
|
|
507
579
|
})
|
|
508
580
|
})]
|
|
509
581
|
});
|
|
510
|
-
let
|
|
582
|
+
let Or = {
|
|
511
583
|
pagesNav: g("bigconsole.dashboards.pagination.label", "Dashboard pages"),
|
|
512
584
|
previous: g("bigconsole.dashboards.pagination.previous", "Previous"),
|
|
513
585
|
next: g("bigconsole.dashboards.pagination.next", "Next"),
|
|
@@ -523,61 +595,68 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
523
595
|
currentPage: e,
|
|
524
596
|
totalPages: t
|
|
525
597
|
})
|
|
526
|
-
},
|
|
598
|
+
}, kr = Tt(q, w, K), $ = !D && K > 0, Ar = !D && k.length > 0 && jn.length === 0, jr = !D && k.length === 0, Mr = (e) => {
|
|
527
599
|
let t = [];
|
|
528
|
-
if (
|
|
600
|
+
if (Tn && t.push({
|
|
529
601
|
id: "edit",
|
|
530
602
|
label: g("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
|
|
531
|
-
icon:
|
|
532
|
-
onSelect: () =>
|
|
533
|
-
}),
|
|
603
|
+
icon: at,
|
|
604
|
+
onSelect: () => Qn(e.id)
|
|
605
|
+
}), Cn && t.push({
|
|
534
606
|
id: "clone",
|
|
535
607
|
label: g("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
|
|
536
|
-
icon:
|
|
537
|
-
onSelect: () => void
|
|
538
|
-
}),
|
|
539
|
-
if (
|
|
608
|
+
icon: Xe,
|
|
609
|
+
onSelect: () => void pr(e.id, e.name)
|
|
610
|
+
}), Tn && Zt) {
|
|
611
|
+
if (bn.has(e.id)) t.push({
|
|
540
612
|
id: "accept",
|
|
541
613
|
label: g("bigconsole.fleet.action.accept", "Accept link request"),
|
|
542
|
-
icon:
|
|
543
|
-
disabled:
|
|
544
|
-
onSelect: () => void
|
|
614
|
+
icon: qe,
|
|
615
|
+
disabled: F,
|
|
616
|
+
onSelect: () => void Q(e, !0),
|
|
545
617
|
testId: "fleet-accept"
|
|
546
618
|
}, {
|
|
547
619
|
id: "decline",
|
|
548
620
|
label: g("bigconsole.fleet.action.decline", "Decline link request"),
|
|
549
|
-
icon:
|
|
550
|
-
disabled:
|
|
551
|
-
onSelect: () => void
|
|
621
|
+
icon: ft,
|
|
622
|
+
disabled: F,
|
|
623
|
+
onSelect: () => void Q(e, !1),
|
|
552
624
|
testId: "fleet-decline"
|
|
553
625
|
});
|
|
554
626
|
else {
|
|
555
|
-
let n =
|
|
627
|
+
let n = Y(e);
|
|
556
628
|
t.push(n.active || n.pending ? {
|
|
557
629
|
id: "detach",
|
|
558
630
|
label: g("bigconsole.fleet.action.detach", "Detach from master"),
|
|
559
|
-
icon:
|
|
560
|
-
disabled:
|
|
561
|
-
onSelect: () => void
|
|
631
|
+
icon: ut,
|
|
632
|
+
disabled: F,
|
|
633
|
+
onSelect: () => void fr(e),
|
|
562
634
|
testId: "fleet-detach"
|
|
563
635
|
} : {
|
|
564
636
|
id: "link",
|
|
565
637
|
label: g("bigconsole.fleet.action.link", "Link to master…"),
|
|
566
|
-
icon:
|
|
567
|
-
disabled:
|
|
568
|
-
onSelect: () =>
|
|
638
|
+
icon: tt,
|
|
639
|
+
disabled: F,
|
|
640
|
+
onSelect: () => tr(e),
|
|
569
641
|
testId: "fleet-link"
|
|
642
|
+
}), !n.active && !n.pending && e.isMaster !== !0 && t.push({
|
|
643
|
+
id: "setMaster",
|
|
644
|
+
label: g("bigconsole.fleet.action.setMaster", "Set as master"),
|
|
645
|
+
icon: it,
|
|
646
|
+
disabled: F,
|
|
647
|
+
onSelect: () => void cr(e),
|
|
648
|
+
testId: "fleet-set-master-card"
|
|
570
649
|
});
|
|
571
650
|
}
|
|
572
651
|
}
|
|
573
|
-
return
|
|
652
|
+
return En && t.push({
|
|
574
653
|
id: "delete",
|
|
575
654
|
label: g("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
|
|
576
|
-
icon:
|
|
655
|
+
icon: lt,
|
|
577
656
|
danger: !0,
|
|
578
|
-
onSelect: () => void
|
|
657
|
+
onSelect: () => void $n(e.id)
|
|
579
658
|
}), t;
|
|
580
|
-
},
|
|
659
|
+
}, Nr = /* @__PURE__ */ C("div", {
|
|
581
660
|
role: "group",
|
|
582
661
|
"aria-label": g("bigconsole.dashboards.view.label", "Result layout"),
|
|
583
662
|
style: {
|
|
@@ -590,11 +669,11 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
590
669
|
},
|
|
591
670
|
children: [
|
|
592
671
|
/* @__PURE__ */ S(v, {
|
|
593
|
-
variant:
|
|
672
|
+
variant: E === "grid" ? "default" : "ghost",
|
|
594
673
|
size: "sm",
|
|
595
|
-
onClick: () =>
|
|
674
|
+
onClick: () => Gt("grid"),
|
|
596
675
|
"aria-label": g("bigconsole.dashboards.view.grid", "Grid view"),
|
|
597
|
-
"aria-pressed":
|
|
676
|
+
"aria-pressed": E === "grid",
|
|
598
677
|
title: g("bigconsole.dashboards.view.grid", "Grid view"),
|
|
599
678
|
style: {
|
|
600
679
|
height: "var(--size-controlHeight-md)",
|
|
@@ -602,17 +681,17 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
602
681
|
padding: 0,
|
|
603
682
|
borderRadius: "var(--radius-button)"
|
|
604
683
|
},
|
|
605
|
-
children: /* @__PURE__ */ S(
|
|
684
|
+
children: /* @__PURE__ */ S(et, { style: {
|
|
606
685
|
height: "var(--size-icon-sm)",
|
|
607
686
|
width: "var(--size-icon-sm)"
|
|
608
687
|
} })
|
|
609
688
|
}),
|
|
610
689
|
/* @__PURE__ */ S(v, {
|
|
611
|
-
variant:
|
|
690
|
+
variant: E === "list" ? "default" : "ghost",
|
|
612
691
|
size: "sm",
|
|
613
|
-
onClick: () =>
|
|
692
|
+
onClick: () => Gt("list"),
|
|
614
693
|
"aria-label": g("bigconsole.dashboards.view.list", "List view"),
|
|
615
|
-
"aria-pressed":
|
|
694
|
+
"aria-pressed": E === "list",
|
|
616
695
|
title: g("bigconsole.dashboards.view.list", "List view"),
|
|
617
696
|
style: {
|
|
618
697
|
height: "var(--size-controlHeight-md)",
|
|
@@ -620,18 +699,18 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
620
699
|
padding: 0,
|
|
621
700
|
borderRadius: "var(--radius-button)"
|
|
622
701
|
},
|
|
623
|
-
children: /* @__PURE__ */ S(
|
|
702
|
+
children: /* @__PURE__ */ S(nt, { style: {
|
|
624
703
|
height: "var(--size-icon-sm)",
|
|
625
704
|
width: "var(--size-icon-sm)"
|
|
626
705
|
} })
|
|
627
706
|
}),
|
|
628
|
-
|
|
629
|
-
variant:
|
|
707
|
+
E === "list" && Sn && /* @__PURE__ */ S(v, {
|
|
708
|
+
variant: I ? "default" : "ghost",
|
|
630
709
|
size: "sm",
|
|
631
|
-
onClick: () =>
|
|
632
|
-
"aria-label":
|
|
633
|
-
"aria-pressed":
|
|
634
|
-
title:
|
|
710
|
+
onClick: () => mn(!I),
|
|
711
|
+
"aria-label": I ? g("bigconsole.fleet.list.showFlat", "Show flat list") : g("bigconsole.fleet.list.showNested", "Show linked boards nested"),
|
|
712
|
+
"aria-pressed": I,
|
|
713
|
+
title: I ? g("bigconsole.fleet.list.showFlat", "Show flat list") : g("bigconsole.fleet.list.showNested", "Show linked boards nested"),
|
|
635
714
|
"data-testid": "fleet-nested-toggle",
|
|
636
715
|
style: {
|
|
637
716
|
height: "var(--size-controlHeight-md)",
|
|
@@ -639,7 +718,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
639
718
|
padding: 0,
|
|
640
719
|
borderRadius: "var(--radius-button)"
|
|
641
720
|
},
|
|
642
|
-
children: /* @__PURE__ */ S(
|
|
721
|
+
children: /* @__PURE__ */ S(rt, { style: {
|
|
643
722
|
height: "var(--size-icon-sm)",
|
|
644
723
|
width: "var(--size-icon-sm)"
|
|
645
724
|
} })
|
|
@@ -653,14 +732,14 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
653
732
|
backgroundColor: "var(--color-bg-canvas)"
|
|
654
733
|
},
|
|
655
734
|
children: [
|
|
656
|
-
|
|
735
|
+
Dr,
|
|
657
736
|
/* @__PURE__ */ S("div", {
|
|
658
737
|
style: { padding: "var(--space-pagePadding)" },
|
|
659
738
|
children: /* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(i, {
|
|
660
739
|
emphasis: "muted",
|
|
661
740
|
padding: "compact",
|
|
662
741
|
"aria-label": g("bigconsole.dashboards.about", "About dashboards"),
|
|
663
|
-
children: /* @__PURE__ */ S(
|
|
742
|
+
children: /* @__PURE__ */ S(St, {
|
|
664
743
|
className: "max-w-[80ch]",
|
|
665
744
|
children: "Dashboards are live, shareable views built from widgets that query your data sinks — charts, tables, metrics, and drill-downs in one place. Compose a board to monitor a system, share KPIs with your team, or explore data interactively."
|
|
666
745
|
})
|
|
@@ -669,7 +748,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
669
748
|
"aria-label": g("bigconsole.dashboards.results.title", "Your dashboards"),
|
|
670
749
|
className: "flex flex-col gap-form-gap",
|
|
671
750
|
children: [
|
|
672
|
-
|
|
751
|
+
M.length > 0 && /* @__PURE__ */ C("div", {
|
|
673
752
|
role: "region",
|
|
674
753
|
"aria-label": g("bigconsole.fleet.requests.title", "Link requests"),
|
|
675
754
|
"data-testid": "fleet-requests",
|
|
@@ -680,7 +759,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
680
759
|
color: "var(--color-text-primary)",
|
|
681
760
|
fontSize: "var(--font-size-body-sm)"
|
|
682
761
|
},
|
|
683
|
-
children: [/* @__PURE__ */ S("strong", { children: g("bigconsole.fleet.requests.title", "Link requests") }),
|
|
762
|
+
children: [/* @__PURE__ */ S("strong", { children: g("bigconsole.fleet.requests.title", "Link requests") }), M.map((e) => /* @__PURE__ */ C("div", {
|
|
684
763
|
className: "flex items-center justify-between gap-form-gap",
|
|
685
764
|
"data-testid": "fleet-request",
|
|
686
765
|
children: [/* @__PURE__ */ S("span", {
|
|
@@ -697,8 +776,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
697
776
|
children: [/* @__PURE__ */ S(v, {
|
|
698
777
|
variant: "ghost",
|
|
699
778
|
size: "sm",
|
|
700
|
-
disabled:
|
|
701
|
-
onClick: () =>
|
|
779
|
+
disabled: F,
|
|
780
|
+
onClick: () => Q({
|
|
702
781
|
id: e.childDashboardId,
|
|
703
782
|
name: e.childName
|
|
704
783
|
}, !0),
|
|
@@ -707,8 +786,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
707
786
|
}), /* @__PURE__ */ S(v, {
|
|
708
787
|
variant: "ghost",
|
|
709
788
|
size: "sm",
|
|
710
|
-
disabled:
|
|
711
|
-
onClick: () =>
|
|
789
|
+
disabled: F,
|
|
790
|
+
onClick: () => Q({
|
|
712
791
|
id: e.childDashboardId,
|
|
713
792
|
name: e.childName
|
|
714
793
|
}, !1),
|
|
@@ -719,7 +798,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
719
798
|
})]
|
|
720
799
|
}, e.childDashboardId))]
|
|
721
800
|
}),
|
|
722
|
-
|
|
801
|
+
pn && /* @__PURE__ */ C("div", {
|
|
723
802
|
role: "status",
|
|
724
803
|
"data-testid": "fleet-notice",
|
|
725
804
|
className: "flex items-center justify-between gap-form-gap rounded-input border p-3",
|
|
@@ -731,15 +810,15 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
731
810
|
},
|
|
732
811
|
children: [/* @__PURE__ */ S("span", {
|
|
733
812
|
className: "min-w-0",
|
|
734
|
-
children:
|
|
813
|
+
children: pn
|
|
735
814
|
}), /* @__PURE__ */ S(v, {
|
|
736
815
|
variant: "ghost",
|
|
737
816
|
size: "sm",
|
|
738
|
-
onClick: () =>
|
|
817
|
+
onClick: () => B(null),
|
|
739
818
|
children: g("bigconsole.fleet.notice.dismiss", "Dismiss")
|
|
740
819
|
})]
|
|
741
820
|
}),
|
|
742
|
-
|
|
821
|
+
Xt && /* @__PURE__ */ S("p", {
|
|
743
822
|
role: "status",
|
|
744
823
|
"data-testid": "fleet-links-error",
|
|
745
824
|
style: {
|
|
@@ -753,15 +832,15 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
753
832
|
className: "flex flex-wrap items-center gap-2.5",
|
|
754
833
|
children: [/* @__PURE__ */ C("div", {
|
|
755
834
|
className: "relative min-w-0 flex-[1_1_320px] sm:max-w-md",
|
|
756
|
-
children: [/* @__PURE__ */ S(
|
|
835
|
+
children: [/* @__PURE__ */ S(st, {
|
|
757
836
|
"aria-hidden": "true",
|
|
758
837
|
className: "pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2 text-text-muted"
|
|
759
|
-
}), /* @__PURE__ */ S(
|
|
838
|
+
}), /* @__PURE__ */ S(xt, {
|
|
760
839
|
type: "search",
|
|
761
840
|
"aria-label": g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
|
|
762
|
-
placeholder:
|
|
841
|
+
placeholder: k.length > 0 ? g("bigconsole.dashboards.gallery.searchPlaceholder", "Search {{count}} dashboards…", { count: k.length }) : g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
|
|
763
842
|
value: _.searchText,
|
|
764
|
-
onChange: (e) =>
|
|
843
|
+
onChange: (e) => jt(e.target.value),
|
|
765
844
|
style: {
|
|
766
845
|
height: "var(--size-controlHeight-md)",
|
|
767
846
|
paddingInlineStart: "var(--size-controlHeight-md)"
|
|
@@ -769,29 +848,29 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
769
848
|
})]
|
|
770
849
|
}), /* @__PURE__ */ C("div", {
|
|
771
850
|
className: "ms-auto flex flex-wrap items-center gap-2.5",
|
|
772
|
-
children: [/* @__PURE__ */ S(
|
|
773
|
-
label: g(
|
|
851
|
+
children: [/* @__PURE__ */ S(ee, {
|
|
852
|
+
label: g(Oe.label.key, Oe.label.en),
|
|
774
853
|
value: T,
|
|
775
|
-
options:
|
|
776
|
-
onChange:
|
|
777
|
-
}),
|
|
854
|
+
options: Cr,
|
|
855
|
+
onChange: Pt
|
|
856
|
+
}), Nr]
|
|
778
857
|
})]
|
|
779
858
|
}),
|
|
780
859
|
/* @__PURE__ */ C("div", {
|
|
781
860
|
className: "flex items-start gap-2",
|
|
782
861
|
children: [/* @__PURE__ */ S("div", {
|
|
783
862
|
className: "min-w-0 flex-1",
|
|
784
|
-
children: /* @__PURE__ */ S(
|
|
785
|
-
facets:
|
|
786
|
-
facetsTotal:
|
|
787
|
-
category: b ?
|
|
788
|
-
onCategoryChange: (e) =>
|
|
789
|
-
labelFor:
|
|
790
|
-
iconFor: () => /* @__PURE__ */ S(
|
|
863
|
+
children: /* @__PURE__ */ S(_t, {
|
|
864
|
+
facets: Rn,
|
|
865
|
+
facetsTotal: zn,
|
|
866
|
+
category: b ? Ne(b) : "all",
|
|
867
|
+
onCategoryChange: (e) => Mt(Me(e)),
|
|
868
|
+
labelFor: Me,
|
|
869
|
+
iconFor: () => /* @__PURE__ */ S(ct, {
|
|
791
870
|
className: "size-4",
|
|
792
871
|
"aria-hidden": "true"
|
|
793
872
|
}),
|
|
794
|
-
allIcon: /* @__PURE__ */ S(
|
|
873
|
+
allIcon: /* @__PURE__ */ S(et, {
|
|
795
874
|
className: "size-4",
|
|
796
875
|
"aria-hidden": "true"
|
|
797
876
|
}),
|
|
@@ -801,22 +880,22 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
801
880
|
testId: "dashboards-categories",
|
|
802
881
|
moreTestId: "dashboards-categories-more"
|
|
803
882
|
})
|
|
804
|
-
}), /* @__PURE__ */ C(
|
|
883
|
+
}), /* @__PURE__ */ C(wt, {
|
|
805
884
|
"aria-label": g("bigconsole.dashboards.filters.status", "Status"),
|
|
806
885
|
value: x,
|
|
807
|
-
onChange: (e) =>
|
|
886
|
+
onChange: (e) => Nt(e.target.value),
|
|
808
887
|
className: "max-w-[45%] shrink-0 rounded-lg border border-border-default bg-surface px-3 py-1.5 text-sm text-text-secondary",
|
|
809
888
|
"data-testid": "dashboards-status-filter",
|
|
810
889
|
children: [/* @__PURE__ */ S("option", {
|
|
811
890
|
value: "",
|
|
812
891
|
children: g("bigconsole.dashboards.filters.allStatuses", "All statuses")
|
|
813
|
-
}),
|
|
892
|
+
}), Sr.map((e) => /* @__PURE__ */ S("option", {
|
|
814
893
|
value: e.value,
|
|
815
894
|
children: e.label
|
|
816
895
|
}, e.value))]
|
|
817
896
|
})]
|
|
818
897
|
}),
|
|
819
|
-
|
|
898
|
+
D && k.length === 0 && /* @__PURE__ */ S("div", {
|
|
820
899
|
style: {
|
|
821
900
|
display: "flex",
|
|
822
901
|
alignItems: "center",
|
|
@@ -825,7 +904,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
825
904
|
},
|
|
826
905
|
children: /* @__PURE__ */ C("div", {
|
|
827
906
|
style: { textAlign: "center" },
|
|
828
|
-
children: [/* @__PURE__ */ S(
|
|
907
|
+
children: [/* @__PURE__ */ S(Ct, { style: {
|
|
829
908
|
height: "var(--size-icon-xl)",
|
|
830
909
|
width: "var(--size-icon-xl)",
|
|
831
910
|
margin: "0 auto var(--space-formGap)"
|
|
@@ -838,10 +917,10 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
838
917
|
})]
|
|
839
918
|
})
|
|
840
919
|
}),
|
|
841
|
-
|
|
920
|
+
$ && /* @__PURE__ */ C("div", {
|
|
842
921
|
className: "flex items-baseline justify-between gap-3",
|
|
843
922
|
children: [/* @__PURE__ */ S("h2", {
|
|
844
|
-
ref:
|
|
923
|
+
ref: Un,
|
|
845
924
|
tabIndex: -1,
|
|
846
925
|
className: "m-0 text-base font-semibold text-text-primary outline-none",
|
|
847
926
|
"data-testid": "dashboards-results-heading",
|
|
@@ -849,47 +928,59 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
849
928
|
}), /* @__PURE__ */ S("span", {
|
|
850
929
|
className: "text-sm text-text-muted",
|
|
851
930
|
"data-testid": "dashboards-range",
|
|
852
|
-
children:
|
|
931
|
+
children: Or.showing(kr.start, kr.end, K)
|
|
853
932
|
})]
|
|
854
933
|
}),
|
|
855
|
-
|
|
934
|
+
$ && Tn && Zt && k.length > 1 && /* @__PURE__ */ S("p", {
|
|
935
|
+
className: "m-0 text-sm text-text-muted",
|
|
936
|
+
"data-testid": "dashboards-drag-tip",
|
|
937
|
+
children: g("bigconsole.fleet.drag.tip", "Tip: drag a board onto another to make it follow that board.")
|
|
938
|
+
}),
|
|
939
|
+
$ && E === "grid" && /* @__PURE__ */ S("div", {
|
|
856
940
|
"data-testid": "dashboards-grid",
|
|
857
941
|
style: {
|
|
858
942
|
display: "grid",
|
|
859
943
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(280px, 100%), 1fr))",
|
|
860
944
|
gap: "var(--space-controlGap)"
|
|
861
945
|
},
|
|
862
|
-
children:
|
|
946
|
+
children: Ln.map((e) => /* @__PURE__ */ S(we, {
|
|
863
947
|
dashboard: e,
|
|
864
948
|
description: e.description || g("bigconsole.dashboards.card.noDescription", "No description provided"),
|
|
865
|
-
statusLabel: e.status ?
|
|
949
|
+
statusLabel: e.status ? xr(e.status) : void 0,
|
|
866
950
|
meta: [
|
|
867
|
-
`${
|
|
868
|
-
`${
|
|
869
|
-
|
|
951
|
+
`${Er(e)} ${g("bigconsole.dashboards.card.pages", "pages")}`,
|
|
952
|
+
`${Tr(e)} ${g("bigconsole.dashboards.card.widgets", "widgets")}`,
|
|
953
|
+
br(e.updatedAt)
|
|
870
954
|
].join(" · "),
|
|
871
|
-
fleetBadge:
|
|
955
|
+
fleetBadge: er(e),
|
|
872
956
|
openLabel: g("bigconsole.dashboards.card.open", "Open"),
|
|
873
957
|
moreLabel: g("bigconsole.dashboards.card.moreActions", "More actions for {{name}}", { name: e.name }),
|
|
874
|
-
actions:
|
|
875
|
-
onOpen:
|
|
958
|
+
actions: Mr(e),
|
|
959
|
+
onOpen: Zn,
|
|
960
|
+
dnd: Z.dndOf(e)
|
|
876
961
|
}, e.id))
|
|
877
962
|
}),
|
|
878
|
-
|
|
963
|
+
$ && E === "list" && /* @__PURE__ */ S("div", {
|
|
879
964
|
style: {
|
|
880
965
|
display: "flex",
|
|
881
966
|
flexDirection: "column",
|
|
882
967
|
gap: "var(--space-controlGap)"
|
|
883
968
|
},
|
|
884
|
-
children:
|
|
885
|
-
...
|
|
886
|
-
|
|
969
|
+
children: Ln.map((e) => /* @__PURE__ */ S(mt, {
|
|
970
|
+
...He(e.id),
|
|
971
|
+
...Z.dndOf(e).drag,
|
|
972
|
+
...Z.dndOf(e).drop,
|
|
973
|
+
"data-dragging": Z.dndOf(e).dragging ? "true" : void 0,
|
|
974
|
+
"data-drop-target": Z.dndOf(e).target ? "true" : void 0,
|
|
975
|
+
onClick: () => Zn(e.id),
|
|
887
976
|
style: {
|
|
888
977
|
cursor: "pointer",
|
|
889
|
-
marginLeft: `calc(${
|
|
978
|
+
marginLeft: `calc(${J.get(e.id)?.depth ?? 0} * var(--space-sectionGap))`,
|
|
979
|
+
opacity: Z.draggingId === e.id ? .6 : void 0,
|
|
980
|
+
outline: Z.overId === e.id ? "2px solid var(--color-action-primary-bg)" : void 0
|
|
890
981
|
},
|
|
891
982
|
className: "motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
|
|
892
|
-
children: /* @__PURE__ */ S(
|
|
983
|
+
children: /* @__PURE__ */ S(ht, {
|
|
893
984
|
style: { padding: "var(--space-cardPadding)" },
|
|
894
985
|
children: /* @__PURE__ */ C("div", {
|
|
895
986
|
style: {
|
|
@@ -899,10 +990,10 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
899
990
|
flexWrap: "wrap"
|
|
900
991
|
},
|
|
901
992
|
children: [
|
|
902
|
-
|
|
993
|
+
G && (J.get(e.id)?.childCount ?? 0) > 0 ? /* @__PURE__ */ S("button", {
|
|
903
994
|
type: "button",
|
|
904
|
-
"aria-expanded": !
|
|
905
|
-
"aria-label":
|
|
995
|
+
"aria-expanded": !J.get(e.id)?.collapsed,
|
|
996
|
+
"aria-label": J.get(e.id)?.collapsed ? g("bigconsole.fleet.list.expand", "Show copies of {{name}}", { name: e.name }) : g("bigconsole.fleet.list.collapse", "Hide copies of {{name}}", { name: e.name }),
|
|
906
997
|
"data-testid": "fleet-toggle-copies",
|
|
907
998
|
className: "flex shrink-0 items-center justify-center rounded-button focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
908
999
|
style: {
|
|
@@ -911,12 +1002,12 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
911
1002
|
color: "var(--color-text-secondary)"
|
|
912
1003
|
},
|
|
913
1004
|
onClick: (t) => {
|
|
914
|
-
t.stopPropagation(),
|
|
1005
|
+
t.stopPropagation(), hn(e.id);
|
|
915
1006
|
},
|
|
916
|
-
children:
|
|
1007
|
+
children: J.get(e.id)?.collapsed ? /* @__PURE__ */ S(Ye, { style: {
|
|
917
1008
|
height: "var(--size-icon-sm)",
|
|
918
1009
|
width: "var(--size-icon-sm)"
|
|
919
|
-
} }) : /* @__PURE__ */ S(
|
|
1010
|
+
} }) : /* @__PURE__ */ S(Je, { style: {
|
|
920
1011
|
height: "var(--size-icon-sm)",
|
|
921
1012
|
width: "var(--size-icon-sm)"
|
|
922
1013
|
} })
|
|
@@ -932,7 +1023,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
932
1023
|
borderRadius: "var(--radius-button)",
|
|
933
1024
|
backgroundColor: "var(--color-bg-accentSubtle)"
|
|
934
1025
|
},
|
|
935
|
-
children: /* @__PURE__ */ S(
|
|
1026
|
+
children: /* @__PURE__ */ S($e, {
|
|
936
1027
|
"aria-hidden": "true",
|
|
937
1028
|
style: {
|
|
938
1029
|
height: "var(--size-icon-md)",
|
|
@@ -967,14 +1058,15 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
967
1058
|
},
|
|
968
1059
|
children: /* @__PURE__ */ S("button", {
|
|
969
1060
|
type: "button",
|
|
1061
|
+
"data-drag-through": "",
|
|
970
1062
|
className: "max-w-full truncate text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
971
1063
|
onClick: (t) => {
|
|
972
|
-
t.stopPropagation(),
|
|
1064
|
+
t.stopPropagation(), Zn(e.id);
|
|
973
1065
|
},
|
|
974
1066
|
children: e.name
|
|
975
1067
|
})
|
|
976
1068
|
}),
|
|
977
|
-
e.category && /* @__PURE__ */ S(
|
|
1069
|
+
e.category && /* @__PURE__ */ S(pt, {
|
|
978
1070
|
variant: "secondary",
|
|
979
1071
|
style: {
|
|
980
1072
|
fontSize: "10px",
|
|
@@ -983,11 +1075,11 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
983
1075
|
},
|
|
984
1076
|
children: e.category
|
|
985
1077
|
}),
|
|
986
|
-
e.status && /* @__PURE__ */ S(
|
|
1078
|
+
e.status && /* @__PURE__ */ S(Se, {
|
|
987
1079
|
status: e.status,
|
|
988
|
-
label:
|
|
1080
|
+
label: xr(e.status)
|
|
989
1081
|
}),
|
|
990
|
-
/* @__PURE__ */ S(
|
|
1082
|
+
/* @__PURE__ */ S(ue, { ...er(e) })
|
|
991
1083
|
]
|
|
992
1084
|
}), /* @__PURE__ */ S("p", {
|
|
993
1085
|
style: {
|
|
@@ -1017,7 +1109,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1017
1109
|
gap: "var(--space-iconGap)"
|
|
1018
1110
|
},
|
|
1019
1111
|
children: [
|
|
1020
|
-
/* @__PURE__ */ S(
|
|
1112
|
+
/* @__PURE__ */ S(Qe, { style: {
|
|
1021
1113
|
height: "var(--size-icon-sm)",
|
|
1022
1114
|
width: "var(--size-icon-sm)",
|
|
1023
1115
|
color: "var(--color-action-primary-bg)"
|
|
@@ -1028,7 +1120,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1028
1120
|
fontWeight: "var(--font-weight-semibold)",
|
|
1029
1121
|
color: "var(--color-text-primary)"
|
|
1030
1122
|
},
|
|
1031
|
-
children:
|
|
1123
|
+
children: Er(e)
|
|
1032
1124
|
}),
|
|
1033
1125
|
/* @__PURE__ */ S("span", {
|
|
1034
1126
|
style: {
|
|
@@ -1046,7 +1138,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1046
1138
|
gap: "var(--space-iconGap)"
|
|
1047
1139
|
},
|
|
1048
1140
|
children: [
|
|
1049
|
-
/* @__PURE__ */ S(
|
|
1141
|
+
/* @__PURE__ */ S(Ze, { style: {
|
|
1050
1142
|
height: "var(--size-icon-sm)",
|
|
1051
1143
|
width: "var(--size-icon-sm)",
|
|
1052
1144
|
color: "var(--color-action-primary-bg)"
|
|
@@ -1057,7 +1149,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1057
1149
|
fontWeight: "var(--font-weight-semibold)",
|
|
1058
1150
|
color: "var(--color-text-primary)"
|
|
1059
1151
|
},
|
|
1060
|
-
children:
|
|
1152
|
+
children: Tr(e)
|
|
1061
1153
|
}),
|
|
1062
1154
|
/* @__PURE__ */ S("span", {
|
|
1063
1155
|
style: {
|
|
@@ -1074,7 +1166,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1074
1166
|
alignItems: "center",
|
|
1075
1167
|
gap: "var(--space-iconGap)"
|
|
1076
1168
|
},
|
|
1077
|
-
children: [/* @__PURE__ */ S(
|
|
1169
|
+
children: [/* @__PURE__ */ S(Ke, { style: {
|
|
1078
1170
|
height: "var(--size-icon-sm)",
|
|
1079
1171
|
width: "var(--size-icon-sm)",
|
|
1080
1172
|
color: "var(--color-text-muted)"
|
|
@@ -1084,7 +1176,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1084
1176
|
fontWeight: "var(--font-weight-medium)",
|
|
1085
1177
|
color: "var(--color-text-muted)"
|
|
1086
1178
|
},
|
|
1087
|
-
children:
|
|
1179
|
+
children: br(e.updatedAt)
|
|
1088
1180
|
})]
|
|
1089
1181
|
})
|
|
1090
1182
|
]
|
|
@@ -1096,15 +1188,17 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1096
1188
|
gap: "var(--space-controlGap)"
|
|
1097
1189
|
},
|
|
1098
1190
|
children: [
|
|
1099
|
-
/* @__PURE__ */ S(
|
|
1100
|
-
linked:
|
|
1101
|
-
onLink: (t) =>
|
|
1102
|
-
onDetach: (t) =>
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1191
|
+
/* @__PURE__ */ S(de, {
|
|
1192
|
+
linked: Y(e).active || Y(e).pending,
|
|
1193
|
+
onLink: (t) => tr(e, t),
|
|
1194
|
+
onDetach: (t) => fr(e, t),
|
|
1195
|
+
isMaster: e.isMaster === !0,
|
|
1196
|
+
onSetMaster: (t) => cr(e, t),
|
|
1197
|
+
ready: Zt,
|
|
1198
|
+
disabled: F,
|
|
1199
|
+
awaitingAnswer: bn.has(e.id),
|
|
1200
|
+
onAccept: (t) => Q(e, !0, t),
|
|
1201
|
+
onDecline: (t) => Q(e, !1, t)
|
|
1108
1202
|
}),
|
|
1109
1203
|
/* @__PURE__ */ S(h, {
|
|
1110
1204
|
permission: r.DASHBOARD_UPDATE,
|
|
@@ -1112,7 +1206,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1112
1206
|
children: /* @__PURE__ */ S(v, {
|
|
1113
1207
|
variant: "ghost",
|
|
1114
1208
|
size: "sm",
|
|
1115
|
-
onClick: (t) =>
|
|
1209
|
+
onClick: (t) => Qn(e.id, t),
|
|
1116
1210
|
style: {
|
|
1117
1211
|
height: "var(--size-controlHeight-md)",
|
|
1118
1212
|
width: "var(--size-controlHeight-md)",
|
|
@@ -1120,7 +1214,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1120
1214
|
borderRadius: "var(--radius-button)"
|
|
1121
1215
|
},
|
|
1122
1216
|
title: g("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
|
|
1123
|
-
children: /* @__PURE__ */ S(
|
|
1217
|
+
children: /* @__PURE__ */ S(at, { style: {
|
|
1124
1218
|
height: "var(--size-icon-sm)",
|
|
1125
1219
|
width: "var(--size-icon-sm)"
|
|
1126
1220
|
} })
|
|
@@ -1132,7 +1226,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1132
1226
|
children: /* @__PURE__ */ S(v, {
|
|
1133
1227
|
variant: "ghost",
|
|
1134
1228
|
size: "sm",
|
|
1135
|
-
onClick: (t) =>
|
|
1229
|
+
onClick: (t) => pr(e.id, e.name, t),
|
|
1136
1230
|
style: {
|
|
1137
1231
|
height: "var(--size-controlHeight-md)",
|
|
1138
1232
|
width: "var(--size-controlHeight-md)",
|
|
@@ -1140,7 +1234,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1140
1234
|
borderRadius: "var(--radius-button)"
|
|
1141
1235
|
},
|
|
1142
1236
|
title: g("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
|
|
1143
|
-
children: /* @__PURE__ */ S(
|
|
1237
|
+
children: /* @__PURE__ */ S(Xe, { style: {
|
|
1144
1238
|
height: "var(--size-icon-sm)",
|
|
1145
1239
|
width: "var(--size-icon-sm)"
|
|
1146
1240
|
} })
|
|
@@ -1152,7 +1246,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1152
1246
|
children: /* @__PURE__ */ S(v, {
|
|
1153
1247
|
variant: "ghost",
|
|
1154
1248
|
size: "sm",
|
|
1155
|
-
onClick: (t) =>
|
|
1249
|
+
onClick: (t) => $n(e.id, t),
|
|
1156
1250
|
style: {
|
|
1157
1251
|
height: "var(--size-controlHeight-md)",
|
|
1158
1252
|
width: "var(--size-controlHeight-md)",
|
|
@@ -1161,7 +1255,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1161
1255
|
},
|
|
1162
1256
|
className: "hover:text-status-error-text hover:bg-status-error-bg/10",
|
|
1163
1257
|
title: g("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
|
|
1164
|
-
children: /* @__PURE__ */ S(
|
|
1258
|
+
children: /* @__PURE__ */ S(lt, { style: {
|
|
1165
1259
|
height: "var(--size-icon-sm)",
|
|
1166
1260
|
width: "var(--size-icon-sm)"
|
|
1167
1261
|
} })
|
|
@@ -1174,19 +1268,19 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1174
1268
|
})
|
|
1175
1269
|
}, e.id))
|
|
1176
1270
|
}),
|
|
1177
|
-
|
|
1178
|
-
page:
|
|
1179
|
-
totalPages:
|
|
1180
|
-
total:
|
|
1271
|
+
$ && Pn > 1 && /* @__PURE__ */ S(vt, {
|
|
1272
|
+
page: q,
|
|
1273
|
+
totalPages: Pn,
|
|
1274
|
+
total: K,
|
|
1181
1275
|
pageSize: w,
|
|
1182
|
-
onPage:
|
|
1183
|
-
labels:
|
|
1276
|
+
onPage: Kn,
|
|
1277
|
+
labels: Or,
|
|
1184
1278
|
className: "mt-0"
|
|
1185
1279
|
}),
|
|
1186
|
-
|
|
1280
|
+
Ar && /* @__PURE__ */ S(yt, {
|
|
1187
1281
|
treatment: "insight",
|
|
1188
1282
|
className: "border-[var(--color-border-seam)]",
|
|
1189
|
-
children: /* @__PURE__ */ S(
|
|
1283
|
+
children: /* @__PURE__ */ S(bt, {
|
|
1190
1284
|
illustration: "empty-search",
|
|
1191
1285
|
kind: y.trim() ? "no-results" : "filtered",
|
|
1192
1286
|
size: "page",
|
|
@@ -1194,16 +1288,16 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1194
1288
|
description: y.trim() ? g("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : g("bigconsole.dashboards.empty.filtersDescription", "No dashboards have the category and status you picked."),
|
|
1195
1289
|
action: /* @__PURE__ */ S(v, {
|
|
1196
1290
|
variant: "outline",
|
|
1197
|
-
onClick:
|
|
1291
|
+
onClick: mr,
|
|
1198
1292
|
"data-testid": "dashboards-clear-filters",
|
|
1199
1293
|
children: g("bigconsole.dashboards.filters.clear", "Clear filters")
|
|
1200
1294
|
})
|
|
1201
1295
|
})
|
|
1202
1296
|
}),
|
|
1203
|
-
|
|
1297
|
+
jr && /* @__PURE__ */ S(yt, {
|
|
1204
1298
|
treatment: "insight",
|
|
1205
1299
|
className: "border-[var(--color-border-seam)]",
|
|
1206
|
-
children: /* @__PURE__ */ S(
|
|
1300
|
+
children: /* @__PURE__ */ S(bt, {
|
|
1207
1301
|
illustration: "empty-data",
|
|
1208
1302
|
kind: "first-use",
|
|
1209
1303
|
glassIllustration: "charts",
|
|
@@ -1221,8 +1315,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1221
1315
|
permission: r.DASHBOARD_CREATE,
|
|
1222
1316
|
deniedBehavior: "hide",
|
|
1223
1317
|
children: /* @__PURE__ */ C(v, {
|
|
1224
|
-
onClick:
|
|
1225
|
-
children: [/* @__PURE__ */ S(
|
|
1318
|
+
onClick: qn,
|
|
1319
|
+
children: [/* @__PURE__ */ S(ot, { style: {
|
|
1226
1320
|
marginRight: "var(--space-iconGap)",
|
|
1227
1321
|
height: "var(--size-icon-sm)",
|
|
1228
1322
|
width: "var(--size-icon-sm)"
|
|
@@ -1233,8 +1327,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1233
1327
|
deniedBehavior: "hide",
|
|
1234
1328
|
children: /* @__PURE__ */ C(v, {
|
|
1235
1329
|
variant: "outline",
|
|
1236
|
-
onClick:
|
|
1237
|
-
children: [/* @__PURE__ */ S(
|
|
1330
|
+
onClick: hr,
|
|
1331
|
+
children: [/* @__PURE__ */ S(dt, { style: {
|
|
1238
1332
|
marginRight: "var(--space-iconGap)",
|
|
1239
1333
|
height: "var(--size-icon-sm)",
|
|
1240
1334
|
width: "var(--size-icon-sm)"
|
|
@@ -1247,32 +1341,32 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
|
|
|
1247
1341
|
]
|
|
1248
1342
|
})] })
|
|
1249
1343
|
}),
|
|
1250
|
-
/* @__PURE__ */ S(
|
|
1251
|
-
isOpen:
|
|
1252
|
-
isCreating:
|
|
1253
|
-
onClose:
|
|
1254
|
-
onCreate:
|
|
1255
|
-
onTemplateInstalled:
|
|
1344
|
+
/* @__PURE__ */ S(xe, {
|
|
1345
|
+
isOpen: It,
|
|
1346
|
+
isCreating: Rt,
|
|
1347
|
+
onClose: Yn,
|
|
1348
|
+
onCreate: Xn,
|
|
1349
|
+
onTemplateInstalled: Jn
|
|
1256
1350
|
}),
|
|
1257
|
-
/* @__PURE__ */ S(
|
|
1258
|
-
onQueryChange:
|
|
1259
|
-
isOpen:
|
|
1260
|
-
board:
|
|
1261
|
-
candidates:
|
|
1262
|
-
busy:
|
|
1263
|
-
error:
|
|
1264
|
-
onClose: () =>
|
|
1265
|
-
onLink:
|
|
1351
|
+
/* @__PURE__ */ S(fe, {
|
|
1352
|
+
onQueryChange: rr,
|
|
1353
|
+
isOpen: L !== null,
|
|
1354
|
+
board: L,
|
|
1355
|
+
candidates: ar,
|
|
1356
|
+
busy: F,
|
|
1357
|
+
error: ln,
|
|
1358
|
+
onClose: () => cn(null),
|
|
1359
|
+
onLink: sr
|
|
1266
1360
|
}),
|
|
1267
|
-
/* @__PURE__ */ S(
|
|
1268
|
-
isOpen:
|
|
1269
|
-
onClose:
|
|
1270
|
-
onSuccess:
|
|
1361
|
+
/* @__PURE__ */ S(Te, {
|
|
1362
|
+
isOpen: Bt,
|
|
1363
|
+
onClose: gr,
|
|
1364
|
+
onSuccess: yr
|
|
1271
1365
|
}),
|
|
1272
|
-
/* @__PURE__ */ S(
|
|
1273
|
-
isOpen:
|
|
1274
|
-
onClose:
|
|
1275
|
-
onSuccess:
|
|
1366
|
+
/* @__PURE__ */ S(Ee, {
|
|
1367
|
+
isOpen: Ht,
|
|
1368
|
+
onClose: vr,
|
|
1369
|
+
onSuccess: yr
|
|
1276
1370
|
})
|
|
1277
1371
|
]
|
|
1278
1372
|
});
|