@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.6
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/AiPreviewContent.js +0 -1
- 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
|
@@ -7,67 +7,69 @@ import { Section as i } from "../components/common/Section.js";
|
|
|
7
7
|
import "../components/common/index.js";
|
|
8
8
|
import ee from "../hooks/useWidgetOperations.js";
|
|
9
9
|
import te from "../hooks/useDashboardOperations.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import ne from "../hooks/useActivePage.js";
|
|
11
|
+
import re, { parseUrlToGlobalFilterValues as ie } from "../hooks/useFilterUrlSync.js";
|
|
12
|
+
import ae from "../hooks/usePageOperations.js";
|
|
13
13
|
import "../hooks/index.js";
|
|
14
|
-
import { BIGCONSOLE_PERMISSIONS as
|
|
15
|
-
import { loadBigConsoleSettings as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
14
|
+
import { BIGCONSOLE_PERMISSIONS as a } from "../../constants/permissions.js";
|
|
15
|
+
import { loadBigConsoleSettings as oe } from "../hooks/useBigConsoleSettings.js";
|
|
16
|
+
import se from "../components/dashboard/DashboardCanvas.js";
|
|
17
|
+
import ce from "../components/dashboard/LiveCanvasToggle.js";
|
|
18
|
+
import le from "../components/dashboard/ExportDashboardDialog.js";
|
|
19
|
+
import ue from "../components/dashboard/DrilldownBreadcrumb.js";
|
|
20
|
+
import de from "../components/dashboard/PublishToStoreDialog.js";
|
|
21
21
|
import "../components/dashboard/index.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { useI18n as
|
|
22
|
+
import { dashboardPageTabs as fe } from "../assistant/pageControls.js";
|
|
23
|
+
import { memo as o, useCallback as s, useEffect as c, useMemo as l, useRef as pe, useState as u } from "react";
|
|
24
|
+
import { useLocation as me, useParams as he } from "react-router";
|
|
25
|
+
import { AccessDenied as ge } from "@burdenoff/fe-libs/shared/components";
|
|
26
|
+
import { usePermissions as _e } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
27
|
+
import { ArrowLeft as ve } from "lucide-react";
|
|
28
|
+
import { Button as d, IllustratedEmptyState as ye } from "@burdenoff/fe-libs/ui";
|
|
29
|
+
import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
30
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
31
|
+
import { useAssistantPageControls as xe } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
30
32
|
//#region src/bigconsole/pages/DashboardViewPage.tsx
|
|
31
|
-
var
|
|
32
|
-
let { dashboardId:
|
|
33
|
-
|
|
34
|
-
if (!
|
|
35
|
-
|
|
33
|
+
var h = o(function() {
|
|
34
|
+
let { dashboardId: o } = he(), h = r(), Se = n(), { t: g } = be(), { hasPermission: _, isLoading: v } = _e(), y = _(a.DASHBOARD_READ), Ce = _(a.DASHBOARD_UPDATE), we = _(a.DASHBOARD_EXPORT), Te = _(a.DASHBOARD_PUBLISH), [Ee, b] = u(!1), [x, S] = u(!1), [De, C] = u(!1), [w, Oe] = u(!1), { isInDrilldown: T, getContextFromUrl: E, getDrilldownMetadata: D } = re(), O = t((e) => e.currentDashboard), k = t((e) => e.setCurrentDashboard), A = t((e) => e.setGlobalFilterValue), j = t((e) => e.clearAllGlobalFilters), M = t((e) => e.setGlobalFilterValues), N = e((e) => e.widgets), ke = me(), { activePageId: P, setActivePage: F } = ne(O?.id === o ? O?.pages : void 0), I = e((e) => e.clipboardWidgetId), L = e((e) => e.clipboardAction), R = e((e) => e.clearClipboard), z = e((e) => e.selectWidget), { loading: B, error: V, fetchDashboard: H, updateDashboard: U } = te(), { createWidget: W, deleteWidget: G, duplicateWidget: K, batchUpdatePositions: q, refetch: Ae } = ee(P || void 0, o), { createPage: J, updatePage: je, deletePage: Me, reorderPages: Ne } = ae();
|
|
35
|
+
c(() => {
|
|
36
|
+
if (!o) {
|
|
37
|
+
h("/dashboards");
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
|
-
return
|
|
39
|
-
e ||
|
|
40
|
+
return M(ie(window.location.search, "filter_")), S(!1), H(o).then((e) => {
|
|
41
|
+
e || S(!0);
|
|
40
42
|
}), () => {
|
|
41
|
-
|
|
43
|
+
k(null), j(), S(!1);
|
|
42
44
|
};
|
|
43
45
|
}, [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
]),
|
|
51
|
-
if (!
|
|
52
|
-
let e =
|
|
46
|
+
o,
|
|
47
|
+
h,
|
|
48
|
+
H,
|
|
49
|
+
k,
|
|
50
|
+
j,
|
|
51
|
+
M
|
|
52
|
+
]), c(() => {
|
|
53
|
+
if (!T) return;
|
|
54
|
+
let e = E(), t = D();
|
|
53
55
|
Object.entries(e).forEach(([e, t]) => {
|
|
54
|
-
|
|
55
|
-
}), t.depth > 0 && (
|
|
56
|
+
A(`ctx_${e}`, t);
|
|
57
|
+
}), t.depth > 0 && (A("__drilldown_depth", t.depth), A("__drilldown_parent", t.parent), A("__drilldown_path", t.path)), Object.keys(e).length > 0 && console.debug("[DashboardViewPage] Loaded drilldown context:", {
|
|
56
58
|
context: e,
|
|
57
59
|
metadata: t
|
|
58
60
|
});
|
|
59
61
|
}, [
|
|
60
|
-
w,
|
|
61
62
|
T,
|
|
62
63
|
E,
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
D,
|
|
65
|
+
A,
|
|
66
|
+
ke.search
|
|
65
67
|
]);
|
|
66
|
-
let
|
|
67
|
-
|
|
68
|
-
if (!
|
|
68
|
+
let Pe = pe(Ae);
|
|
69
|
+
Pe.current = Ae, c(() => {
|
|
70
|
+
if (!w || !o) return;
|
|
69
71
|
let e = () => {
|
|
70
|
-
typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode !== "edit" && (
|
|
72
|
+
typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode !== "edit" && (H(o, { silent: !0 }), Pe.current());
|
|
71
73
|
};
|
|
72
74
|
e();
|
|
73
75
|
let n = window.setInterval(e, 3500), r = () => {
|
|
@@ -77,60 +79,85 @@ var g = c(function() {
|
|
|
77
79
|
window.clearInterval(n), document.removeEventListener("visibilitychange", r);
|
|
78
80
|
};
|
|
79
81
|
}, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
w,
|
|
83
|
+
o,
|
|
84
|
+
H
|
|
83
85
|
]);
|
|
84
|
-
let
|
|
85
|
-
if (
|
|
86
|
+
let Fe = s(async () => {
|
|
87
|
+
if (o) {
|
|
86
88
|
b(!0);
|
|
87
89
|
try {
|
|
88
|
-
let e = Array.from(
|
|
89
|
-
e.length > 0 && await
|
|
90
|
+
let e = Array.from(N.values());
|
|
91
|
+
e.length > 0 && await q(e.map((e) => ({
|
|
90
92
|
id: e.id,
|
|
91
93
|
position: e.position
|
|
92
|
-
}))),
|
|
93
|
-
id:
|
|
94
|
-
name:
|
|
95
|
-
description:
|
|
94
|
+
}))), O && await U({
|
|
95
|
+
id: o,
|
|
96
|
+
name: O.name,
|
|
97
|
+
description: O.description
|
|
96
98
|
});
|
|
97
99
|
} catch {} finally {
|
|
98
100
|
b(!1);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
}, [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
]),
|
|
108
|
-
|
|
109
|
-
}, [
|
|
110
|
-
|
|
111
|
-
}, [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
o,
|
|
105
|
+
N,
|
|
106
|
+
O,
|
|
107
|
+
q,
|
|
108
|
+
U
|
|
109
|
+
]), Ie = s(() => {
|
|
110
|
+
h("/dashboards");
|
|
111
|
+
}, [h]), Y = s((e) => {
|
|
112
|
+
F(e);
|
|
113
|
+
}, [F]), X = l(() => (O?.pages || []).map((e, t) => ({
|
|
114
|
+
id: e.id,
|
|
115
|
+
name: e.name || g("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
|
|
116
|
+
order: e.order ?? 0
|
|
117
|
+
})), [O?.pages, g]), Z = O && O.id === o ? O.name : null, Q = P || O?.pages?.[0]?.id || null;
|
|
118
|
+
xe(l(() => !v && y && !V && !x && !B && Z !== null ? fe({
|
|
119
|
+
dashboardName: Z || g("bigconsole.dashboards.title", "Dashboards"),
|
|
120
|
+
tabs: X.map((e) => ({
|
|
121
|
+
id: e.id,
|
|
122
|
+
label: e.name
|
|
123
|
+
})),
|
|
124
|
+
current: Q,
|
|
125
|
+
select: Y
|
|
126
|
+
}) : null, [
|
|
127
|
+
v,
|
|
128
|
+
y,
|
|
129
|
+
V,
|
|
130
|
+
x,
|
|
131
|
+
B,
|
|
132
|
+
Z,
|
|
133
|
+
X,
|
|
134
|
+
Q,
|
|
135
|
+
Y,
|
|
136
|
+
g
|
|
137
|
+
]));
|
|
138
|
+
let Le = s(async () => {
|
|
139
|
+
let e = P || O?.pages?.[0]?.id;
|
|
140
|
+
if (!I || !o || !e) return;
|
|
141
|
+
let t = N.get(I);
|
|
115
142
|
if (!t) {
|
|
116
|
-
|
|
143
|
+
R();
|
|
117
144
|
return;
|
|
118
145
|
}
|
|
119
146
|
let n = {
|
|
120
147
|
x: 0,
|
|
121
|
-
y: Array.from(
|
|
148
|
+
y: Array.from(N.values()).reduce((e, t) => {
|
|
122
149
|
let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
|
|
123
150
|
return Math.max(e, n);
|
|
124
151
|
}, 0),
|
|
125
|
-
width: Math.min(t.positionWidth ?? 4,
|
|
152
|
+
width: Math.min(t.positionWidth ?? 4, O?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
|
|
126
153
|
height: t.positionHeight ?? 4
|
|
127
|
-
}, r =
|
|
154
|
+
}, r = L === "copy" ? g("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
|
|
128
155
|
try {
|
|
129
|
-
i = await
|
|
156
|
+
i = await K(I, n, r);
|
|
130
157
|
} catch {}
|
|
131
|
-
i ||= await
|
|
158
|
+
i ||= await W({
|
|
132
159
|
pageId: e,
|
|
133
|
-
dashboardId:
|
|
160
|
+
dashboardId: o,
|
|
134
161
|
type: t.type,
|
|
135
162
|
title: r,
|
|
136
163
|
description: t.description,
|
|
@@ -142,253 +169,249 @@ var g = c(function() {
|
|
|
142
169
|
position: n,
|
|
143
170
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
144
171
|
metadata: t.metadata
|
|
145
|
-
}), i && (
|
|
172
|
+
}), i && (z(i.id), L === "cut" && await G(I)), R();
|
|
146
173
|
}, [
|
|
147
|
-
F,
|
|
148
174
|
I,
|
|
149
|
-
|
|
175
|
+
L,
|
|
176
|
+
o,
|
|
177
|
+
P,
|
|
178
|
+
O,
|
|
150
179
|
N,
|
|
151
|
-
|
|
152
|
-
M,
|
|
153
|
-
G,
|
|
154
|
-
U,
|
|
180
|
+
K,
|
|
155
181
|
W,
|
|
182
|
+
G,
|
|
183
|
+
z,
|
|
156
184
|
R,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}, []), [Ne, $] = d(!1), Pe = l(() => {
|
|
185
|
+
g
|
|
186
|
+
]), Re = s(() => {
|
|
187
|
+
C(!0);
|
|
188
|
+
}, []), [ze, $] = u(!1), Be = s(() => {
|
|
162
189
|
$(!0);
|
|
163
|
-
}, []),
|
|
190
|
+
}, []), Ve = s(() => {
|
|
164
191
|
$(!1);
|
|
165
|
-
}, []),
|
|
166
|
-
|
|
167
|
-
}, []),
|
|
168
|
-
if (!
|
|
192
|
+
}, []), He = s(() => {
|
|
193
|
+
C(!1);
|
|
194
|
+
}, []), Ue = s(async () => {
|
|
195
|
+
if (!O || !o) return;
|
|
169
196
|
let e = await J({
|
|
170
|
-
dashboardId:
|
|
171
|
-
name:
|
|
172
|
-
gridColumns:
|
|
197
|
+
dashboardId: o,
|
|
198
|
+
name: g("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: (O.pages?.length || 0) + 1 }),
|
|
199
|
+
gridColumns: oe().defaultGridColumns
|
|
173
200
|
});
|
|
174
|
-
e && (
|
|
175
|
-
...
|
|
176
|
-
pages: [...
|
|
177
|
-
}),
|
|
201
|
+
e && (k({
|
|
202
|
+
...O,
|
|
203
|
+
pages: [...O.pages || [], e]
|
|
204
|
+
}), F(e.id));
|
|
178
205
|
}, [
|
|
179
|
-
D,
|
|
180
|
-
c,
|
|
181
206
|
O,
|
|
207
|
+
o,
|
|
208
|
+
k,
|
|
182
209
|
J,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]),
|
|
186
|
-
|
|
210
|
+
F,
|
|
211
|
+
g
|
|
212
|
+
]), We = s(async (e, t) => {
|
|
213
|
+
O && await je({
|
|
187
214
|
id: e,
|
|
188
215
|
name: t
|
|
189
|
-
}) &&
|
|
190
|
-
...
|
|
191
|
-
pages:
|
|
216
|
+
}) && k({
|
|
217
|
+
...O,
|
|
218
|
+
pages: O.pages?.map((n) => n.id === e ? {
|
|
192
219
|
...n,
|
|
193
220
|
name: t
|
|
194
221
|
} : n)
|
|
195
222
|
});
|
|
196
223
|
}, [
|
|
197
|
-
D,
|
|
198
224
|
O,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
225
|
+
k,
|
|
226
|
+
je
|
|
227
|
+
]), Ge = s(async (e) => {
|
|
228
|
+
if (!O || !o) return;
|
|
229
|
+
let t = O.pages?.find((t) => t.id === e);
|
|
203
230
|
if (!t) return;
|
|
204
231
|
let n = await J({
|
|
205
|
-
dashboardId:
|
|
232
|
+
dashboardId: o,
|
|
206
233
|
gridColumns: t.gridColumns,
|
|
207
|
-
name:
|
|
234
|
+
name: g("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" })
|
|
208
235
|
});
|
|
209
|
-
n && (
|
|
210
|
-
...
|
|
211
|
-
pages: [...
|
|
212
|
-
}),
|
|
236
|
+
n && (k({
|
|
237
|
+
...O,
|
|
238
|
+
pages: [...O.pages || [], n]
|
|
239
|
+
}), F(n.id));
|
|
213
240
|
}, [
|
|
214
|
-
D,
|
|
215
|
-
c,
|
|
216
241
|
O,
|
|
242
|
+
o,
|
|
243
|
+
k,
|
|
217
244
|
J,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
]),
|
|
221
|
-
if (!(!
|
|
222
|
-
let t =
|
|
245
|
+
F,
|
|
246
|
+
g
|
|
247
|
+
]), Ke = s(async (e) => {
|
|
248
|
+
if (!(!O || (O.pages?.length || 0) <= 1) && await Me(e)) {
|
|
249
|
+
let t = O.pages?.filter((t) => t.id !== e).map((e, t) => ({
|
|
223
250
|
...e,
|
|
224
251
|
order: t
|
|
225
252
|
}));
|
|
226
|
-
|
|
227
|
-
...
|
|
253
|
+
k({
|
|
254
|
+
...O,
|
|
228
255
|
pages: t
|
|
229
256
|
});
|
|
230
257
|
let n = t?.[0]?.id;
|
|
231
|
-
|
|
258
|
+
P === e && n && F(n, { replace: !0 });
|
|
232
259
|
}
|
|
233
260
|
}, [
|
|
234
|
-
D,
|
|
235
261
|
O,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
262
|
+
k,
|
|
263
|
+
P,
|
|
264
|
+
Me,
|
|
265
|
+
F
|
|
266
|
+
]), qe = s(async (e) => {
|
|
267
|
+
!O || !o || (k({
|
|
268
|
+
...O,
|
|
242
269
|
pages: e.map((e, t) => ({
|
|
243
270
|
...e,
|
|
244
271
|
order: t
|
|
245
272
|
}))
|
|
246
|
-
}), await
|
|
273
|
+
}), await Ne(o, e.map((e) => e.id)));
|
|
247
274
|
}, [
|
|
248
|
-
D,
|
|
249
|
-
c,
|
|
250
275
|
O,
|
|
251
|
-
|
|
276
|
+
o,
|
|
277
|
+
k,
|
|
278
|
+
Ne
|
|
252
279
|
]);
|
|
253
|
-
return
|
|
280
|
+
return v ? /* @__PURE__ */ p("div", {
|
|
254
281
|
className: "flex items-center justify-center h-full",
|
|
255
|
-
children: /* @__PURE__ */
|
|
256
|
-
}) :
|
|
282
|
+
children: /* @__PURE__ */ p("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
283
|
+
}) : y ? V ? /* @__PURE__ */ p("div", {
|
|
257
284
|
className: "flex h-full flex-col items-center justify-center",
|
|
258
285
|
style: { padding: "var(--space-pagePadding)" },
|
|
259
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ p(i, {
|
|
260
287
|
headingLevel: 2,
|
|
261
288
|
tone: "danger",
|
|
262
|
-
title:
|
|
263
|
-
description: /* @__PURE__ */
|
|
289
|
+
title: g("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
290
|
+
description: /* @__PURE__ */ p("span", {
|
|
264
291
|
className: "break-words",
|
|
265
|
-
children:
|
|
292
|
+
children: V.message
|
|
266
293
|
}),
|
|
267
294
|
className: "w-full max-w-md",
|
|
268
295
|
"data-testid": "dashboard-view-error",
|
|
269
|
-
actions: /* @__PURE__ */
|
|
296
|
+
actions: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
|
|
270
297
|
size: "sm",
|
|
271
|
-
onClick: () =>
|
|
272
|
-
children:
|
|
273
|
-
}), /* @__PURE__ */
|
|
298
|
+
onClick: () => H(o),
|
|
299
|
+
children: g("bigconsole.dashboards.view.retry", "Retry")
|
|
300
|
+
}), /* @__PURE__ */ p(d, {
|
|
274
301
|
size: "sm",
|
|
275
302
|
variant: "outline",
|
|
276
|
-
onClick: () =>
|
|
277
|
-
children:
|
|
303
|
+
onClick: () => h("/dashboards"),
|
|
304
|
+
children: g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
278
305
|
})] })
|
|
279
306
|
})
|
|
280
|
-
}) :
|
|
307
|
+
}) : x ? /* @__PURE__ */ p("div", {
|
|
281
308
|
className: "flex flex-col items-center justify-center h-full",
|
|
282
309
|
style: { padding: "var(--space-pagePadding)" },
|
|
283
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ p(ye, {
|
|
284
311
|
illustration: "empty-data",
|
|
285
|
-
title:
|
|
286
|
-
description: /* @__PURE__ */
|
|
312
|
+
title: g("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
|
|
313
|
+
description: /* @__PURE__ */ m(f, { children: [g("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ p("span", {
|
|
287
314
|
className: "mt-2 block font-mono text-xs text-text-muted break-all",
|
|
288
|
-
children:
|
|
315
|
+
children: g("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: o ?? "" })
|
|
289
316
|
})] }),
|
|
290
|
-
action: /* @__PURE__ */
|
|
291
|
-
onClick: () =>
|
|
292
|
-
children:
|
|
317
|
+
action: /* @__PURE__ */ p(d, {
|
|
318
|
+
onClick: () => h("/dashboards"),
|
|
319
|
+
children: g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
293
320
|
})
|
|
294
321
|
})
|
|
295
|
-
}) :
|
|
322
|
+
}) : B || !O ? /* @__PURE__ */ p("div", {
|
|
296
323
|
className: "flex items-center justify-center h-full",
|
|
297
324
|
role: "status",
|
|
298
325
|
"aria-live": "polite",
|
|
299
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ m("div", {
|
|
300
327
|
className: "flex flex-col items-center gap-4",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ p("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ p("p", {
|
|
302
329
|
className: "text-sm text-text-secondary",
|
|
303
|
-
children:
|
|
330
|
+
children: g("bigconsole.dashboards.view.loading", "Loading dashboard...")
|
|
304
331
|
})]
|
|
305
332
|
})
|
|
306
|
-
}) : /* @__PURE__ */
|
|
333
|
+
}) : /* @__PURE__ */ m("div", {
|
|
307
334
|
className: "h-full flex flex-col overflow-hidden",
|
|
308
335
|
children: [
|
|
309
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ p(i, {
|
|
310
337
|
emphasis: "bare",
|
|
311
338
|
padding: "none",
|
|
312
339
|
"data-testid": "dashboard-route-header",
|
|
313
340
|
"aria-label": "Dashboard",
|
|
314
341
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
315
342
|
headerClassName: "",
|
|
316
|
-
header: /* @__PURE__ */
|
|
343
|
+
header: /* @__PURE__ */ m("div", {
|
|
317
344
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
318
345
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
onClick:
|
|
346
|
+
/* @__PURE__ */ m(d, {
|
|
347
|
+
onClick: Ie,
|
|
321
348
|
variant: "ghost",
|
|
322
349
|
size: "sm",
|
|
323
|
-
title:
|
|
324
|
-
"aria-label":
|
|
350
|
+
title: g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
351
|
+
"aria-label": g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
325
352
|
className: "flex-shrink-0",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ p(ve, { className: "w-4 h-4 mr-2" }), g("bigconsole.dashboards.view.back", "Back")]
|
|
327
354
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ p("h1", {
|
|
329
356
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
330
|
-
title:
|
|
331
|
-
children:
|
|
357
|
+
title: O.name,
|
|
358
|
+
children: O.name
|
|
332
359
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ p("div", {
|
|
334
361
|
className: "flex-shrink-0",
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
-
isLive:
|
|
337
|
-
onToggle: () =>
|
|
362
|
+
children: /* @__PURE__ */ p(ce, {
|
|
363
|
+
isLive: w,
|
|
364
|
+
onToggle: () => Oe((e) => !e)
|
|
338
365
|
})
|
|
339
366
|
})
|
|
340
367
|
]
|
|
341
368
|
})
|
|
342
369
|
}),
|
|
343
|
-
|
|
344
|
-
currentDashboardId:
|
|
345
|
-
currentDashboardName:
|
|
346
|
-
basePath: `${
|
|
370
|
+
T && /* @__PURE__ */ p(ue, {
|
|
371
|
+
currentDashboardId: O.id,
|
|
372
|
+
currentDashboardName: O.name,
|
|
373
|
+
basePath: `${Se}/dashboards`
|
|
347
374
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ p("div", {
|
|
349
376
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
350
|
-
children: /* @__PURE__ */
|
|
351
|
-
dashboardId:
|
|
352
|
-
pageId:
|
|
353
|
-
title:
|
|
354
|
-
onPaste:
|
|
355
|
-
onSave:
|
|
356
|
-
isSaving:
|
|
357
|
-
onExport:
|
|
358
|
-
onPublishTemplate:
|
|
359
|
-
pages:
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
onPageRename: Re,
|
|
368
|
-
onPageDuplicate: ze,
|
|
369
|
-
onPageDelete: Be,
|
|
370
|
-
onPagesReorder: Ve,
|
|
377
|
+
children: /* @__PURE__ */ p(se, {
|
|
378
|
+
dashboardId: O.id,
|
|
379
|
+
pageId: P || O.pages?.[0]?.id,
|
|
380
|
+
title: O.name,
|
|
381
|
+
onPaste: Le,
|
|
382
|
+
onSave: Ce ? Fe : void 0,
|
|
383
|
+
isSaving: Ee,
|
|
384
|
+
onExport: we ? Re : void 0,
|
|
385
|
+
onPublishTemplate: Te ? Be : void 0,
|
|
386
|
+
pages: X,
|
|
387
|
+
activePageId: Q ?? void 0,
|
|
388
|
+
onPageChange: Y,
|
|
389
|
+
onPageAdd: Ue,
|
|
390
|
+
onPageRename: We,
|
|
391
|
+
onPageDuplicate: Ge,
|
|
392
|
+
onPageDelete: Ke,
|
|
393
|
+
onPagesReorder: qe,
|
|
371
394
|
showPageTabs: !0
|
|
372
395
|
})
|
|
373
396
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
isOpen:
|
|
376
|
-
dashboardId:
|
|
377
|
-
dashboardName:
|
|
378
|
-
onClose:
|
|
397
|
+
/* @__PURE__ */ p(le, {
|
|
398
|
+
isOpen: De,
|
|
399
|
+
dashboardId: O.id,
|
|
400
|
+
dashboardName: O.name,
|
|
401
|
+
onClose: He
|
|
379
402
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
isOpen:
|
|
382
|
-
dashboardId:
|
|
383
|
-
dashboardName:
|
|
384
|
-
dashboardDescription:
|
|
385
|
-
onClose:
|
|
403
|
+
/* @__PURE__ */ p(de, {
|
|
404
|
+
isOpen: ze,
|
|
405
|
+
dashboardId: O.id,
|
|
406
|
+
dashboardName: O.name,
|
|
407
|
+
dashboardDescription: O.description,
|
|
408
|
+
onClose: Ve
|
|
386
409
|
})
|
|
387
410
|
]
|
|
388
|
-
}) : /* @__PURE__ */
|
|
389
|
-
title:
|
|
390
|
-
description:
|
|
411
|
+
}) : /* @__PURE__ */ p(ge, {
|
|
412
|
+
title: g("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
|
|
413
|
+
description: g("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
391
414
|
});
|
|
392
415
|
});
|
|
393
416
|
//#endregion
|
|
394
|
-
export {
|
|
417
|
+
export { h as DashboardViewPage, h as default };
|