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