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