@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.5
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/BigConsoleRoutes.js +149 -140
- package/dist/bigconsole/assistant/assistantProduct.js +4 -1
- package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
- package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
- package/dist/bigconsole/assistant/pageContext.js +6 -1
- package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
- package/dist/bigconsole/assistant/pageControls.js +169 -0
- package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
- package/dist/bigconsole/assistant/previewControl.js +10 -0
- package/dist/bigconsole/assistant/recordAdapters.js +27 -26
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
- package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +9 -9
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
- package/dist/bigconsole/components/common/SortBySelect.js +29 -0
- package/dist/bigconsole/components/common/index.d.ts +1 -0
- package/dist/bigconsole/components/common/index.js +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +153 -153
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +134 -134
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +46 -46
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +51 -50
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +14 -14
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +68 -67
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/constants/backendErrors.js +94 -0
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
- package/dist/bigconsole/hooks/useDrilldown.js +3 -3
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
- package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
- package/dist/bigconsole/pages/DashboardsPage.js +269 -221
- package/dist/bigconsole/pages/DataParsersPage.js +180 -157
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
- package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +335 -299
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +279 -265
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +107 -88
- package/dist/bigconsole/pages/SettingsPage.js +179 -173
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/store/widgetStore.d.ts +12 -0
- package/dist/bigconsole/store/widgetStore.js +3 -1
- package/dist/bigconsole/utils/backendError.d.ts +18 -0
- package/dist/bigconsole/utils/backendError.js +42 -0
- package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
- package/dist/bigconsole/utils/dashboardList.js +15 -0
- package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
- package/dist/bigconsole/utils/dataSinkList.js +15 -0
- package/dist/bigconsole/utils/formDirty.d.ts +82 -0
- package/dist/bigconsole/utils/formDirty.js +21 -0
- package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
- package/dist/bigconsole/utils/insightsDraft.js +8 -0
- package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
- package/dist/bigconsole/utils/layoutBaseline.js +96 -0
- package/dist/bigconsole/utils/listSort.d.ts +80 -0
- package/dist/bigconsole/utils/listSort.js +85 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
- package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
- package/dist/bigconsole/workflowOpen.js +15 -14
- package/package.json +3 -3
|
@@ -2,26 +2,31 @@ import { useBigConsoleNavigate as e } from "../context/BigConsoleContext.js";
|
|
|
2
2
|
import "../context/index.js";
|
|
3
3
|
import { reportBigConsoleQuotaError as t } from "../utils/quota.js";
|
|
4
4
|
import { Section as n, SectionStack as r } from "../components/common/Section.js";
|
|
5
|
+
import { SortBySelect as i } from "../components/common/SortBySelect.js";
|
|
5
6
|
import "../components/common/index.js";
|
|
6
|
-
import
|
|
7
|
+
import a from "../hooks/useDashboardOperations.js";
|
|
7
8
|
import "../hooks/index.js";
|
|
8
|
-
import { BIGCONSOLE_PERMISSIONS as
|
|
9
|
-
import { useTr as
|
|
9
|
+
import { BIGCONSOLE_PERMISSIONS as o } from "../../constants/permissions.js";
|
|
10
|
+
import { useTr as s } from "../../shared/hooks/useTr.js";
|
|
10
11
|
import ee from "../components/dashboard/CreateDashboardDialog.js";
|
|
11
|
-
import
|
|
12
|
-
import { isNative as
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
12
|
+
import c, { useDashboardStatusLabel as te } from "../components/dashboard/DashboardStatusPill.js";
|
|
13
|
+
import { isNative as l, nativeConfirm as ne, nativeImpact as u, nativeNotify as d } from "../../utils/nativeBridge.js";
|
|
14
|
+
import re from "../components/dashboard/ImportDashboardDialog.js";
|
|
15
|
+
import { LIST_SORT_COPY as ie, listSortOptions as ae } from "../utils/listSort.js";
|
|
16
|
+
import { dashboardsListControls as oe } from "../assistant/pageControls.js";
|
|
17
|
+
import { selectDashboards as se } from "../utils/dashboardList.js";
|
|
18
|
+
import { resolveCreateParam as ce, withoutCreateParam as le } from "../utils/createDialogParam.js";
|
|
19
|
+
import { memo as f, useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
|
|
20
|
+
import { useSearchParams as ue } from "react-router";
|
|
21
|
+
import { AccessDenied as de, PermissionButton as _ } from "@burdenoff/fe-libs/shared/components";
|
|
22
|
+
import { usePermissions as fe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
|
+
import { Calendar as pe, ChevronLeft as me, ChevronRight as he, Copy as ge, FileText as _e, Layers as ve, LayoutDashboard as v, LayoutGrid as ye, List as be, Pencil as xe, Plus as Se, Search as Ce, Trash2 as we, Upload as Te } from "lucide-react";
|
|
24
|
+
import { AuroraBackground as y, Badge as b, Button as x, CTAOverflowMenu as S, Card as Ee, CardContent as De, GlassCard as Oe, GradientText as C, IllustratedEmptyState as ke, Input as Ae, PagePurpose as je, Spinner as w } from "@burdenoff/fe-libs/ui";
|
|
21
25
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
26
|
+
import { useAssistantPageControls as Me } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
22
27
|
//#region src/bigconsole/pages/DashboardsPage.tsx
|
|
23
28
|
var D = "bf-bigconsole-dashboards-view", O = 12, k = 7;
|
|
24
|
-
function
|
|
29
|
+
function Ne(e, t) {
|
|
25
30
|
if (t <= k) return Array.from({ length: t }, (e, t) => t + 1);
|
|
26
31
|
let n = new Set([
|
|
27
32
|
1,
|
|
@@ -34,7 +39,7 @@ function Ee(e, t) {
|
|
|
34
39
|
t > 0 && e - r[t - 1] > 1 && i.push(null), i.push(e);
|
|
35
40
|
}), i;
|
|
36
41
|
}
|
|
37
|
-
var
|
|
42
|
+
var Pe = f(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onCreate: i, onImport: a, canCreate: o, canImport: s }) {
|
|
38
43
|
return /* @__PURE__ */ E("div", {
|
|
39
44
|
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
40
45
|
children: [/* @__PURE__ */ T(y, { intensity: "subtle" }), /* @__PURE__ */ T("div", {
|
|
@@ -65,7 +70,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
65
70
|
borderRadius: "var(--radius-card)",
|
|
66
71
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
67
72
|
},
|
|
68
|
-
children: /* @__PURE__ */ T(
|
|
73
|
+
children: /* @__PURE__ */ T(v, { style: {
|
|
69
74
|
height: "var(--size-icon-lg)",
|
|
70
75
|
width: "var(--size-icon-lg)",
|
|
71
76
|
color: "var(--color-action-primary-text)"
|
|
@@ -96,7 +101,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
96
101
|
label: n,
|
|
97
102
|
onSelect: i,
|
|
98
103
|
disabled: !o,
|
|
99
|
-
icon: /* @__PURE__ */ T(
|
|
104
|
+
icon: /* @__PURE__ */ T(Se, { style: {
|
|
100
105
|
marginRight: "var(--space-iconGap)",
|
|
101
106
|
height: "var(--size-icon-sm)",
|
|
102
107
|
width: "var(--size-icon-sm)"
|
|
@@ -105,8 +110,8 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
105
110
|
actions: [{
|
|
106
111
|
label: r,
|
|
107
112
|
onSelect: a,
|
|
108
|
-
disabled: !
|
|
109
|
-
icon: /* @__PURE__ */ T(
|
|
113
|
+
disabled: !s,
|
|
114
|
+
icon: /* @__PURE__ */ T(Te, { style: {
|
|
110
115
|
height: "var(--size-icon-sm)",
|
|
111
116
|
width: "var(--size-icon-sm)"
|
|
112
117
|
} })
|
|
@@ -116,80 +121,88 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
116
121
|
})
|
|
117
122
|
})]
|
|
118
123
|
});
|
|
119
|
-
}), A =
|
|
120
|
-
let
|
|
124
|
+
}), A = f(function() {
|
|
125
|
+
let f = e(), y = s(), [S, C] = g(""), [k, A] = g(""), [j, Fe] = g(""), [M, Ie] = g("default"), [N, P] = g(1), [Le, F] = g(!1), [I, Re] = g(!1), [ze, Be] = g(!1), [L, Ve] = g(() => {
|
|
121
126
|
try {
|
|
122
127
|
return window.localStorage.getItem(D) === "list" ? "list" : "grid";
|
|
123
128
|
} catch {
|
|
124
129
|
return "grid";
|
|
125
130
|
}
|
|
126
|
-
}),
|
|
127
|
-
|
|
131
|
+
}), He = p((e) => {
|
|
132
|
+
Ve(e);
|
|
128
133
|
try {
|
|
129
134
|
window.localStorage.setItem(D, e);
|
|
130
135
|
} catch {}
|
|
131
|
-
}, []), { loading:
|
|
132
|
-
|
|
133
|
-
let e =
|
|
134
|
-
permissionsLoading:
|
|
135
|
-
canRead:
|
|
136
|
-
canCreate:
|
|
136
|
+
}, []), { loading: R, error: z, dashboards: B, createDashboard: Ue, deleteDashboard: We, cloneDashboard: Ge, refetch: V } = a(), { hasPermission: H, isLoading: U } = fe(), W = H(o.DASHBOARD_READ), G = H(o.DASHBOARD_CREATE), Ke = H(o.DASHBOARD_IMPORT), [K, qe] = ue();
|
|
137
|
+
m(() => {
|
|
138
|
+
let e = ce(K, {
|
|
139
|
+
permissionsLoading: U,
|
|
140
|
+
canRead: W,
|
|
141
|
+
canCreate: G
|
|
137
142
|
});
|
|
138
|
-
e === "none" || e === "wait" || (e === "open" &&
|
|
143
|
+
e === "none" || e === "wait" || (e === "open" && F(!0), qe(le(K), { replace: !0 }));
|
|
139
144
|
}, [
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
K,
|
|
146
|
+
qe,
|
|
147
|
+
U,
|
|
142
148
|
W,
|
|
143
|
-
G
|
|
144
|
-
K
|
|
149
|
+
G
|
|
145
150
|
]);
|
|
146
|
-
let
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
let q = h(() => Array.from(new Set(B.flatMap((e) => e.category ? [e.category] : []))).sort(), [B]), { filtered: J, totalPages: Y, pageItems: X } = se(B, {
|
|
152
|
+
search: S,
|
|
153
|
+
category: k,
|
|
154
|
+
status: j,
|
|
155
|
+
sort: M,
|
|
156
|
+
page: N,
|
|
157
|
+
pageSize: O
|
|
158
|
+
}), Je = (Math.min(N, Y) - 1) * O;
|
|
159
|
+
m(() => {
|
|
160
|
+
P(1);
|
|
149
161
|
}, [
|
|
150
162
|
S,
|
|
151
|
-
|
|
163
|
+
L,
|
|
152
164
|
k,
|
|
153
|
-
j
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
j,
|
|
166
|
+
M
|
|
167
|
+
]), m(() => {
|
|
168
|
+
N > Y && P(Y);
|
|
169
|
+
}, [N, Y]);
|
|
170
|
+
let Ye = p(() => {
|
|
171
|
+
P((e) => Math.max(1, e - 1));
|
|
172
|
+
}, []), Xe = p(() => {
|
|
173
|
+
P((e) => Math.min(Y, e + 1));
|
|
174
|
+
}, [Y]), Ze = p((e) => {
|
|
175
|
+
P(e);
|
|
176
|
+
}, []), Qe = p(() => {
|
|
177
|
+
F(!0);
|
|
178
|
+
}, []), $e = p(({ dashboardId: e }) => {
|
|
179
|
+
V(), f(`/dashboards/${e}`);
|
|
180
|
+
}, [V, f]), et = p(() => {
|
|
181
|
+
I || F(!1);
|
|
182
|
+
}, [I]), tt = p(async (e) => {
|
|
183
|
+
Re(!0);
|
|
171
184
|
try {
|
|
172
|
-
let t = await
|
|
185
|
+
let t = await Ue({
|
|
173
186
|
name: e.name,
|
|
174
187
|
description: e.description,
|
|
175
188
|
category: e.category,
|
|
176
189
|
tags: e.tags
|
|
177
190
|
});
|
|
178
|
-
t && (
|
|
191
|
+
t && (F(!1), f(`/dashboards/${t.id}/builder`));
|
|
179
192
|
} catch (e) {
|
|
180
193
|
if (t(e, "project")) {
|
|
181
|
-
|
|
194
|
+
F(!1);
|
|
182
195
|
return;
|
|
183
196
|
}
|
|
184
|
-
throw console.error("Failed to create dashboard:", e),
|
|
197
|
+
throw console.error("Failed to create dashboard:", e), l() && d("error"), e;
|
|
185
198
|
} finally {
|
|
186
|
-
|
|
199
|
+
Re(!1);
|
|
187
200
|
}
|
|
188
|
-
}, [
|
|
189
|
-
|
|
190
|
-
}, [
|
|
191
|
-
t.stopPropagation(),
|
|
192
|
-
}, [
|
|
201
|
+
}, [Ue, f]), Z = p((e) => {
|
|
202
|
+
f(`/dashboards/${e}`);
|
|
203
|
+
}, [f]), nt = p((e, t) => {
|
|
204
|
+
t.stopPropagation(), f(`/dashboards/${e}/builder`);
|
|
205
|
+
}, [f]), rt = p(async (e, t) => {
|
|
193
206
|
t.stopPropagation();
|
|
194
207
|
let n = y("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), r = await ne({
|
|
195
208
|
title: "Delete dashboard?",
|
|
@@ -198,54 +211,80 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
198
211
|
cancelButtonTitle: "Cancel"
|
|
199
212
|
});
|
|
200
213
|
if (r === null ? window.confirm(n) : r) {
|
|
201
|
-
|
|
214
|
+
u("medium");
|
|
202
215
|
try {
|
|
203
|
-
await
|
|
216
|
+
await We(e), l() && d("success");
|
|
204
217
|
} catch (e) {
|
|
205
|
-
throw
|
|
218
|
+
throw l() && d("error"), e;
|
|
206
219
|
}
|
|
207
220
|
}
|
|
208
|
-
}, [
|
|
221
|
+
}, [We, y]), it = p(async (e, n, r) => {
|
|
209
222
|
r.stopPropagation();
|
|
210
223
|
let i = y("bigconsole.dashboards.clone.defaultSuffix", "{{sourceName}} (Copy)", { sourceName: n }), a = window.prompt(y("bigconsole.dashboards.clone.namePrompt", "Name for the cloned dashboard:"), i);
|
|
211
224
|
if (!(!a || !a.trim())) {
|
|
212
|
-
|
|
225
|
+
u("medium");
|
|
213
226
|
try {
|
|
214
|
-
let t = await
|
|
215
|
-
t && (
|
|
227
|
+
let t = await Ge(e, a.trim());
|
|
228
|
+
t && (l() && d("success"), f(`/dashboards/${t.id}`));
|
|
216
229
|
} catch (e) {
|
|
217
230
|
if (t(e, "project")) return;
|
|
218
|
-
throw
|
|
231
|
+
throw l() && d("error"), e;
|
|
219
232
|
}
|
|
220
233
|
}
|
|
221
234
|
}, [
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
Ge,
|
|
236
|
+
f,
|
|
224
237
|
y
|
|
225
|
-
]),
|
|
226
|
-
|
|
227
|
-
}, []),
|
|
228
|
-
|
|
229
|
-
}, []),
|
|
230
|
-
|
|
231
|
-
}, [
|
|
238
|
+
]), at = p(() => {
|
|
239
|
+
Be(!0);
|
|
240
|
+
}, []), ot = p(() => {
|
|
241
|
+
Be(!1);
|
|
242
|
+
}, []), st = p((e, t) => {
|
|
243
|
+
V();
|
|
244
|
+
}, [V]), ct = (e) => {
|
|
232
245
|
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);
|
|
233
246
|
return i < 1 ? y("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${y("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${y("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` : o < 7 ? `${o}${y("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
|
|
234
247
|
month: "short",
|
|
235
248
|
day: "numeric",
|
|
236
249
|
year: t.getFullYear() === n.getFullYear() ? void 0 : "numeric"
|
|
237
250
|
}).format(t);
|
|
238
|
-
},
|
|
251
|
+
}, Q = te(), $ = h(() => Array.from(new Set(B.map((e) => e.status).filter((e) => e !== void 0))).sort().map((e) => ({
|
|
252
|
+
value: e,
|
|
253
|
+
label: Q(e)
|
|
254
|
+
})), [B, Q]), lt = h(() => ae(y, !0), [y]);
|
|
255
|
+
Me(h(() => !U && W && !z ? oe({
|
|
256
|
+
tr: y,
|
|
257
|
+
categories: q,
|
|
258
|
+
statuses: $,
|
|
259
|
+
category: k,
|
|
260
|
+
status: j,
|
|
261
|
+
setCategory: A,
|
|
262
|
+
setStatus: Fe,
|
|
263
|
+
setSearch: C,
|
|
264
|
+
sort: M,
|
|
265
|
+
setSort: Ie
|
|
266
|
+
}) : null, [
|
|
267
|
+
y,
|
|
268
|
+
U,
|
|
269
|
+
W,
|
|
270
|
+
z,
|
|
271
|
+
q,
|
|
272
|
+
$,
|
|
273
|
+
k,
|
|
274
|
+
j,
|
|
275
|
+
M
|
|
276
|
+
]));
|
|
277
|
+
let ut = (e) => e.widgetCount ?? 0, dt = (e) => e.pageCount || 0, ft = /* @__PURE__ */ T(Pe, {
|
|
239
278
|
title: y("bigconsole.dashboards.title", "Dashboards"),
|
|
240
279
|
subtitle: y("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards"),
|
|
241
280
|
createLabel: y("bigconsole.dashboards.actions.create", "Create Dashboard"),
|
|
242
281
|
importLabel: y("bigconsole.dashboards.actions.import", "Import"),
|
|
243
|
-
onCreate:
|
|
244
|
-
onImport:
|
|
245
|
-
canCreate:
|
|
246
|
-
canImport:
|
|
282
|
+
onCreate: Qe,
|
|
283
|
+
onImport: at,
|
|
284
|
+
canCreate: G,
|
|
285
|
+
canImport: Ke
|
|
247
286
|
});
|
|
248
|
-
if (
|
|
287
|
+
if (U) return /* @__PURE__ */ T("div", {
|
|
249
288
|
style: {
|
|
250
289
|
display: "flex",
|
|
251
290
|
alignItems: "center",
|
|
@@ -257,33 +296,33 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
257
296
|
width: "var(--size-icon-xl)"
|
|
258
297
|
} })
|
|
259
298
|
});
|
|
260
|
-
if (!
|
|
299
|
+
if (!W) return /* @__PURE__ */ T(de, {
|
|
261
300
|
title: y("bigconsole.dashboards.accessDenied.title", "Access Denied"),
|
|
262
301
|
description: y("bigconsole.dashboards.accessDenied.description", "You don't have permission to view dashboards.")
|
|
263
302
|
});
|
|
264
|
-
if (
|
|
303
|
+
if (z) return /* @__PURE__ */ E("div", {
|
|
265
304
|
"data-tour": "bigconsole-dashboards-list",
|
|
266
305
|
style: {
|
|
267
306
|
minHeight: "100vh",
|
|
268
307
|
backgroundColor: "var(--color-bg-canvas)"
|
|
269
308
|
},
|
|
270
|
-
children: [
|
|
309
|
+
children: [ft, /* @__PURE__ */ T("div", {
|
|
271
310
|
style: { padding: "var(--space-pagePadding)" },
|
|
272
311
|
children: /* @__PURE__ */ T(n, {
|
|
273
312
|
headingLevel: 2,
|
|
274
313
|
tone: "danger",
|
|
275
314
|
title: y("bigconsole.dashboards.error.title", "Error loading dashboards"),
|
|
276
|
-
description:
|
|
315
|
+
description: z.message,
|
|
277
316
|
"data-testid": "dashboards-error",
|
|
278
317
|
actions: /* @__PURE__ */ T(x, {
|
|
279
318
|
size: "sm",
|
|
280
|
-
onClick: () =>
|
|
319
|
+
onClick: () => V(),
|
|
281
320
|
children: y("bigconsole.dashboards.error.retry", "Retry")
|
|
282
321
|
})
|
|
283
322
|
})
|
|
284
323
|
})]
|
|
285
324
|
});
|
|
286
|
-
let
|
|
325
|
+
let pt = J.length;
|
|
287
326
|
return /* @__PURE__ */ E("div", {
|
|
288
327
|
"data-tour": "bigconsole-dashboards-list",
|
|
289
328
|
style: {
|
|
@@ -291,14 +330,14 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
291
330
|
backgroundColor: "var(--color-bg-canvas)"
|
|
292
331
|
},
|
|
293
332
|
children: [
|
|
294
|
-
|
|
333
|
+
ft,
|
|
295
334
|
/* @__PURE__ */ T("div", {
|
|
296
335
|
style: { padding: "var(--space-pagePadding)" },
|
|
297
336
|
children: /* @__PURE__ */ E(r, { children: [/* @__PURE__ */ T(n, {
|
|
298
337
|
emphasis: "muted",
|
|
299
338
|
padding: "compact",
|
|
300
339
|
"aria-label": y("bigconsole.dashboards.about", "About dashboards"),
|
|
301
|
-
children: /* @__PURE__ */ T(
|
|
340
|
+
children: /* @__PURE__ */ T(je, {
|
|
302
341
|
className: "max-w-[80ch]",
|
|
303
342
|
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."
|
|
304
343
|
})
|
|
@@ -310,8 +349,8 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
310
349
|
description: y("bigconsole.dashboards.results.description", "Open a board to view it, or use the card actions to edit, duplicate or delete."),
|
|
311
350
|
meta: /* @__PURE__ */ T(b, {
|
|
312
351
|
variant: "secondary",
|
|
313
|
-
"aria-label": y("bigconsole.dashboards.results.count", `${
|
|
314
|
-
children:
|
|
352
|
+
"aria-label": y("bigconsole.dashboards.results.count", `${pt} dashboards`),
|
|
353
|
+
children: pt
|
|
315
354
|
}),
|
|
316
355
|
actions: /* @__PURE__ */ E("div", {
|
|
317
356
|
role: "group",
|
|
@@ -325,11 +364,11 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
325
364
|
backgroundColor: "var(--color-bg-sunken)"
|
|
326
365
|
},
|
|
327
366
|
children: [/* @__PURE__ */ T(x, {
|
|
328
|
-
variant:
|
|
367
|
+
variant: L === "grid" ? "default" : "ghost",
|
|
329
368
|
size: "sm",
|
|
330
|
-
onClick: () =>
|
|
369
|
+
onClick: () => He("grid"),
|
|
331
370
|
"aria-label": y("bigconsole.dashboards.view.grid", "Grid view"),
|
|
332
|
-
"aria-pressed":
|
|
371
|
+
"aria-pressed": L === "grid",
|
|
333
372
|
title: y("bigconsole.dashboards.view.grid", "Grid view"),
|
|
334
373
|
style: {
|
|
335
374
|
height: "var(--size-controlHeight-md)",
|
|
@@ -337,16 +376,16 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
337
376
|
padding: 0,
|
|
338
377
|
borderRadius: "var(--radius-button)"
|
|
339
378
|
},
|
|
340
|
-
children: /* @__PURE__ */ T(
|
|
379
|
+
children: /* @__PURE__ */ T(ye, { style: {
|
|
341
380
|
height: "var(--size-icon-sm)",
|
|
342
381
|
width: "var(--size-icon-sm)"
|
|
343
382
|
} })
|
|
344
383
|
}), /* @__PURE__ */ T(x, {
|
|
345
|
-
variant:
|
|
384
|
+
variant: L === "list" ? "default" : "ghost",
|
|
346
385
|
size: "sm",
|
|
347
|
-
onClick: () =>
|
|
386
|
+
onClick: () => He("list"),
|
|
348
387
|
"aria-label": y("bigconsole.dashboards.view.list", "List view"),
|
|
349
|
-
"aria-pressed":
|
|
388
|
+
"aria-pressed": L === "list",
|
|
350
389
|
title: y("bigconsole.dashboards.view.list", "List view"),
|
|
351
390
|
style: {
|
|
352
391
|
height: "var(--size-controlHeight-md)",
|
|
@@ -354,7 +393,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
354
393
|
padding: 0,
|
|
355
394
|
borderRadius: "var(--radius-button)"
|
|
356
395
|
},
|
|
357
|
-
children: /* @__PURE__ */ T(
|
|
396
|
+
children: /* @__PURE__ */ T(be, { style: {
|
|
358
397
|
height: "var(--size-icon-sm)",
|
|
359
398
|
width: "var(--size-icon-sm)"
|
|
360
399
|
} })
|
|
@@ -368,7 +407,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
368
407
|
width: "100%",
|
|
369
408
|
maxWidth: "420px"
|
|
370
409
|
},
|
|
371
|
-
children: [/* @__PURE__ */ T(
|
|
410
|
+
children: [/* @__PURE__ */ T(Ce, {
|
|
372
411
|
"aria-hidden": "true",
|
|
373
412
|
style: {
|
|
374
413
|
position: "absolute",
|
|
@@ -379,7 +418,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
379
418
|
width: "var(--size-icon-sm)",
|
|
380
419
|
color: "var(--color-text-muted)"
|
|
381
420
|
}
|
|
382
|
-
}), /* @__PURE__ */ T(
|
|
421
|
+
}), /* @__PURE__ */ T(Ae, {
|
|
383
422
|
type: "search",
|
|
384
423
|
"aria-label": y("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
|
|
385
424
|
placeholder: y("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
|
|
@@ -393,33 +432,42 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
393
432
|
}),
|
|
394
433
|
/* @__PURE__ */ E("div", {
|
|
395
434
|
className: "flex flex-wrap gap-control-gap",
|
|
396
|
-
children: [
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
children:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
435
|
+
children: [
|
|
436
|
+
/* @__PURE__ */ E("select", {
|
|
437
|
+
"aria-label": y("bigconsole.dashboards.filters.category", "Category"),
|
|
438
|
+
value: k,
|
|
439
|
+
onChange: (e) => A(e.target.value),
|
|
440
|
+
className: "min-w-0 max-w-full rounded-button border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary",
|
|
441
|
+
children: [/* @__PURE__ */ T("option", {
|
|
442
|
+
value: "",
|
|
443
|
+
children: y("bigconsole.dashboards.filters.allCategories", "All categories")
|
|
444
|
+
}), q.map((e) => /* @__PURE__ */ T("option", {
|
|
445
|
+
value: e,
|
|
446
|
+
children: e
|
|
447
|
+
}, e))]
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ E("select", {
|
|
450
|
+
"aria-label": y("bigconsole.dashboards.filters.status", "Status"),
|
|
451
|
+
value: j,
|
|
452
|
+
onChange: (e) => Fe(e.target.value),
|
|
453
|
+
className: "min-w-0 max-w-full rounded-button border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary",
|
|
454
|
+
children: [/* @__PURE__ */ T("option", {
|
|
455
|
+
value: "",
|
|
456
|
+
children: y("bigconsole.dashboards.filters.allStatuses", "All statuses")
|
|
457
|
+
}), $.map((e) => /* @__PURE__ */ T("option", {
|
|
458
|
+
value: e.value,
|
|
459
|
+
children: e.label
|
|
460
|
+
}, e.value))]
|
|
461
|
+
}),
|
|
462
|
+
/* @__PURE__ */ T(i, {
|
|
463
|
+
label: y(ie.label.key, ie.label.en),
|
|
464
|
+
value: M,
|
|
465
|
+
options: lt,
|
|
466
|
+
onChange: Ie
|
|
467
|
+
})
|
|
468
|
+
]
|
|
421
469
|
}),
|
|
422
|
-
|
|
470
|
+
R && B.length === 0 && /* @__PURE__ */ T("div", {
|
|
423
471
|
style: {
|
|
424
472
|
display: "flex",
|
|
425
473
|
alignItems: "center",
|
|
@@ -441,17 +489,17 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
441
489
|
})]
|
|
442
490
|
})
|
|
443
491
|
}),
|
|
444
|
-
!
|
|
492
|
+
!R && L === "grid" && J.length > 0 && /* @__PURE__ */ T("div", {
|
|
445
493
|
style: {
|
|
446
494
|
display: "grid",
|
|
447
495
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(320px, 100%), 1fr))",
|
|
448
496
|
gap: "var(--space-formGap)"
|
|
449
497
|
},
|
|
450
|
-
children:
|
|
451
|
-
onClick: () =>
|
|
498
|
+
children: X.map((e) => /* @__PURE__ */ T(Ee, {
|
|
499
|
+
onClick: () => Z(e.id),
|
|
452
500
|
style: { cursor: "pointer" },
|
|
453
501
|
className: "motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
|
|
454
|
-
children: /* @__PURE__ */ E(
|
|
502
|
+
children: /* @__PURE__ */ E(De, {
|
|
455
503
|
style: { padding: "var(--space-cardPadding)" },
|
|
456
504
|
children: [
|
|
457
505
|
/* @__PURE__ */ E("div", {
|
|
@@ -472,7 +520,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
472
520
|
borderRadius: "var(--radius-button)",
|
|
473
521
|
backgroundColor: "var(--color-bg-accentSubtle)"
|
|
474
522
|
},
|
|
475
|
-
children: /* @__PURE__ */ T(
|
|
523
|
+
children: /* @__PURE__ */ T(v, {
|
|
476
524
|
"aria-hidden": "true",
|
|
477
525
|
style: {
|
|
478
526
|
height: "var(--size-icon-md)",
|
|
@@ -499,7 +547,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
499
547
|
type: "button",
|
|
500
548
|
className: "max-w-full truncate text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
501
549
|
onClick: (t) => {
|
|
502
|
-
t.stopPropagation(),
|
|
550
|
+
t.stopPropagation(), Z(e.id);
|
|
503
551
|
},
|
|
504
552
|
children: e.name
|
|
505
553
|
})
|
|
@@ -519,9 +567,9 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
519
567
|
textTransform: "uppercase"
|
|
520
568
|
},
|
|
521
569
|
children: e.category
|
|
522
|
-
}), e.status && /* @__PURE__ */ T(
|
|
570
|
+
}), e.status && /* @__PURE__ */ T(c, {
|
|
523
571
|
status: e.status,
|
|
524
|
-
label:
|
|
572
|
+
label: Q(e.status)
|
|
525
573
|
})]
|
|
526
574
|
})]
|
|
527
575
|
})]
|
|
@@ -558,7 +606,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
558
606
|
gap: "var(--space-iconGap)"
|
|
559
607
|
},
|
|
560
608
|
children: [
|
|
561
|
-
/* @__PURE__ */ T(
|
|
609
|
+
/* @__PURE__ */ T(ve, { style: {
|
|
562
610
|
height: "var(--size-icon-sm)",
|
|
563
611
|
width: "var(--size-icon-sm)",
|
|
564
612
|
color: "var(--color-action-primary-bg)"
|
|
@@ -569,7 +617,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
569
617
|
fontWeight: "var(--font-weight-semibold)",
|
|
570
618
|
color: "var(--color-text-primary)"
|
|
571
619
|
},
|
|
572
|
-
children:
|
|
620
|
+
children: dt(e)
|
|
573
621
|
}),
|
|
574
622
|
/* @__PURE__ */ T("span", {
|
|
575
623
|
style: {
|
|
@@ -592,7 +640,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
592
640
|
gap: "var(--space-iconGap)"
|
|
593
641
|
},
|
|
594
642
|
children: [
|
|
595
|
-
/* @__PURE__ */ T(
|
|
643
|
+
/* @__PURE__ */ T(_e, { style: {
|
|
596
644
|
height: "var(--size-icon-sm)",
|
|
597
645
|
width: "var(--size-icon-sm)",
|
|
598
646
|
color: "var(--color-action-primary-bg)"
|
|
@@ -603,7 +651,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
603
651
|
fontWeight: "var(--font-weight-semibold)",
|
|
604
652
|
color: "var(--color-text-primary)"
|
|
605
653
|
},
|
|
606
|
-
children:
|
|
654
|
+
children: ut(e)
|
|
607
655
|
}),
|
|
608
656
|
/* @__PURE__ */ T("span", {
|
|
609
657
|
style: {
|
|
@@ -632,7 +680,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
632
680
|
alignItems: "center",
|
|
633
681
|
gap: "var(--space-iconGap)"
|
|
634
682
|
},
|
|
635
|
-
children: [/* @__PURE__ */ T(
|
|
683
|
+
children: [/* @__PURE__ */ T(pe, { style: {
|
|
636
684
|
height: "var(--size-icon-sm)",
|
|
637
685
|
width: "var(--size-icon-sm)",
|
|
638
686
|
color: "var(--color-text-muted)"
|
|
@@ -642,7 +690,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
642
690
|
fontWeight: "var(--font-weight-medium)",
|
|
643
691
|
color: "var(--color-text-muted)"
|
|
644
692
|
},
|
|
645
|
-
children:
|
|
693
|
+
children: ct(e.updatedAt)
|
|
646
694
|
})]
|
|
647
695
|
}), /* @__PURE__ */ E("div", {
|
|
648
696
|
style: {
|
|
@@ -651,13 +699,13 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
651
699
|
gap: "var(--space-controlGap)"
|
|
652
700
|
},
|
|
653
701
|
children: [
|
|
654
|
-
/* @__PURE__ */ T(
|
|
655
|
-
permission:
|
|
702
|
+
/* @__PURE__ */ T(_, {
|
|
703
|
+
permission: o.DASHBOARD_UPDATE,
|
|
656
704
|
deniedBehavior: "hide",
|
|
657
705
|
children: /* @__PURE__ */ T(x, {
|
|
658
706
|
variant: "ghost",
|
|
659
707
|
size: "sm",
|
|
660
|
-
onClick: (t) =>
|
|
708
|
+
onClick: (t) => nt(e.id, t),
|
|
661
709
|
style: {
|
|
662
710
|
height: "var(--size-controlHeight-md)",
|
|
663
711
|
width: "var(--size-controlHeight-md)",
|
|
@@ -665,19 +713,19 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
665
713
|
borderRadius: "var(--radius-button)"
|
|
666
714
|
},
|
|
667
715
|
title: y("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
|
|
668
|
-
children: /* @__PURE__ */ T(
|
|
716
|
+
children: /* @__PURE__ */ T(xe, { style: {
|
|
669
717
|
height: "var(--size-icon-sm)",
|
|
670
718
|
width: "var(--size-icon-sm)"
|
|
671
719
|
} })
|
|
672
720
|
})
|
|
673
721
|
}),
|
|
674
|
-
/* @__PURE__ */ T(
|
|
675
|
-
permission:
|
|
722
|
+
/* @__PURE__ */ T(_, {
|
|
723
|
+
permission: o.DASHBOARD_CREATE,
|
|
676
724
|
deniedBehavior: "hide",
|
|
677
725
|
children: /* @__PURE__ */ T(x, {
|
|
678
726
|
variant: "ghost",
|
|
679
727
|
size: "sm",
|
|
680
|
-
onClick: (t) =>
|
|
728
|
+
onClick: (t) => it(e.id, e.name, t),
|
|
681
729
|
style: {
|
|
682
730
|
height: "var(--size-controlHeight-md)",
|
|
683
731
|
width: "var(--size-controlHeight-md)",
|
|
@@ -685,19 +733,19 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
685
733
|
borderRadius: "var(--radius-button)"
|
|
686
734
|
},
|
|
687
735
|
title: y("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
|
|
688
|
-
children: /* @__PURE__ */ T(
|
|
736
|
+
children: /* @__PURE__ */ T(ge, { style: {
|
|
689
737
|
height: "var(--size-icon-sm)",
|
|
690
738
|
width: "var(--size-icon-sm)"
|
|
691
739
|
} })
|
|
692
740
|
})
|
|
693
741
|
}),
|
|
694
|
-
/* @__PURE__ */ T(
|
|
695
|
-
permission:
|
|
742
|
+
/* @__PURE__ */ T(_, {
|
|
743
|
+
permission: o.DASHBOARD_DELETE,
|
|
696
744
|
deniedBehavior: "hide",
|
|
697
745
|
children: /* @__PURE__ */ T(x, {
|
|
698
746
|
variant: "ghost",
|
|
699
747
|
size: "sm",
|
|
700
|
-
onClick: (t) =>
|
|
748
|
+
onClick: (t) => rt(e.id, t),
|
|
701
749
|
style: {
|
|
702
750
|
height: "var(--size-controlHeight-md)",
|
|
703
751
|
width: "var(--size-controlHeight-md)",
|
|
@@ -706,7 +754,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
706
754
|
},
|
|
707
755
|
className: "hover:text-status-error-text hover:bg-status-error-bg/10",
|
|
708
756
|
title: y("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
|
|
709
|
-
children: /* @__PURE__ */ T(
|
|
757
|
+
children: /* @__PURE__ */ T(we, { style: {
|
|
710
758
|
height: "var(--size-icon-sm)",
|
|
711
759
|
width: "var(--size-icon-sm)"
|
|
712
760
|
} })
|
|
@@ -719,17 +767,17 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
719
767
|
})
|
|
720
768
|
}, e.id))
|
|
721
769
|
}),
|
|
722
|
-
!
|
|
770
|
+
!R && L === "list" && J.length > 0 && /* @__PURE__ */ T("div", {
|
|
723
771
|
style: {
|
|
724
772
|
display: "flex",
|
|
725
773
|
flexDirection: "column",
|
|
726
774
|
gap: "var(--space-controlGap)"
|
|
727
775
|
},
|
|
728
|
-
children:
|
|
729
|
-
onClick: () =>
|
|
776
|
+
children: X.map((e) => /* @__PURE__ */ T(Ee, {
|
|
777
|
+
onClick: () => Z(e.id),
|
|
730
778
|
style: { cursor: "pointer" },
|
|
731
779
|
className: "motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
|
|
732
|
-
children: /* @__PURE__ */ T(
|
|
780
|
+
children: /* @__PURE__ */ T(De, {
|
|
733
781
|
style: { padding: "var(--space-cardPadding)" },
|
|
734
782
|
children: /* @__PURE__ */ E("div", {
|
|
735
783
|
style: {
|
|
@@ -750,7 +798,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
750
798
|
borderRadius: "var(--radius-button)",
|
|
751
799
|
backgroundColor: "var(--color-bg-accentSubtle)"
|
|
752
800
|
},
|
|
753
|
-
children: /* @__PURE__ */ T(
|
|
801
|
+
children: /* @__PURE__ */ T(v, {
|
|
754
802
|
"aria-hidden": "true",
|
|
755
803
|
style: {
|
|
756
804
|
height: "var(--size-icon-md)",
|
|
@@ -787,7 +835,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
787
835
|
type: "button",
|
|
788
836
|
className: "max-w-full truncate text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
789
837
|
onClick: (t) => {
|
|
790
|
-
t.stopPropagation(),
|
|
838
|
+
t.stopPropagation(), Z(e.id);
|
|
791
839
|
},
|
|
792
840
|
children: e.name
|
|
793
841
|
})
|
|
@@ -801,9 +849,9 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
801
849
|
},
|
|
802
850
|
children: e.category
|
|
803
851
|
}),
|
|
804
|
-
e.status && /* @__PURE__ */ T(
|
|
852
|
+
e.status && /* @__PURE__ */ T(c, {
|
|
805
853
|
status: e.status,
|
|
806
|
-
label:
|
|
854
|
+
label: Q(e.status)
|
|
807
855
|
})
|
|
808
856
|
]
|
|
809
857
|
}), /* @__PURE__ */ T("p", {
|
|
@@ -834,7 +882,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
834
882
|
gap: "var(--space-iconGap)"
|
|
835
883
|
},
|
|
836
884
|
children: [
|
|
837
|
-
/* @__PURE__ */ T(
|
|
885
|
+
/* @__PURE__ */ T(ve, { style: {
|
|
838
886
|
height: "var(--size-icon-sm)",
|
|
839
887
|
width: "var(--size-icon-sm)",
|
|
840
888
|
color: "var(--color-action-primary-bg)"
|
|
@@ -845,7 +893,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
845
893
|
fontWeight: "var(--font-weight-semibold)",
|
|
846
894
|
color: "var(--color-text-primary)"
|
|
847
895
|
},
|
|
848
|
-
children:
|
|
896
|
+
children: dt(e)
|
|
849
897
|
}),
|
|
850
898
|
/* @__PURE__ */ T("span", {
|
|
851
899
|
style: {
|
|
@@ -863,7 +911,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
863
911
|
gap: "var(--space-iconGap)"
|
|
864
912
|
},
|
|
865
913
|
children: [
|
|
866
|
-
/* @__PURE__ */ T(
|
|
914
|
+
/* @__PURE__ */ T(_e, { style: {
|
|
867
915
|
height: "var(--size-icon-sm)",
|
|
868
916
|
width: "var(--size-icon-sm)",
|
|
869
917
|
color: "var(--color-action-primary-bg)"
|
|
@@ -874,7 +922,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
874
922
|
fontWeight: "var(--font-weight-semibold)",
|
|
875
923
|
color: "var(--color-text-primary)"
|
|
876
924
|
},
|
|
877
|
-
children:
|
|
925
|
+
children: ut(e)
|
|
878
926
|
}),
|
|
879
927
|
/* @__PURE__ */ T("span", {
|
|
880
928
|
style: {
|
|
@@ -891,7 +939,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
891
939
|
alignItems: "center",
|
|
892
940
|
gap: "var(--space-iconGap)"
|
|
893
941
|
},
|
|
894
|
-
children: [/* @__PURE__ */ T(
|
|
942
|
+
children: [/* @__PURE__ */ T(pe, { style: {
|
|
895
943
|
height: "var(--size-icon-sm)",
|
|
896
944
|
width: "var(--size-icon-sm)",
|
|
897
945
|
color: "var(--color-text-muted)"
|
|
@@ -901,7 +949,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
901
949
|
fontWeight: "var(--font-weight-medium)",
|
|
902
950
|
color: "var(--color-text-muted)"
|
|
903
951
|
},
|
|
904
|
-
children:
|
|
952
|
+
children: ct(e.updatedAt)
|
|
905
953
|
})]
|
|
906
954
|
})
|
|
907
955
|
]
|
|
@@ -913,13 +961,13 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
913
961
|
gap: "var(--space-controlGap)"
|
|
914
962
|
},
|
|
915
963
|
children: [
|
|
916
|
-
/* @__PURE__ */ T(
|
|
917
|
-
permission:
|
|
964
|
+
/* @__PURE__ */ T(_, {
|
|
965
|
+
permission: o.DASHBOARD_UPDATE,
|
|
918
966
|
deniedBehavior: "hide",
|
|
919
967
|
children: /* @__PURE__ */ T(x, {
|
|
920
968
|
variant: "ghost",
|
|
921
969
|
size: "sm",
|
|
922
|
-
onClick: (t) =>
|
|
970
|
+
onClick: (t) => nt(e.id, t),
|
|
923
971
|
style: {
|
|
924
972
|
height: "var(--size-controlHeight-md)",
|
|
925
973
|
width: "var(--size-controlHeight-md)",
|
|
@@ -927,19 +975,19 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
927
975
|
borderRadius: "var(--radius-button)"
|
|
928
976
|
},
|
|
929
977
|
title: y("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
|
|
930
|
-
children: /* @__PURE__ */ T(
|
|
978
|
+
children: /* @__PURE__ */ T(xe, { style: {
|
|
931
979
|
height: "var(--size-icon-sm)",
|
|
932
980
|
width: "var(--size-icon-sm)"
|
|
933
981
|
} })
|
|
934
982
|
})
|
|
935
983
|
}),
|
|
936
|
-
/* @__PURE__ */ T(
|
|
937
|
-
permission:
|
|
984
|
+
/* @__PURE__ */ T(_, {
|
|
985
|
+
permission: o.DASHBOARD_CREATE,
|
|
938
986
|
deniedBehavior: "hide",
|
|
939
987
|
children: /* @__PURE__ */ T(x, {
|
|
940
988
|
variant: "ghost",
|
|
941
989
|
size: "sm",
|
|
942
|
-
onClick: (t) =>
|
|
990
|
+
onClick: (t) => it(e.id, e.name, t),
|
|
943
991
|
style: {
|
|
944
992
|
height: "var(--size-controlHeight-md)",
|
|
945
993
|
width: "var(--size-controlHeight-md)",
|
|
@@ -947,19 +995,19 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
947
995
|
borderRadius: "var(--radius-button)"
|
|
948
996
|
},
|
|
949
997
|
title: y("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
|
|
950
|
-
children: /* @__PURE__ */ T(
|
|
998
|
+
children: /* @__PURE__ */ T(ge, { style: {
|
|
951
999
|
height: "var(--size-icon-sm)",
|
|
952
1000
|
width: "var(--size-icon-sm)"
|
|
953
1001
|
} })
|
|
954
1002
|
})
|
|
955
1003
|
}),
|
|
956
|
-
/* @__PURE__ */ T(
|
|
957
|
-
permission:
|
|
1004
|
+
/* @__PURE__ */ T(_, {
|
|
1005
|
+
permission: o.DASHBOARD_DELETE,
|
|
958
1006
|
deniedBehavior: "hide",
|
|
959
1007
|
children: /* @__PURE__ */ T(x, {
|
|
960
1008
|
variant: "ghost",
|
|
961
1009
|
size: "sm",
|
|
962
|
-
onClick: (t) =>
|
|
1010
|
+
onClick: (t) => rt(e.id, t),
|
|
963
1011
|
style: {
|
|
964
1012
|
height: "var(--size-controlHeight-md)",
|
|
965
1013
|
width: "var(--size-controlHeight-md)",
|
|
@@ -968,7 +1016,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
968
1016
|
},
|
|
969
1017
|
className: "hover:text-status-error-text hover:bg-status-error-bg/10",
|
|
970
1018
|
title: y("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
|
|
971
|
-
children: /* @__PURE__ */ T(
|
|
1019
|
+
children: /* @__PURE__ */ T(we, { style: {
|
|
972
1020
|
height: "var(--size-icon-sm)",
|
|
973
1021
|
width: "var(--size-icon-sm)"
|
|
974
1022
|
} })
|
|
@@ -981,7 +1029,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
981
1029
|
})
|
|
982
1030
|
}, e.id))
|
|
983
1031
|
}),
|
|
984
|
-
!
|
|
1032
|
+
!R && J.length > 0 && /* @__PURE__ */ T("p", {
|
|
985
1033
|
"data-testid": "dashboards-range",
|
|
986
1034
|
style: {
|
|
987
1035
|
margin: 0,
|
|
@@ -989,23 +1037,23 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
989
1037
|
color: "var(--color-text-muted)"
|
|
990
1038
|
},
|
|
991
1039
|
children: y("bigconsole.dashboards.pagination.range", "Showing {{from}}–{{to}} of {{total}} dashboards", {
|
|
992
|
-
from:
|
|
993
|
-
to:
|
|
1040
|
+
from: Je + 1,
|
|
1041
|
+
to: Je + X.length,
|
|
994
1042
|
total: J.length
|
|
995
1043
|
})
|
|
996
1044
|
}),
|
|
997
|
-
!
|
|
1045
|
+
!R && J.length > O && /* @__PURE__ */ E("nav", {
|
|
998
1046
|
"aria-label": y("bigconsole.dashboards.pagination.label", "Dashboard pages"),
|
|
999
1047
|
className: "flex flex-wrap items-center justify-center gap-control-gap border-t border-[var(--color-border-subtle)] pt-control-gap",
|
|
1000
1048
|
children: [
|
|
1001
1049
|
/* @__PURE__ */ E(x, {
|
|
1002
1050
|
variant: "outline",
|
|
1003
1051
|
size: "sm",
|
|
1004
|
-
onClick:
|
|
1005
|
-
disabled:
|
|
1052
|
+
onClick: Ye,
|
|
1053
|
+
disabled: N <= 1,
|
|
1006
1054
|
"aria-label": y("bigconsole.dashboards.pagination.previous", "Previous"),
|
|
1007
1055
|
style: { minHeight: "var(--size-controlHeight-md)" },
|
|
1008
|
-
children: [/* @__PURE__ */ T(
|
|
1056
|
+
children: [/* @__PURE__ */ T(me, { style: {
|
|
1009
1057
|
marginRight: "var(--space-iconGap)",
|
|
1010
1058
|
height: "var(--size-icon-sm)",
|
|
1011
1059
|
width: "var(--size-icon-sm)"
|
|
@@ -1018,7 +1066,7 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
1018
1066
|
gap: "var(--space-iconGap)",
|
|
1019
1067
|
flexWrap: "wrap"
|
|
1020
1068
|
},
|
|
1021
|
-
children:
|
|
1069
|
+
children: Ne(N, Y).map((e, t) => e === null ? /* @__PURE__ */ T("span", {
|
|
1022
1070
|
"aria-hidden": "true",
|
|
1023
1071
|
style: {
|
|
1024
1072
|
color: "var(--color-text-muted)",
|
|
@@ -1026,10 +1074,10 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
1026
1074
|
},
|
|
1027
1075
|
children: "…"
|
|
1028
1076
|
}, `gap-${t}`) : /* @__PURE__ */ T(x, {
|
|
1029
|
-
variant: e ===
|
|
1077
|
+
variant: e === N ? "default" : "ghost",
|
|
1030
1078
|
size: "sm",
|
|
1031
|
-
onClick: () =>
|
|
1032
|
-
"aria-current": e ===
|
|
1079
|
+
onClick: () => Ze(e),
|
|
1080
|
+
"aria-current": e === N ? "page" : void 0,
|
|
1033
1081
|
"aria-label": y("bigconsole.dashboards.pagination.page", `Page ${e}`),
|
|
1034
1082
|
style: {
|
|
1035
1083
|
minWidth: "var(--size-controlHeight-md)",
|
|
@@ -1043,11 +1091,11 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
1043
1091
|
/* @__PURE__ */ E(x, {
|
|
1044
1092
|
variant: "outline",
|
|
1045
1093
|
size: "sm",
|
|
1046
|
-
onClick:
|
|
1047
|
-
disabled:
|
|
1094
|
+
onClick: Xe,
|
|
1095
|
+
disabled: N >= Y,
|
|
1048
1096
|
"aria-label": y("bigconsole.dashboards.pagination.next", "Next"),
|
|
1049
1097
|
style: { minHeight: "var(--size-controlHeight-md)" },
|
|
1050
|
-
children: [y("bigconsole.dashboards.pagination.next", "Next"), /* @__PURE__ */ T(
|
|
1098
|
+
children: [y("bigconsole.dashboards.pagination.next", "Next"), /* @__PURE__ */ T(he, { style: {
|
|
1051
1099
|
marginLeft: "var(--space-iconGap)",
|
|
1052
1100
|
height: "var(--size-icon-sm)",
|
|
1053
1101
|
width: "var(--size-icon-sm)"
|
|
@@ -1059,16 +1107,16 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
1059
1107
|
color: "var(--color-text-muted)"
|
|
1060
1108
|
},
|
|
1061
1109
|
children: y("bigconsole.dashboards.pagination.pageOf", "Page {{currentPage}} of {{totalPages}}", {
|
|
1062
|
-
currentPage:
|
|
1110
|
+
currentPage: N,
|
|
1063
1111
|
totalPages: Y
|
|
1064
1112
|
})
|
|
1065
1113
|
})
|
|
1066
1114
|
]
|
|
1067
1115
|
}),
|
|
1068
|
-
!
|
|
1116
|
+
!R && J.length === 0 && /* @__PURE__ */ T(Oe, {
|
|
1069
1117
|
treatment: "insight",
|
|
1070
1118
|
className: "border-[var(--color-border-seam)]",
|
|
1071
|
-
children: /* @__PURE__ */ T(
|
|
1119
|
+
children: /* @__PURE__ */ T(ke, {
|
|
1072
1120
|
illustration: S ? "empty-search" : "empty-data",
|
|
1073
1121
|
title: S ? y("bigconsole.dashboards.empty.filteredTitle", "No dashboards found") : y("bigconsole.dashboards.empty.title", "No dashboards yet"),
|
|
1074
1122
|
description: S ? y("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : y("bigconsole.dashboards.empty.description", "Get started by creating your first dashboard to visualize your data"),
|
|
@@ -1079,24 +1127,24 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
1079
1127
|
flexWrap: "wrap",
|
|
1080
1128
|
justifyContent: "center"
|
|
1081
1129
|
},
|
|
1082
|
-
children: [/* @__PURE__ */ T(
|
|
1083
|
-
permission:
|
|
1130
|
+
children: [/* @__PURE__ */ T(_, {
|
|
1131
|
+
permission: o.DASHBOARD_CREATE,
|
|
1084
1132
|
deniedBehavior: "hide",
|
|
1085
1133
|
children: /* @__PURE__ */ E(x, {
|
|
1086
|
-
onClick:
|
|
1087
|
-
children: [/* @__PURE__ */ T(
|
|
1134
|
+
onClick: Qe,
|
|
1135
|
+
children: [/* @__PURE__ */ T(Se, { style: {
|
|
1088
1136
|
marginRight: "var(--space-iconGap)",
|
|
1089
1137
|
height: "var(--size-icon-sm)",
|
|
1090
1138
|
width: "var(--size-icon-sm)"
|
|
1091
1139
|
} }), y("bigconsole.dashboards.actions.create", "Create Dashboard")]
|
|
1092
1140
|
})
|
|
1093
|
-
}), /* @__PURE__ */ T(
|
|
1094
|
-
permission:
|
|
1141
|
+
}), /* @__PURE__ */ T(_, {
|
|
1142
|
+
permission: o.DASHBOARD_IMPORT,
|
|
1095
1143
|
deniedBehavior: "hide",
|
|
1096
1144
|
children: /* @__PURE__ */ E(x, {
|
|
1097
1145
|
variant: "outline",
|
|
1098
|
-
onClick:
|
|
1099
|
-
children: [/* @__PURE__ */ T(
|
|
1146
|
+
onClick: at,
|
|
1147
|
+
children: [/* @__PURE__ */ T(Te, { style: {
|
|
1100
1148
|
marginRight: "var(--space-iconGap)",
|
|
1101
1149
|
height: "var(--size-icon-sm)",
|
|
1102
1150
|
width: "var(--size-icon-sm)"
|
|
@@ -1110,16 +1158,16 @@ var De = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, onC
|
|
|
1110
1158
|
})] })
|
|
1111
1159
|
}),
|
|
1112
1160
|
/* @__PURE__ */ T(ee, {
|
|
1113
|
-
isOpen:
|
|
1114
|
-
isCreating:
|
|
1115
|
-
onClose:
|
|
1116
|
-
onCreate:
|
|
1117
|
-
onTemplateInstalled:
|
|
1161
|
+
isOpen: Le,
|
|
1162
|
+
isCreating: I,
|
|
1163
|
+
onClose: et,
|
|
1164
|
+
onCreate: tt,
|
|
1165
|
+
onTemplateInstalled: $e
|
|
1118
1166
|
}),
|
|
1119
|
-
/* @__PURE__ */ T(
|
|
1120
|
-
isOpen:
|
|
1121
|
-
onClose:
|
|
1122
|
-
onSuccess:
|
|
1167
|
+
/* @__PURE__ */ T(re, {
|
|
1168
|
+
isOpen: ze,
|
|
1169
|
+
onClose: ot,
|
|
1170
|
+
onSuccess: st
|
|
1123
1171
|
})
|
|
1124
1172
|
]
|
|
1125
1173
|
});
|