@burdenoff/microfe-bigconsole 2026.1012.3 → 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/assistantApi.js +5 -5
- 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 +33 -18
- 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 +154 -150
- 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/embed/renderer-manifest.js +12 -0
- 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/WidgetRegistry.js +122 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +227 -224
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.d.ts +10 -0
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +113 -0
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.d.ts +10 -0
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +187 -0
- 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/advanced/data.d.ts +36 -0
- package/dist/bigconsole/components/widgets/advanced/data.js +113 -0
- package/dist/bigconsole/components/widgets/advanced/mapData.d.ts +10 -0
- package/dist/bigconsole/components/widgets/advanced/mapData.js +22 -0
- package/dist/bigconsole/components/widgets/advanced/waterfallData.d.ts +15 -0
- package/dist/bigconsole/components/widgets/advanced/waterfallData.js +28 -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/chart/charts/WaterfallChart.js +34 -37
- 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/index.js +1 -1
- 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/map-widget/MapWidget.d.ts +2 -0
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +64 -63
- 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/graphql/widgetCapabilities.d.ts +7 -0
- package/dist/bigconsole/graphql/widgetCapabilities.js +37 -0
- 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/hooks/useWidgetCatalog.js +46 -41
- package/dist/bigconsole/hooks/useWidgetOperations.js +113 -88
- 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/BigConsoleRenderer.js +8 -5
- 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/types/index.d.ts +1 -1
- package/dist/bigconsole/utils/advancedWidgetCapabilities.d.ts +14 -0
- package/dist/bigconsole/utils/advancedWidgetCapabilities.js +36 -0
- 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/utils/widgetTypeMapping.d.ts +1 -1
- package/dist/bigconsole/utils/widgetTypeMapping.js +13 -2
- package/dist/bigconsole/workflowOpen.js +15 -14
- package/dist/generated/wspace-operations.d.ts +61 -2
- package/dist/generated/wspace-operations.js +44 -18
- package/dist/generated/wspace-types.d.ts +34 -3
- package/package.json +3 -3
|
@@ -1,219 +1,244 @@
|
|
|
1
1
|
import { BigConsoleDataSinkAlertChannelsDocument as e, BigConsoleDataSinkAlertExecutionsDocument as t, BigConsoleDataSinkAlertsDocument as n, BigConsoleDeleteDataSinkAlertDocument as r, BigConsolePreviewDataSinkAlertDocument as i, BigConsoleUpsertDataSinkAlertDocument as a } from "../../generated/wspace-operations.js";
|
|
2
|
-
import {
|
|
2
|
+
import { BACKEND_ERROR_MESSAGES as o } from "../constants/backendErrors.js";
|
|
3
|
+
import { graphQLErrorCodes as s } from "../utils/backendError.js";
|
|
4
|
+
import { useBigConsole as c } from "../context/BigConsoleContext.js";
|
|
3
5
|
import "../context/index.js";
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { useApolloClient as
|
|
6
|
+
import { useCallback as l, useEffect as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
|
|
7
|
+
import { useApolloClient as m } from "@apollo/client/react";
|
|
6
8
|
//#region src/bigconsole/hooks/useDataSinkAlerts.ts
|
|
7
|
-
var
|
|
9
|
+
var h = {
|
|
8
10
|
owner: "",
|
|
9
11
|
sink: null,
|
|
10
12
|
channels: [],
|
|
11
13
|
loading: !1,
|
|
12
14
|
error: null,
|
|
15
|
+
errorCode: null,
|
|
13
16
|
channelError: null
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
}, g = (e) => e instanceof Error ? e.message : "The alert operation failed. Please try again.", _ = "DATASINK_NOT_FOUND", v = new Set([
|
|
18
|
+
_,
|
|
19
|
+
"E_DATASINK_NOT_FOUND",
|
|
20
|
+
"NOT_FOUND"
|
|
21
|
+
]), y = class extends Error {
|
|
22
|
+
code = _;
|
|
23
|
+
constructor() {
|
|
24
|
+
super("Data sink not found in this workspace."), this.name = "AlertSinkNotFoundError";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function b(e) {
|
|
28
|
+
return e instanceof y ? e.code : s(e)[0] ?? null;
|
|
29
|
+
}
|
|
30
|
+
function x(e, t) {
|
|
31
|
+
let { error: n, errorCode: r } = t;
|
|
32
|
+
return n === null || r !== null && v.has(r) ? e("bigconsole.alerts.notFound", "Data sink not found.") : r === null ? n : e(`bigconsole.errors.${r}`, o[r] ?? n);
|
|
33
|
+
}
|
|
34
|
+
function S(o, s) {
|
|
35
|
+
let _ = m(), { currentUser: v, workspaceId: x } = c(), S = `${v?.id ?? ""}|${x ?? ""}|${o}`, C = f(null);
|
|
36
|
+
d(() => (C.current = s ? S : null, () => {
|
|
37
|
+
C.current = null;
|
|
38
|
+
}), [S, s]);
|
|
39
|
+
let [w, T] = p(h), [E, D] = p(!1), O = l(() => ({
|
|
21
40
|
requiredWorkspaceAuth: !0,
|
|
22
|
-
requiredWorkspaceId:
|
|
41
|
+
requiredWorkspaceId: x,
|
|
23
42
|
queryDeduplication: !1
|
|
24
|
-
}), [
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
}), [x]), k = l(() => s && !!x && !!v?.id && C.current === S, [
|
|
44
|
+
s,
|
|
45
|
+
x,
|
|
27
46
|
v?.id,
|
|
28
|
-
|
|
29
|
-
]),
|
|
30
|
-
if (!
|
|
31
|
-
if (!e || e.id !==
|
|
32
|
-
return
|
|
33
|
-
...t.owner ===
|
|
34
|
-
owner:
|
|
35
|
-
sink: t.owner ===
|
|
47
|
+
S
|
|
48
|
+
]), A = l((e) => {
|
|
49
|
+
if (!k()) return null;
|
|
50
|
+
if (!e || e.id !== o || e.workspaceId !== x) throw new y();
|
|
51
|
+
return T((t) => ({
|
|
52
|
+
...t.owner === S ? t : h,
|
|
53
|
+
owner: S,
|
|
54
|
+
sink: t.owner === S && t.sink && t.sink.version > e.version ? t.sink : e,
|
|
36
55
|
loading: !1,
|
|
37
|
-
error: null
|
|
56
|
+
error: null,
|
|
57
|
+
errorCode: null
|
|
38
58
|
})), e;
|
|
39
59
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]),
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
...e.owner ===
|
|
48
|
-
owner:
|
|
60
|
+
k,
|
|
61
|
+
o,
|
|
62
|
+
x,
|
|
63
|
+
S
|
|
64
|
+
]), j = l(async () => {
|
|
65
|
+
if (k()) {
|
|
66
|
+
D(!0), T((e) => ({
|
|
67
|
+
...e.owner === S ? e : h,
|
|
68
|
+
owner: S,
|
|
49
69
|
loading: !e.sink,
|
|
50
|
-
error: null
|
|
70
|
+
error: null,
|
|
71
|
+
errorCode: null
|
|
51
72
|
}));
|
|
52
73
|
try {
|
|
53
|
-
return
|
|
74
|
+
return A((await _.query({
|
|
54
75
|
query: n,
|
|
55
|
-
variables: { dataSinkId:
|
|
76
|
+
variables: { dataSinkId: o },
|
|
56
77
|
fetchPolicy: "no-cache",
|
|
57
78
|
errorPolicy: "none",
|
|
58
|
-
context:
|
|
79
|
+
context: O()
|
|
59
80
|
})).data?.getDataSink);
|
|
60
81
|
} catch (e) {
|
|
61
|
-
|
|
82
|
+
k() && T((t) => ({
|
|
62
83
|
...t,
|
|
63
|
-
owner:
|
|
84
|
+
owner: S,
|
|
64
85
|
loading: !1,
|
|
65
|
-
error:
|
|
86
|
+
error: g(e),
|
|
87
|
+
errorCode: b(e)
|
|
66
88
|
}));
|
|
67
89
|
} finally {
|
|
68
|
-
|
|
90
|
+
k() && D(!1);
|
|
69
91
|
}
|
|
70
92
|
}
|
|
71
93
|
}, [
|
|
72
94
|
_,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
]),
|
|
79
|
-
if (
|
|
95
|
+
o,
|
|
96
|
+
S,
|
|
97
|
+
k,
|
|
98
|
+
A,
|
|
99
|
+
O
|
|
100
|
+
]), M = l(async () => {
|
|
101
|
+
if (k()) try {
|
|
80
102
|
let t = await _.query({
|
|
81
103
|
query: e,
|
|
82
|
-
variables: { dataSinkId:
|
|
104
|
+
variables: { dataSinkId: o },
|
|
83
105
|
fetchPolicy: "no-cache",
|
|
84
106
|
errorPolicy: "none",
|
|
85
|
-
context:
|
|
107
|
+
context: O()
|
|
86
108
|
});
|
|
87
109
|
if (!t.data) throw Error("Delivery channels did not load.");
|
|
88
110
|
let n = t.data.dataSinkAlertChannels;
|
|
89
|
-
|
|
90
|
-
...e.owner ===
|
|
91
|
-
owner:
|
|
111
|
+
k() && T((e) => ({
|
|
112
|
+
...e.owner === S ? e : h,
|
|
113
|
+
owner: S,
|
|
92
114
|
channels: n,
|
|
93
115
|
channelError: null
|
|
94
116
|
}));
|
|
95
117
|
} catch (e) {
|
|
96
|
-
|
|
118
|
+
k() && T((t) => ({
|
|
97
119
|
...t,
|
|
98
|
-
owner:
|
|
120
|
+
owner: S,
|
|
99
121
|
channels: [],
|
|
100
|
-
channelError:
|
|
122
|
+
channelError: g(e)
|
|
101
123
|
}));
|
|
102
124
|
}
|
|
103
125
|
}, [
|
|
104
126
|
_,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
])
|
|
110
|
-
|
|
127
|
+
o,
|
|
128
|
+
S,
|
|
129
|
+
k,
|
|
130
|
+
O
|
|
131
|
+
]), N = l(async () => {
|
|
132
|
+
await j() && await M();
|
|
133
|
+
}, [j, M]);
|
|
134
|
+
u(() => {
|
|
111
135
|
Promise.resolve().then(() => {
|
|
112
|
-
|
|
136
|
+
k() && N();
|
|
113
137
|
});
|
|
114
138
|
let e = window.setInterval(() => {
|
|
115
|
-
document.visibilityState === "visible" &&
|
|
139
|
+
document.visibilityState === "visible" && j();
|
|
116
140
|
}, 1e4);
|
|
117
141
|
return () => window.clearInterval(e);
|
|
118
142
|
}, [
|
|
119
|
-
D,
|
|
120
143
|
k,
|
|
121
|
-
|
|
144
|
+
j,
|
|
145
|
+
N
|
|
122
146
|
]);
|
|
123
|
-
let
|
|
124
|
-
if (!
|
|
125
|
-
return
|
|
147
|
+
let P = l(async (e, t) => {
|
|
148
|
+
if (!k()) throw Error("Workspace context changed. Reopen the alert.");
|
|
149
|
+
return A((await _.mutate({
|
|
126
150
|
mutation: a,
|
|
127
151
|
variables: {
|
|
128
|
-
dataSinkId:
|
|
152
|
+
dataSinkId: o,
|
|
129
153
|
alert: e,
|
|
130
154
|
expectedVersion: t
|
|
131
155
|
},
|
|
132
156
|
errorPolicy: "none",
|
|
133
|
-
context:
|
|
157
|
+
context: O()
|
|
134
158
|
})).data?.upsertDataSinkAlert);
|
|
135
159
|
}, [
|
|
136
160
|
_,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
]),
|
|
142
|
-
if (!
|
|
143
|
-
return
|
|
161
|
+
o,
|
|
162
|
+
k,
|
|
163
|
+
A,
|
|
164
|
+
O
|
|
165
|
+
]), F = l(async (e, t) => {
|
|
166
|
+
if (!k()) throw Error("Workspace context changed. Reopen the alert.");
|
|
167
|
+
return A((await _.mutate({
|
|
144
168
|
mutation: r,
|
|
145
169
|
variables: {
|
|
146
|
-
dataSinkId:
|
|
170
|
+
dataSinkId: o,
|
|
147
171
|
alertId: e,
|
|
148
172
|
expectedVersion: t
|
|
149
173
|
},
|
|
150
174
|
errorPolicy: "none",
|
|
151
|
-
context:
|
|
175
|
+
context: O()
|
|
152
176
|
})).data?.deleteDataSinkAlert);
|
|
153
177
|
}, [
|
|
154
178
|
_,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
]),
|
|
160
|
-
if (!
|
|
179
|
+
o,
|
|
180
|
+
k,
|
|
181
|
+
A,
|
|
182
|
+
O
|
|
183
|
+
]), I = l(async (e, t) => {
|
|
184
|
+
if (!k()) throw Error("Workspace context changed. Reopen the alert.");
|
|
161
185
|
let n = await _.query({
|
|
162
186
|
query: i,
|
|
163
187
|
variables: {
|
|
164
|
-
dataSinkId:
|
|
188
|
+
dataSinkId: o,
|
|
165
189
|
condition: e,
|
|
166
190
|
conditionType: t
|
|
167
191
|
},
|
|
168
192
|
fetchPolicy: "no-cache",
|
|
169
193
|
errorPolicy: "none",
|
|
170
|
-
context:
|
|
194
|
+
context: O()
|
|
171
195
|
});
|
|
172
|
-
if (!
|
|
196
|
+
if (!k()) return null;
|
|
173
197
|
if (!n.data) throw Error("Condition preview returned no result.");
|
|
174
198
|
return n.data.previewDataSinkAlert;
|
|
175
199
|
}, [
|
|
176
200
|
_,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
]),
|
|
181
|
-
if (!
|
|
201
|
+
o,
|
|
202
|
+
k,
|
|
203
|
+
O
|
|
204
|
+
]), L = l(async (e, n) => {
|
|
205
|
+
if (!k()) return null;
|
|
182
206
|
let r = await _.query({
|
|
183
207
|
query: t,
|
|
184
208
|
variables: {
|
|
185
|
-
dataSinkId:
|
|
209
|
+
dataSinkId: o,
|
|
186
210
|
alertId: e,
|
|
187
211
|
after: n,
|
|
188
212
|
first: 21
|
|
189
213
|
},
|
|
190
214
|
fetchPolicy: "no-cache",
|
|
191
215
|
errorPolicy: "none",
|
|
192
|
-
context:
|
|
216
|
+
context: O()
|
|
193
217
|
});
|
|
194
|
-
if (!
|
|
218
|
+
if (!k()) return null;
|
|
195
219
|
if (!r.data) throw Error("Execution history returned no result.");
|
|
196
|
-
return r.data.dataSinkAlertExecutions.filter((e) => e.dataSinkId ===
|
|
220
|
+
return r.data.dataSinkAlertExecutions.filter((e) => e.dataSinkId === o);
|
|
197
221
|
}, [
|
|
198
222
|
_,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
223
|
+
o,
|
|
224
|
+
k,
|
|
225
|
+
O
|
|
202
226
|
]);
|
|
203
227
|
return {
|
|
204
|
-
...
|
|
205
|
-
...
|
|
206
|
-
loading:
|
|
228
|
+
...w.owner === S ? w : {
|
|
229
|
+
...h,
|
|
230
|
+
loading: s
|
|
207
231
|
},
|
|
208
|
-
owner:
|
|
209
|
-
refreshing:
|
|
210
|
-
reload:
|
|
211
|
-
reloadChannels:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
232
|
+
owner: S,
|
|
233
|
+
refreshing: E,
|
|
234
|
+
reload: j,
|
|
235
|
+
reloadChannels: M,
|
|
236
|
+
reloadSinkThenChannels: N,
|
|
237
|
+
save: P,
|
|
238
|
+
remove: F,
|
|
239
|
+
preview: I,
|
|
240
|
+
history: L
|
|
216
241
|
};
|
|
217
242
|
}
|
|
218
243
|
//#endregion
|
|
219
|
-
export {
|
|
244
|
+
export { g as alertErrorMessage, x as describeAlertLoadFailure, S as useDataSinkAlerts };
|
|
@@ -7,8 +7,8 @@ import "../context/index.js";
|
|
|
7
7
|
import { appendPathSegment as a } from "../utils/safeUrl.js";
|
|
8
8
|
import { PAGE_PARAM as o } from "./useActivePage.js";
|
|
9
9
|
import { useCallback as s } from "react";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { useApolloClient as l } from "@apollo/client/react";
|
|
12
12
|
import { toast as u } from "sonner";
|
|
13
13
|
//#region src/bigconsole/hooks/useDrilldown.ts
|
|
14
14
|
var d = "ctx_", f = "filter_", p = "drilldown_", m = "__targetPageId", h = [
|
|
@@ -91,7 +91,7 @@ function y(e) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function b(g = {}) {
|
|
94
|
-
let { basePath: b = "/dashboards", onDrilldown: x, onModalOpen: S, onMaxDepthReached: C } = g, w = i(), T = r(), E =
|
|
94
|
+
let { basePath: b = "/dashboards", onDrilldown: x, onModalOpen: S, onMaxDepthReached: C } = g, w = i(), T = r(), E = l(), { t: D } = c(), O = t((e) => e.openModal), k = t((e) => e.pushDrilldown), A = t((e) => e.isOpen), j = t((e) => e.dashboardId), M = s(() => {
|
|
95
95
|
let e = new URLSearchParams(window.location.search), t = e.get(`${p}depth`), n = e.get(`${p}parent`), r = e.get(`${p}path`);
|
|
96
96
|
return {
|
|
97
97
|
depth: t ? parseInt(t, 10) : 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateGlobalFilterDocument as e, DeleteGlobalFilterDocument as t, GetDashboardDocument as n, ReorderGlobalFiltersDocument as r, UpdateGlobalFilterDocument as i } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useCallback as a, useRef as o, useState as s } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useLocalStorage as c } from "@burdenoff/fe-libs/shared/hooks";
|
|
4
|
+
import { useApolloClient as l } from "@apollo/client/react";
|
|
5
5
|
//#region src/bigconsole/hooks/useGlobalFilters.ts
|
|
6
6
|
var u = "bigconsole_local_filters";
|
|
7
7
|
function d(e) {
|
|
@@ -24,7 +24,7 @@ function d(e) {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
function f() {
|
|
27
|
-
let [f, p] = s([]), [m, h] = s({}), [g, _] = s(!1), [v, y] = s(null), b = o(""), [x, S] =
|
|
27
|
+
let [f, p] = s([]), [m, h] = s({}), [g, _] = s(!1), [v, y] = s(null), b = o(""), [x, S] = c(u, {}), C = l();
|
|
28
28
|
a((e) => {
|
|
29
29
|
let t = x[e];
|
|
30
30
|
return t ? t.map((e) => d(e)) : [];
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadNativeWidgetCatalog as e } from "../graphql/widgetCapabilities.js";
|
|
2
2
|
import t, { WIDGET_CATEGORY_LABELS as n, getAllWidgetDefinitions as r, getWidgetDefinition as i } from "../components/widgets/WidgetRegistry.js";
|
|
3
3
|
import { isFederationAccessible as a, mapFromFederationWidgetType as o } from "../utils/widgetTypeMapping.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { filterAdvancedWidgetDefinitions as s, nativeFederationTypes as c } from "../utils/advancedWidgetCapabilities.js";
|
|
5
|
+
import { useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f } from "react";
|
|
6
|
+
import { useApolloClient as p } from "@apollo/client/react";
|
|
7
|
+
import { useQuery as m } from "@tanstack/react-query";
|
|
7
8
|
//#region src/bigconsole/hooks/useWidgetCatalog.ts
|
|
8
|
-
var
|
|
9
|
-
function
|
|
9
|
+
var h = new Set(Object.keys(n)), g = "Puzzle", _ = "Installed";
|
|
10
|
+
function v(e) {
|
|
10
11
|
let n = String(e).toLowerCase();
|
|
11
12
|
return Object.prototype.hasOwnProperty.call(t, n) || a(e);
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function y(e) {
|
|
14
15
|
let n = String(e).toLowerCase();
|
|
15
16
|
return Object.prototype.hasOwnProperty.call(t, n) ? n : o(e);
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function b(e) {
|
|
18
19
|
return {
|
|
19
20
|
type: "custom",
|
|
20
21
|
name: e.label,
|
|
21
22
|
description: e.description,
|
|
22
|
-
icon: e.icon ||
|
|
23
|
-
category:
|
|
23
|
+
icon: e.icon || g,
|
|
24
|
+
category: _,
|
|
24
25
|
component: null,
|
|
25
26
|
defaultConfig: {
|
|
26
27
|
...e.defaultConfig ?? {},
|
|
@@ -51,9 +52,9 @@ function g(e) {
|
|
|
51
52
|
tags: ["store", "installed"]
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
if (!
|
|
56
|
-
let t =
|
|
55
|
+
function x(e) {
|
|
56
|
+
if (!v(e.type)) return b(e);
|
|
57
|
+
let t = y(e.type), n = i(t), r = h.has(e.category) ? e.category : n.category;
|
|
57
58
|
return {
|
|
58
59
|
type: t,
|
|
59
60
|
name: e.label,
|
|
@@ -81,42 +82,46 @@ function _(e) {
|
|
|
81
82
|
tags: n.tags
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
-
let { workspaceId: n, apiGatewayUrl: i,
|
|
86
|
-
|
|
85
|
+
function S(t = {}) {
|
|
86
|
+
let { workspaceId: n, apiGatewayUrl: i, enabled: a = !0 } = t, o = p(), h = f(n);
|
|
87
|
+
u(() => (h.current = a ? n : void 0, () => {
|
|
88
|
+
h.current = void 0;
|
|
89
|
+
}), [n, a]);
|
|
90
|
+
let { data: g, isLoading: _, error: v } = m({
|
|
91
|
+
queryKey: [
|
|
92
|
+
"widgetCatalog",
|
|
93
|
+
n,
|
|
94
|
+
i
|
|
95
|
+
],
|
|
87
96
|
queryFn: async () => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
headers: t,
|
|
93
|
-
body: JSON.stringify({ query: u(e) })
|
|
94
|
-
});
|
|
95
|
-
if (!o.ok) throw Error(`Failed to fetch widget catalog: ${o.status}`);
|
|
96
|
-
let s = await o.json();
|
|
97
|
-
if (s.errors?.length) throw Error(s.errors[0].message);
|
|
98
|
-
return s.data?.getWidgetTypes ?? [];
|
|
97
|
+
if (!n || h.current !== n) throw Error("Widget catalog workspace changed.");
|
|
98
|
+
let t = await e(o, n);
|
|
99
|
+
if (h.current !== n) throw Error("Widget catalog workspace changed.");
|
|
100
|
+
return t;
|
|
99
101
|
},
|
|
100
|
-
enabled:
|
|
102
|
+
enabled: a && !!n,
|
|
101
103
|
staleTime: 600 * 1e3
|
|
102
104
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, [
|
|
106
|
-
|
|
105
|
+
l(() => {
|
|
106
|
+
v && console.warn("Falling back to bundled widget registry:", v.message);
|
|
107
|
+
}, [v]);
|
|
108
|
+
let y = g?.getWidgetTypes, b = d(() => c(g?.getWidgetTypes ?? []), [g]);
|
|
109
|
+
return d(() => y && y.length > 0 ? {
|
|
110
|
+
definitions: s(y.map(x), b),
|
|
107
111
|
source: "backend",
|
|
108
|
-
loading:
|
|
109
|
-
error:
|
|
112
|
+
loading: _,
|
|
113
|
+
error: v ?? void 0
|
|
110
114
|
} : {
|
|
111
|
-
definitions: r(),
|
|
115
|
+
definitions: s(r(), b),
|
|
112
116
|
source: "static",
|
|
113
|
-
loading:
|
|
114
|
-
error:
|
|
117
|
+
loading: _,
|
|
118
|
+
error: v ?? void 0
|
|
115
119
|
}, [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
y,
|
|
121
|
+
b,
|
|
122
|
+
_,
|
|
123
|
+
v
|
|
119
124
|
]);
|
|
120
125
|
}
|
|
121
126
|
//#endregion
|
|
122
|
-
export {
|
|
127
|
+
export { S as default };
|