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