@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,244 +1,219 @@
|
|
|
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 {
|
|
3
|
-
import { graphQLErrorCodes as s } from "../utils/backendError.js";
|
|
4
|
-
import { useBigConsole as c } from "../context/BigConsoleContext.js";
|
|
2
|
+
import { useBigConsole as o } from "../context/BigConsoleContext.js";
|
|
5
3
|
import "../context/index.js";
|
|
6
|
-
import { useCallback as
|
|
7
|
-
import { useApolloClient as
|
|
4
|
+
import { useCallback as s, useEffect as c, useLayoutEffect as l, useRef as u, useState as d } from "react";
|
|
5
|
+
import { useApolloClient as f } from "@apollo/client/react";
|
|
8
6
|
//#region src/bigconsole/hooks/useDataSinkAlerts.ts
|
|
9
|
-
var
|
|
7
|
+
var p = {
|
|
10
8
|
owner: "",
|
|
11
9
|
sink: null,
|
|
12
10
|
channels: [],
|
|
13
11
|
loading: !1,
|
|
14
12
|
error: null,
|
|
15
|
-
errorCode: null,
|
|
16
13
|
channelError: null
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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(() => ({
|
|
14
|
+
}, m = (e) => e instanceof Error ? e.message : "The alert operation failed. Please try again.";
|
|
15
|
+
function h(h, g) {
|
|
16
|
+
let _ = f(), { currentUser: v, workspaceId: y } = o(), b = `${v?.id ?? ""}|${y ?? ""}|${h}`, x = u(null);
|
|
17
|
+
l(() => (x.current = g ? b : null, () => {
|
|
18
|
+
x.current = null;
|
|
19
|
+
}), [b, g]);
|
|
20
|
+
let [S, C] = d(p), [w, T] = d(!1), E = s(() => ({
|
|
40
21
|
requiredWorkspaceAuth: !0,
|
|
41
|
-
requiredWorkspaceId:
|
|
22
|
+
requiredWorkspaceId: y,
|
|
42
23
|
queryDeduplication: !1
|
|
43
|
-
}), [
|
|
44
|
-
|
|
45
|
-
|
|
24
|
+
}), [y]), D = s(() => g && !!y && !!v?.id && x.current === b, [
|
|
25
|
+
g,
|
|
26
|
+
y,
|
|
46
27
|
v?.id,
|
|
47
|
-
|
|
48
|
-
]),
|
|
49
|
-
if (!
|
|
50
|
-
if (!e || e.id !==
|
|
51
|
-
return
|
|
52
|
-
...t.owner ===
|
|
53
|
-
owner:
|
|
54
|
-
sink: t.owner ===
|
|
28
|
+
b
|
|
29
|
+
]), O = s((e) => {
|
|
30
|
+
if (!D()) return null;
|
|
31
|
+
if (!e || e.id !== h || e.workspaceId !== y) throw Error("Data sink not found in this workspace.");
|
|
32
|
+
return C((t) => ({
|
|
33
|
+
...t.owner === b ? t : p,
|
|
34
|
+
owner: b,
|
|
35
|
+
sink: t.owner === b && t.sink && t.sink.version > e.version ? t.sink : e,
|
|
55
36
|
loading: !1,
|
|
56
|
-
error: null
|
|
57
|
-
errorCode: null
|
|
37
|
+
error: null
|
|
58
38
|
})), e;
|
|
59
39
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
]),
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
...e.owner ===
|
|
68
|
-
owner:
|
|
40
|
+
D,
|
|
41
|
+
h,
|
|
42
|
+
y,
|
|
43
|
+
b
|
|
44
|
+
]), k = s(async () => {
|
|
45
|
+
if (D()) {
|
|
46
|
+
T(!0), C((e) => ({
|
|
47
|
+
...e.owner === b ? e : p,
|
|
48
|
+
owner: b,
|
|
69
49
|
loading: !e.sink,
|
|
70
|
-
error: null
|
|
71
|
-
errorCode: null
|
|
50
|
+
error: null
|
|
72
51
|
}));
|
|
73
52
|
try {
|
|
74
|
-
return
|
|
53
|
+
return O((await _.query({
|
|
75
54
|
query: n,
|
|
76
|
-
variables: { dataSinkId:
|
|
55
|
+
variables: { dataSinkId: h },
|
|
77
56
|
fetchPolicy: "no-cache",
|
|
78
57
|
errorPolicy: "none",
|
|
79
|
-
context:
|
|
58
|
+
context: E()
|
|
80
59
|
})).data?.getDataSink);
|
|
81
60
|
} catch (e) {
|
|
82
|
-
|
|
61
|
+
D() && C((t) => ({
|
|
83
62
|
...t,
|
|
84
|
-
owner:
|
|
63
|
+
owner: b,
|
|
85
64
|
loading: !1,
|
|
86
|
-
error:
|
|
87
|
-
errorCode: b(e)
|
|
65
|
+
error: m(e)
|
|
88
66
|
}));
|
|
89
67
|
} finally {
|
|
90
|
-
|
|
68
|
+
D() && T(!1);
|
|
91
69
|
}
|
|
92
70
|
}
|
|
93
71
|
}, [
|
|
94
72
|
_,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
]),
|
|
101
|
-
if (
|
|
73
|
+
h,
|
|
74
|
+
b,
|
|
75
|
+
D,
|
|
76
|
+
O,
|
|
77
|
+
E
|
|
78
|
+
]), A = s(async () => {
|
|
79
|
+
if (D()) try {
|
|
102
80
|
let t = await _.query({
|
|
103
81
|
query: e,
|
|
104
|
-
variables: { dataSinkId:
|
|
82
|
+
variables: { dataSinkId: h },
|
|
105
83
|
fetchPolicy: "no-cache",
|
|
106
84
|
errorPolicy: "none",
|
|
107
|
-
context:
|
|
85
|
+
context: E()
|
|
108
86
|
});
|
|
109
87
|
if (!t.data) throw Error("Delivery channels did not load.");
|
|
110
88
|
let n = t.data.dataSinkAlertChannels;
|
|
111
|
-
|
|
112
|
-
...e.owner ===
|
|
113
|
-
owner:
|
|
89
|
+
D() && C((e) => ({
|
|
90
|
+
...e.owner === b ? e : p,
|
|
91
|
+
owner: b,
|
|
114
92
|
channels: n,
|
|
115
93
|
channelError: null
|
|
116
94
|
}));
|
|
117
95
|
} catch (e) {
|
|
118
|
-
|
|
96
|
+
D() && C((t) => ({
|
|
119
97
|
...t,
|
|
120
|
-
owner:
|
|
98
|
+
owner: b,
|
|
121
99
|
channels: [],
|
|
122
|
-
channelError:
|
|
100
|
+
channelError: m(e)
|
|
123
101
|
}));
|
|
124
102
|
}
|
|
125
103
|
}, [
|
|
126
104
|
_,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
])
|
|
132
|
-
|
|
133
|
-
}, [j, M]);
|
|
134
|
-
u(() => {
|
|
105
|
+
h,
|
|
106
|
+
b,
|
|
107
|
+
D,
|
|
108
|
+
E
|
|
109
|
+
]);
|
|
110
|
+
c(() => {
|
|
135
111
|
Promise.resolve().then(() => {
|
|
136
|
-
|
|
112
|
+
D() && (k(), A());
|
|
137
113
|
});
|
|
138
114
|
let e = window.setInterval(() => {
|
|
139
|
-
document.visibilityState === "visible" &&
|
|
115
|
+
document.visibilityState === "visible" && k();
|
|
140
116
|
}, 1e4);
|
|
141
117
|
return () => window.clearInterval(e);
|
|
142
118
|
}, [
|
|
119
|
+
D,
|
|
143
120
|
k,
|
|
144
|
-
|
|
145
|
-
N
|
|
121
|
+
A
|
|
146
122
|
]);
|
|
147
|
-
let
|
|
148
|
-
if (!
|
|
149
|
-
return
|
|
123
|
+
let j = s(async (e, t) => {
|
|
124
|
+
if (!D()) throw Error("Workspace context changed. Reopen the alert.");
|
|
125
|
+
return O((await _.mutate({
|
|
150
126
|
mutation: a,
|
|
151
127
|
variables: {
|
|
152
|
-
dataSinkId:
|
|
128
|
+
dataSinkId: h,
|
|
153
129
|
alert: e,
|
|
154
130
|
expectedVersion: t
|
|
155
131
|
},
|
|
156
132
|
errorPolicy: "none",
|
|
157
|
-
context:
|
|
133
|
+
context: E()
|
|
158
134
|
})).data?.upsertDataSinkAlert);
|
|
159
135
|
}, [
|
|
160
136
|
_,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
]),
|
|
166
|
-
if (!
|
|
167
|
-
return
|
|
137
|
+
h,
|
|
138
|
+
D,
|
|
139
|
+
O,
|
|
140
|
+
E
|
|
141
|
+
]), M = s(async (e, t) => {
|
|
142
|
+
if (!D()) throw Error("Workspace context changed. Reopen the alert.");
|
|
143
|
+
return O((await _.mutate({
|
|
168
144
|
mutation: r,
|
|
169
145
|
variables: {
|
|
170
|
-
dataSinkId:
|
|
146
|
+
dataSinkId: h,
|
|
171
147
|
alertId: e,
|
|
172
148
|
expectedVersion: t
|
|
173
149
|
},
|
|
174
150
|
errorPolicy: "none",
|
|
175
|
-
context:
|
|
151
|
+
context: E()
|
|
176
152
|
})).data?.deleteDataSinkAlert);
|
|
177
153
|
}, [
|
|
178
154
|
_,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
]),
|
|
184
|
-
if (!
|
|
155
|
+
h,
|
|
156
|
+
D,
|
|
157
|
+
O,
|
|
158
|
+
E
|
|
159
|
+
]), N = s(async (e, t) => {
|
|
160
|
+
if (!D()) throw Error("Workspace context changed. Reopen the alert.");
|
|
185
161
|
let n = await _.query({
|
|
186
162
|
query: i,
|
|
187
163
|
variables: {
|
|
188
|
-
dataSinkId:
|
|
164
|
+
dataSinkId: h,
|
|
189
165
|
condition: e,
|
|
190
166
|
conditionType: t
|
|
191
167
|
},
|
|
192
168
|
fetchPolicy: "no-cache",
|
|
193
169
|
errorPolicy: "none",
|
|
194
|
-
context:
|
|
170
|
+
context: E()
|
|
195
171
|
});
|
|
196
|
-
if (!
|
|
172
|
+
if (!D()) return null;
|
|
197
173
|
if (!n.data) throw Error("Condition preview returned no result.");
|
|
198
174
|
return n.data.previewDataSinkAlert;
|
|
199
175
|
}, [
|
|
200
176
|
_,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
]),
|
|
205
|
-
if (!
|
|
177
|
+
h,
|
|
178
|
+
D,
|
|
179
|
+
E
|
|
180
|
+
]), P = s(async (e, n) => {
|
|
181
|
+
if (!D()) return null;
|
|
206
182
|
let r = await _.query({
|
|
207
183
|
query: t,
|
|
208
184
|
variables: {
|
|
209
|
-
dataSinkId:
|
|
185
|
+
dataSinkId: h,
|
|
210
186
|
alertId: e,
|
|
211
187
|
after: n,
|
|
212
188
|
first: 21
|
|
213
189
|
},
|
|
214
190
|
fetchPolicy: "no-cache",
|
|
215
191
|
errorPolicy: "none",
|
|
216
|
-
context:
|
|
192
|
+
context: E()
|
|
217
193
|
});
|
|
218
|
-
if (!
|
|
194
|
+
if (!D()) return null;
|
|
219
195
|
if (!r.data) throw Error("Execution history returned no result.");
|
|
220
|
-
return r.data.dataSinkAlertExecutions.filter((e) => e.dataSinkId ===
|
|
196
|
+
return r.data.dataSinkAlertExecutions.filter((e) => e.dataSinkId === h);
|
|
221
197
|
}, [
|
|
222
198
|
_,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
199
|
+
h,
|
|
200
|
+
D,
|
|
201
|
+
E
|
|
226
202
|
]);
|
|
227
203
|
return {
|
|
228
|
-
...
|
|
229
|
-
...
|
|
230
|
-
loading:
|
|
204
|
+
...S.owner === b ? S : {
|
|
205
|
+
...p,
|
|
206
|
+
loading: g
|
|
231
207
|
},
|
|
232
|
-
owner:
|
|
233
|
-
refreshing:
|
|
234
|
-
reload:
|
|
235
|
-
reloadChannels:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
history: L
|
|
208
|
+
owner: b,
|
|
209
|
+
refreshing: w,
|
|
210
|
+
reload: k,
|
|
211
|
+
reloadChannels: A,
|
|
212
|
+
save: j,
|
|
213
|
+
remove: M,
|
|
214
|
+
preview: N,
|
|
215
|
+
history: P
|
|
241
216
|
};
|
|
242
217
|
}
|
|
243
218
|
//#endregion
|
|
244
|
-
export {
|
|
219
|
+
export { m as alertErrorMessage, h as useDataSinkAlerts };
|
|
@@ -19,6 +19,12 @@ interface InvalidateCacheResult {
|
|
|
19
19
|
success: boolean;
|
|
20
20
|
message?: string;
|
|
21
21
|
}
|
|
22
|
+
/** A sink's stored payload, as loaded for editing. */
|
|
23
|
+
export interface DataSinkPayload {
|
|
24
|
+
id: string;
|
|
25
|
+
version: number;
|
|
26
|
+
data: unknown;
|
|
27
|
+
}
|
|
22
28
|
interface DataSinkDataResult {
|
|
23
29
|
raw: unknown;
|
|
24
30
|
extracted: unknown;
|
|
@@ -36,6 +42,7 @@ export declare function useDataSinkOperations(options?: UseDataSinkOperationsOpt
|
|
|
36
42
|
dataSinks: DataSink[];
|
|
37
43
|
fetchDataSinks: (filters?: DataSinkFilters) => Promise<DataSink[]>;
|
|
38
44
|
fetchDataSink: (id: string) => Promise<DataSink | null>;
|
|
45
|
+
fetchDataSinkPayload: (id: string) => Promise<DataSinkPayload | null>;
|
|
39
46
|
getDataSinkData: (idOrKey: {
|
|
40
47
|
id?: string;
|
|
41
48
|
key?: string;
|