@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
|
@@ -5,8 +5,8 @@ import { alertErrorMessage as n } from "../../hooks/useDataSinkAlerts.js";
|
|
|
5
5
|
import { useCallback as r, useEffect as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
|
|
6
6
|
import { Loader2 as c, RefreshCw as l } from "lucide-react";
|
|
7
7
|
import { Button as u } from "@burdenoff/fe-libs/ui";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
10
|
//#region src/bigconsole/components/datasink/AlertExecutionHistory.tsx
|
|
11
11
|
var m = {
|
|
12
12
|
owner: "",
|
|
@@ -16,7 +16,7 @@ var m = {
|
|
|
16
16
|
error: null
|
|
17
17
|
};
|
|
18
18
|
function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
|
|
19
|
-
let { t: y } =
|
|
19
|
+
let { t: y } = d(), [b, x] = s(""), [S, C] = s([]), w = S.at(-1), T = `${h}|${b}|${w ?? ""}`, E = o(null), D = o(null);
|
|
20
20
|
a(() => (E.current = T, () => {
|
|
21
21
|
E.current = null, D.current = null;
|
|
22
22
|
}), [T]);
|
|
@@ -66,25 +66,25 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
|
|
|
66
66
|
...m,
|
|
67
67
|
loading: !0
|
|
68
68
|
};
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ p(t, {
|
|
70
70
|
title: y("bigconsole.alerts.history.title", "Execution history"),
|
|
71
71
|
headingLevel: 2,
|
|
72
72
|
description: y("bigconsole.alerts.history.description", "Actual evaluations and notification delivery status. Refreshes every 10 seconds while this page is visible."),
|
|
73
|
-
actions: /* @__PURE__ */
|
|
73
|
+
actions: /* @__PURE__ */ p(u, {
|
|
74
74
|
type: "button",
|
|
75
75
|
variant: "secondary",
|
|
76
76
|
size: "sm",
|
|
77
77
|
onClick: () => void A(),
|
|
78
78
|
disabled: j.loading,
|
|
79
|
-
children: [j.loading ? /* @__PURE__ */
|
|
79
|
+
children: [j.loading ? /* @__PURE__ */ f(c, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(l, { className: "mr-2 h-4 w-4" }), y("bigconsole.alerts.history.refresh", "Refresh history")]
|
|
80
80
|
}),
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ f("label", {
|
|
83
83
|
htmlFor: "alert-history-filter",
|
|
84
84
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
85
85
|
children: y("bigconsole.alerts.history.filter", "Filter by rule")
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ p("select", {
|
|
88
88
|
id: "alert-history-filter",
|
|
89
89
|
className: `mb-4 w-full min-w-0 rounded-control border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary ${e}`,
|
|
90
90
|
value: b,
|
|
@@ -92,57 +92,57 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
|
|
|
92
92
|
x(e.target.value), C([]);
|
|
93
93
|
},
|
|
94
94
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ f("option", {
|
|
96
96
|
value: "",
|
|
97
97
|
children: y("bigconsole.alerts.history.all", "All rules")
|
|
98
98
|
}),
|
|
99
|
-
b && !g.some((e) => e.id === b) && /* @__PURE__ */
|
|
99
|
+
b && !g.some((e) => e.id === b) && /* @__PURE__ */ f("option", {
|
|
100
100
|
value: b,
|
|
101
101
|
children: b
|
|
102
102
|
}),
|
|
103
|
-
g.map((e) => /* @__PURE__ */
|
|
103
|
+
g.map((e) => /* @__PURE__ */ f("option", {
|
|
104
104
|
value: e.id,
|
|
105
105
|
children: e.name
|
|
106
106
|
}, e.id))
|
|
107
107
|
]
|
|
108
108
|
}),
|
|
109
|
-
j.error && /* @__PURE__ */
|
|
109
|
+
j.error && /* @__PURE__ */ f("p", {
|
|
110
110
|
role: "alert",
|
|
111
111
|
className: "mb-4 break-words text-sm text-status-error-text",
|
|
112
112
|
children: j.error
|
|
113
113
|
}),
|
|
114
|
-
j.loading && !j.rows.length && /* @__PURE__ */
|
|
114
|
+
j.loading && !j.rows.length && /* @__PURE__ */ f("p", {
|
|
115
115
|
role: "status",
|
|
116
116
|
className: "text-sm text-text-secondary",
|
|
117
117
|
children: y("bigconsole.alerts.history.loading", "Loading execution history…")
|
|
118
118
|
}),
|
|
119
|
-
!j.loading && !j.error && !j.rows.length && /* @__PURE__ */
|
|
119
|
+
!j.loading && !j.error && !j.rows.length && /* @__PURE__ */ f("p", {
|
|
120
120
|
className: "text-sm text-text-secondary",
|
|
121
121
|
children: y("bigconsole.alerts.history.empty", "No evaluations recorded yet. Enabled rules evaluate when the sink data is updated or refreshed.")
|
|
122
122
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ f("ol", {
|
|
124
124
|
className: "divide-y divide-border-subtle",
|
|
125
|
-
children: j.rows.map((e) => /* @__PURE__ */
|
|
125
|
+
children: j.rows.map((e) => /* @__PURE__ */ p("li", {
|
|
126
126
|
className: "min-w-0 py-4 first:pt-0",
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ p("div", {
|
|
129
129
|
className: "flex flex-wrap items-start justify-between gap-2",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ p("div", {
|
|
131
131
|
className: "min-w-0",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ f("p", {
|
|
133
133
|
className: "break-words text-sm font-medium text-text-primary",
|
|
134
134
|
children: g.find((t) => t.id === e.alertId)?.name ?? e.alertId
|
|
135
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ f("time", {
|
|
136
136
|
dateTime: e.createdAt,
|
|
137
137
|
className: "text-xs text-text-secondary",
|
|
138
138
|
children: new Date(e.createdAt).toLocaleString()
|
|
139
139
|
})]
|
|
140
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ f("span", {
|
|
141
141
|
className: "rounded-pill border border-border-subtle bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
|
|
142
142
|
children: y(`bigconsole.alerts.history.status.${e.status}`, e.status.replaceAll("_", " "))
|
|
143
143
|
})]
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ p("p", {
|
|
146
146
|
className: "mt-2 break-words text-xs text-text-secondary",
|
|
147
147
|
children: [
|
|
148
148
|
y("bigconsole.alerts.history.dataVersion", "Data version"),
|
|
@@ -156,41 +156,41 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
|
|
|
156
156
|
" ms"
|
|
157
157
|
]
|
|
158
158
|
}),
|
|
159
|
-
e.error && /* @__PURE__ */
|
|
159
|
+
e.error && /* @__PURE__ */ f("p", {
|
|
160
160
|
className: "mt-2 break-words text-sm text-status-error-text",
|
|
161
161
|
children: e.error
|
|
162
162
|
}),
|
|
163
|
-
e.deliveries.length > 0 && /* @__PURE__ */
|
|
163
|
+
e.deliveries.length > 0 && /* @__PURE__ */ f("ul", {
|
|
164
164
|
className: "mt-3 space-y-2",
|
|
165
|
-
children: e.deliveries.map((e, t) => /* @__PURE__ */
|
|
165
|
+
children: e.deliveries.map((e, t) => /* @__PURE__ */ p("li", {
|
|
166
166
|
className: "min-w-0 rounded-control border border-border-subtle bg-bg-sunken p-3 text-xs",
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ p("div", {
|
|
169
169
|
className: "flex flex-wrap justify-between gap-2",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ p("span", {
|
|
171
171
|
className: "break-all text-text-primary",
|
|
172
172
|
children: [
|
|
173
173
|
e.channel,
|
|
174
174
|
" · ",
|
|
175
175
|
e.recipient
|
|
176
176
|
]
|
|
177
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ f("span", {
|
|
178
178
|
className: "font-medium text-text-primary",
|
|
179
179
|
children: e.status
|
|
180
180
|
})]
|
|
181
181
|
}),
|
|
182
|
-
e.attemptedAt && /* @__PURE__ */
|
|
182
|
+
e.attemptedAt && /* @__PURE__ */ p("p", {
|
|
183
183
|
className: "mt-1 text-text-secondary",
|
|
184
184
|
children: [
|
|
185
185
|
y("bigconsole.alerts.history.attempted", "Attempted"),
|
|
186
186
|
" ",
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ f("time", {
|
|
188
188
|
dateTime: e.attemptedAt,
|
|
189
189
|
children: new Date(e.attemptedAt).toLocaleString()
|
|
190
190
|
})
|
|
191
191
|
]
|
|
192
192
|
}),
|
|
193
|
-
e.notificationId && /* @__PURE__ */
|
|
193
|
+
e.notificationId && /* @__PURE__ */ p("p", {
|
|
194
194
|
className: "mt-1 break-all text-text-muted",
|
|
195
195
|
children: [
|
|
196
196
|
y("bigconsole.alerts.history.notification", "Notification"),
|
|
@@ -198,7 +198,7 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
|
|
|
198
198
|
e.notificationId
|
|
199
199
|
]
|
|
200
200
|
}),
|
|
201
|
-
e.error && /* @__PURE__ */
|
|
201
|
+
e.error && /* @__PURE__ */ f("p", {
|
|
202
202
|
className: "mt-1 break-words text-status-error-text",
|
|
203
203
|
children: e.error
|
|
204
204
|
})
|
|
@@ -208,25 +208,25 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
|
|
|
208
208
|
]
|
|
209
209
|
}, e.id))
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ p("div", {
|
|
212
212
|
className: "mt-4 flex flex-wrap items-center justify-between gap-control-gap border-t border-border-subtle pt-3",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ p("span", {
|
|
214
214
|
className: "text-xs text-text-secondary",
|
|
215
215
|
children: [
|
|
216
216
|
j.rows.length,
|
|
217
217
|
" ",
|
|
218
218
|
y("bigconsole.alerts.history.count", "executions on this page")
|
|
219
219
|
]
|
|
220
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ p("div", {
|
|
221
221
|
className: "flex gap-control-gap",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ f(u, {
|
|
223
223
|
type: "button",
|
|
224
224
|
variant: "secondary",
|
|
225
225
|
size: "sm",
|
|
226
226
|
onClick: () => C((e) => e.slice(0, -1)),
|
|
227
227
|
disabled: !S.length || j.loading,
|
|
228
228
|
children: y("bigconsole.alerts.history.newer", "Newer")
|
|
229
|
-
}), /* @__PURE__ */
|
|
229
|
+
}), /* @__PURE__ */ f(u, {
|
|
230
230
|
type: "button",
|
|
231
231
|
variant: "secondary",
|
|
232
232
|
size: "sm",
|
|
@@ -4,40 +4,40 @@ import "../common/index.js";
|
|
|
4
4
|
import { AlertSeverity as n, DataSinkAlertChannel as r, DataSinkAlertConditionType as i } from "../../../generated/wspace-types.js";
|
|
5
5
|
import { Loader2 as a, Play as o, Plus as s, Save as c, Trash2 as l } from "lucide-react";
|
|
6
6
|
import { Button as u } from "@burdenoff/fe-libs/ui";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
9
|
//#region src/bigconsole/components/datasink/AlertRuleEditor.tsx
|
|
10
10
|
var m = `w-full min-w-0 rounded-control border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary ${e}`;
|
|
11
11
|
function h(h) {
|
|
12
|
-
let { t: g } =
|
|
12
|
+
let { t: g } = d(), { draft: _, channels: v, channelError: y, canUpdate: b, pending: x, previewing: S, preview: C, previewError: w, previewStale: T, error: E, onChange: D, onSave: O, onCancel: k, onPreview: A, onReloadChannels: j } = h, M = x || !b, N = v.filter((e) => e.status.toUpperCase() === "ACTIVE"), P = (e) => D({
|
|
13
13
|
..._,
|
|
14
14
|
...e
|
|
15
15
|
});
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ f(t, {
|
|
17
17
|
title: g("bigconsole.alerts.rule.title", "Alert rule"),
|
|
18
18
|
headingLevel: 2,
|
|
19
19
|
emphasis: "primary",
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ p("form", {
|
|
21
21
|
onSubmit: (e) => {
|
|
22
22
|
e.preventDefault(), O();
|
|
23
23
|
},
|
|
24
24
|
className: "flex min-w-0 flex-col gap-form-gap",
|
|
25
25
|
"aria-label": g("bigconsole.alerts.rule.form", "Alert rule editor"),
|
|
26
26
|
children: [
|
|
27
|
-
!b && /* @__PURE__ */
|
|
27
|
+
!b && /* @__PURE__ */ f("p", {
|
|
28
28
|
className: "text-sm text-text-secondary",
|
|
29
29
|
children: g("bigconsole.alerts.rule.readOnly", "You have read-only access to these alert rules.")
|
|
30
30
|
}),
|
|
31
|
-
E && /* @__PURE__ */
|
|
31
|
+
E && /* @__PURE__ */ f("p", {
|
|
32
32
|
role: "alert",
|
|
33
33
|
className: "break-words text-sm text-status-error-text",
|
|
34
34
|
children: E
|
|
35
35
|
}),
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
37
37
|
htmlFor: "alert-name",
|
|
38
38
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
39
39
|
children: g("bigconsole.alerts.rule.name", "Name")
|
|
40
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ f("input", {
|
|
41
41
|
id: "alert-name",
|
|
42
42
|
className: m,
|
|
43
43
|
value: _.name,
|
|
@@ -46,48 +46,48 @@ function h(h) {
|
|
|
46
46
|
maxLength: 200,
|
|
47
47
|
disabled: M
|
|
48
48
|
})] }),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ p("div", {
|
|
50
50
|
className: "grid min-w-0 gap-form-gap sm:grid-cols-2",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
52
52
|
htmlFor: "alert-condition-type",
|
|
53
53
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
54
54
|
children: g("bigconsole.alerts.rule.language", "Condition language")
|
|
55
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ p("select", {
|
|
56
56
|
id: "alert-condition-type",
|
|
57
57
|
className: m,
|
|
58
58
|
value: _.conditionType,
|
|
59
59
|
onChange: (e) => P({ conditionType: e.target.value === i.Jsonata ? i.Jsonata : i.Jq }),
|
|
60
60
|
disabled: M,
|
|
61
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ f("option", {
|
|
62
62
|
value: i.Jq,
|
|
63
63
|
children: "JQ"
|
|
64
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ f("option", {
|
|
65
65
|
value: i.Jsonata,
|
|
66
66
|
children: "JSONata"
|
|
67
67
|
})]
|
|
68
|
-
})] }), /* @__PURE__ */
|
|
68
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
69
69
|
htmlFor: "alert-severity",
|
|
70
70
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
71
71
|
children: g("bigconsole.alerts.rule.severity", "Severity")
|
|
72
|
-
}), /* @__PURE__ */
|
|
72
|
+
}), /* @__PURE__ */ f("select", {
|
|
73
73
|
id: "alert-severity",
|
|
74
74
|
className: m,
|
|
75
75
|
value: _.severity,
|
|
76
76
|
onChange: (e) => P({ severity: Object.values(n).find((t) => t === e.target.value) ?? n.Medium }),
|
|
77
77
|
disabled: M,
|
|
78
|
-
children: Object.values(n).map((e) => /* @__PURE__ */
|
|
78
|
+
children: Object.values(n).map((e) => /* @__PURE__ */ f("option", {
|
|
79
79
|
value: e,
|
|
80
80
|
children: g(`bigconsole.alerts.severity.${e}`, e.charAt(0).toUpperCase() + e.slice(1))
|
|
81
81
|
}, e))
|
|
82
82
|
})] })]
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ p("div", { children: [
|
|
85
|
+
/* @__PURE__ */ f("label", {
|
|
86
86
|
htmlFor: "alert-condition",
|
|
87
87
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
88
88
|
children: g("bigconsole.alerts.rule.condition", "Condition")
|
|
89
89
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ f("textarea", {
|
|
91
91
|
id: "alert-condition",
|
|
92
92
|
className: `${m} min-h-32 font-mono`,
|
|
93
93
|
value: _.condition,
|
|
@@ -97,44 +97,44 @@ function h(h) {
|
|
|
97
97
|
disabled: M,
|
|
98
98
|
"aria-describedby": "alert-condition-help"
|
|
99
99
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ f("p", {
|
|
101
101
|
id: "alert-condition-help",
|
|
102
102
|
className: "mt-2 text-xs text-text-secondary",
|
|
103
103
|
children: g("bigconsole.alerts.rule.conditionHelp", "Evaluates the entire current sink payload and must return one boolean. Preview does not send notifications.")
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ f("p", {
|
|
106
106
|
className: "mt-1 break-words text-xs text-text-muted",
|
|
107
107
|
children: _.conditionType === i.Jq ? "JQ: any(.[]; .boarding_minutes > 240)" : "JSONata: $count($[boarding_minutes > 240]) > 0"
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ p(u, {
|
|
110
110
|
type: "button",
|
|
111
111
|
variant: "secondary",
|
|
112
112
|
size: "sm",
|
|
113
113
|
onClick: A,
|
|
114
114
|
disabled: x || S || !_.condition.trim(),
|
|
115
115
|
className: "mt-3",
|
|
116
|
-
children: [S ? /* @__PURE__ */
|
|
116
|
+
children: [S ? /* @__PURE__ */ f(a, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(o, { className: "mr-2 h-4 w-4" }), S ? g("bigconsole.alerts.rule.previewing", "Evaluating…") : g("bigconsole.alerts.rule.preview", "Preview condition")]
|
|
117
117
|
}),
|
|
118
|
-
w && /* @__PURE__ */
|
|
118
|
+
w && /* @__PURE__ */ f("p", {
|
|
119
119
|
role: "alert",
|
|
120
120
|
className: "mt-2 break-words text-sm text-status-error-text",
|
|
121
121
|
children: w
|
|
122
122
|
}),
|
|
123
|
-
T && /* @__PURE__ */
|
|
123
|
+
T && /* @__PURE__ */ f("p", {
|
|
124
124
|
role: "status",
|
|
125
125
|
className: "mt-2 text-xs text-text-secondary",
|
|
126
126
|
children: g("bigconsole.alerts.rule.previewStale", "The condition or data changed. Preview again to see the current result.")
|
|
127
127
|
}),
|
|
128
|
-
C && !T && /* @__PURE__ */
|
|
128
|
+
C && !T && /* @__PURE__ */ p("div", {
|
|
129
129
|
role: "status",
|
|
130
130
|
className: "mt-3 rounded-control border border-border-subtle bg-bg-sunken p-3 text-sm",
|
|
131
|
-
children: [C.error ? /* @__PURE__ */
|
|
131
|
+
children: [C.error ? /* @__PURE__ */ f("p", {
|
|
132
132
|
className: "break-words text-status-error-text",
|
|
133
133
|
children: C.error
|
|
134
|
-
}) : /* @__PURE__ */
|
|
134
|
+
}) : /* @__PURE__ */ f("p", {
|
|
135
135
|
className: "font-medium text-text-primary",
|
|
136
136
|
children: C.matched ? g("bigconsole.alerts.rule.matched", "Condition matched") : g("bigconsole.alerts.rule.noMatch", "Condition did not match")
|
|
137
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ p("p", {
|
|
138
138
|
className: "mt-1 text-xs text-text-secondary",
|
|
139
139
|
children: [
|
|
140
140
|
g("bigconsole.alerts.rule.previewMetadata", "Evaluated data version"),
|
|
@@ -148,25 +148,25 @@ function h(h) {
|
|
|
148
148
|
})]
|
|
149
149
|
})
|
|
150
150
|
] }),
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ p("fieldset", {
|
|
152
152
|
disabled: M,
|
|
153
153
|
className: "min-w-0",
|
|
154
154
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ f("legend", {
|
|
156
156
|
className: "mb-2 text-sm font-medium text-text-primary",
|
|
157
157
|
children: g("bigconsole.alerts.rule.destinations", "Delivery destinations")
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ f("p", {
|
|
160
160
|
className: "mb-3 text-xs text-text-secondary",
|
|
161
161
|
children: g("bigconsole.alerts.rule.destinationHelp", "Choose an available active delivery channel and its actual recipient.")
|
|
162
162
|
}),
|
|
163
|
-
y && /* @__PURE__ */
|
|
163
|
+
y && /* @__PURE__ */ p("div", {
|
|
164
164
|
className: "mb-3 text-sm",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ f("p", {
|
|
166
166
|
role: "alert",
|
|
167
167
|
className: "break-words text-status-error-text",
|
|
168
168
|
children: y
|
|
169
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ f(u, {
|
|
170
170
|
type: "button",
|
|
171
171
|
variant: "secondary",
|
|
172
172
|
size: "sm",
|
|
@@ -174,18 +174,18 @@ function h(h) {
|
|
|
174
174
|
children: g("bigconsole.alerts.rule.reloadChannels", "Reload channels")
|
|
175
175
|
})]
|
|
176
176
|
}),
|
|
177
|
-
!y && N.length === 0 && /* @__PURE__ */
|
|
177
|
+
!y && N.length === 0 && /* @__PURE__ */ f("p", {
|
|
178
178
|
className: "mb-3 text-sm text-text-secondary",
|
|
179
179
|
children: g("bigconsole.alerts.rule.noChannels", "No active delivery channels are available to BigConsole in this organization. You can save this rule disabled.")
|
|
180
180
|
}),
|
|
181
|
-
!_.deliveries.length && /* @__PURE__ */
|
|
181
|
+
!_.deliveries.length && /* @__PURE__ */ f("p", {
|
|
182
182
|
className: "mb-3 text-xs text-text-muted",
|
|
183
183
|
children: g("bigconsole.alerts.rule.noDestinations", "No delivery destinations selected.")
|
|
184
184
|
}),
|
|
185
|
-
_.deliveries.map((e, t) => /* @__PURE__ */
|
|
185
|
+
_.deliveries.map((e, t) => /* @__PURE__ */ p("div", {
|
|
186
186
|
className: "mb-3 min-w-0 rounded-control border border-border-subtle p-3",
|
|
187
187
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ p("label", {
|
|
189
189
|
htmlFor: `alert-channel-${e.key}`,
|
|
190
190
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
191
191
|
children: [
|
|
@@ -194,7 +194,7 @@ function h(h) {
|
|
|
194
194
|
t + 1
|
|
195
195
|
]
|
|
196
196
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ p("select", {
|
|
198
198
|
id: `alert-channel-${e.key}`,
|
|
199
199
|
className: m,
|
|
200
200
|
value: e.channelId,
|
|
@@ -208,11 +208,11 @@ function h(h) {
|
|
|
208
208
|
} : t) });
|
|
209
209
|
},
|
|
210
210
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ f("option", {
|
|
212
212
|
value: "",
|
|
213
213
|
children: g("bigconsole.alerts.rule.chooseChannel", "Choose a configured channel")
|
|
214
214
|
}),
|
|
215
|
-
e.channelId && !N.some((t) => t.id === e.channelId) && /* @__PURE__ */
|
|
215
|
+
e.channelId && !N.some((t) => t.id === e.channelId) && /* @__PURE__ */ p("option", {
|
|
216
216
|
value: e.channelId,
|
|
217
217
|
children: [
|
|
218
218
|
g("bigconsole.alerts.rule.unavailableChannel", "Unavailable channel"),
|
|
@@ -220,7 +220,7 @@ function h(h) {
|
|
|
220
220
|
e.channelId
|
|
221
221
|
]
|
|
222
222
|
}),
|
|
223
|
-
N.map((e) => /* @__PURE__ */
|
|
223
|
+
N.map((e) => /* @__PURE__ */ p("option", {
|
|
224
224
|
value: e.id,
|
|
225
225
|
children: [
|
|
226
226
|
e.name,
|
|
@@ -230,12 +230,12 @@ function h(h) {
|
|
|
230
230
|
}, e.id))
|
|
231
231
|
]
|
|
232
232
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ f("label", {
|
|
234
234
|
htmlFor: `alert-recipient-${e.key}`,
|
|
235
235
|
className: "mb-1 mt-3 block text-xs font-medium text-text-primary",
|
|
236
236
|
children: e.channel === r.Email ? g("bigconsole.alerts.rule.emailRecipient", "Email address") : e.channel === r.Slack ? g("bigconsole.alerts.rule.slackRecipient", "Slack recipient ID") : g("bigconsole.alerts.rule.webhookRecipient", "HTTPS webhook URL")
|
|
237
237
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ f("input", {
|
|
239
239
|
id: `alert-recipient-${e.key}`,
|
|
240
240
|
className: m,
|
|
241
241
|
type: e.channel === r.Email ? "email" : e.channel === r.Webhook ? "url" : "text",
|
|
@@ -246,17 +246,17 @@ function h(h) {
|
|
|
246
246
|
} : n) }),
|
|
247
247
|
required: !0
|
|
248
248
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ p(u, {
|
|
250
250
|
type: "button",
|
|
251
251
|
variant: "ghost",
|
|
252
252
|
size: "sm",
|
|
253
253
|
onClick: () => P({ deliveries: _.deliveries.filter((t) => t.key !== e.key) }),
|
|
254
254
|
className: "mt-2",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ f(l, { className: "mr-2 h-4 w-4" }), g("bigconsole.alerts.rule.removeDestination", "Remove destination")]
|
|
256
256
|
})
|
|
257
257
|
]
|
|
258
258
|
}, e.key)),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ p(u, {
|
|
260
260
|
type: "button",
|
|
261
261
|
variant: "secondary",
|
|
262
262
|
size: "sm",
|
|
@@ -267,34 +267,34 @@ function h(h) {
|
|
|
267
267
|
recipient: ""
|
|
268
268
|
}] }),
|
|
269
269
|
disabled: N.length === 0,
|
|
270
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ f(s, { className: "mr-2 h-4 w-4" }), g("bigconsole.alerts.rule.addDestination", "Add destination")]
|
|
271
271
|
})
|
|
272
272
|
]
|
|
273
273
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ p("fieldset", {
|
|
275
275
|
disabled: M,
|
|
276
276
|
className: "min-w-0",
|
|
277
277
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ f("legend", {
|
|
279
279
|
className: "mb-2 text-sm font-medium text-text-primary",
|
|
280
280
|
children: g("bigconsole.alerts.rule.throttle", "Throttle")
|
|
281
281
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ p("label", {
|
|
283
283
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ f("input", {
|
|
285
285
|
type: "checkbox",
|
|
286
286
|
checked: _.throttleEnabled,
|
|
287
287
|
onChange: (e) => P({ throttleEnabled: e.target.checked }),
|
|
288
288
|
className: e
|
|
289
289
|
}), g("bigconsole.alerts.rule.limitFrequency", "Limit alert frequency")]
|
|
290
290
|
}),
|
|
291
|
-
_.throttleEnabled && /* @__PURE__ */
|
|
291
|
+
_.throttleEnabled && /* @__PURE__ */ p("div", {
|
|
292
292
|
className: "mt-3 grid gap-form-gap sm:grid-cols-2",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
294
294
|
htmlFor: "alert-window",
|
|
295
295
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
296
296
|
children: g("bigconsole.alerts.rule.window", "Time window (minutes)")
|
|
297
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ f("input", {
|
|
298
298
|
id: "alert-window",
|
|
299
299
|
type: "number",
|
|
300
300
|
min: 1,
|
|
@@ -303,11 +303,11 @@ function h(h) {
|
|
|
303
303
|
value: _.windowMinutes,
|
|
304
304
|
onChange: (e) => P({ windowMinutes: e.target.value }),
|
|
305
305
|
required: !0
|
|
306
|
-
})] }), /* @__PURE__ */
|
|
306
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
307
307
|
htmlFor: "alert-max",
|
|
308
308
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
309
309
|
children: g("bigconsole.alerts.rule.maxAlerts", "Maximum alerts per window")
|
|
310
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ f("input", {
|
|
311
311
|
id: "alert-max",
|
|
312
312
|
type: "number",
|
|
313
313
|
min: 1,
|
|
@@ -320,31 +320,31 @@ function h(h) {
|
|
|
320
320
|
})
|
|
321
321
|
]
|
|
322
322
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ p("label", {
|
|
324
324
|
className: "flex items-start gap-2 text-sm text-text-primary",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ f("input", {
|
|
326
326
|
type: "checkbox",
|
|
327
327
|
checked: _.enabled,
|
|
328
328
|
onChange: (e) => P({ enabled: e.target.checked }),
|
|
329
329
|
disabled: M,
|
|
330
330
|
className: `mt-1 ${e}`
|
|
331
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ p("span", { children: [g("bigconsole.alerts.rule.enabled", "Rule enabled"), /* @__PURE__ */ f("span", {
|
|
332
332
|
className: "mt-1 block text-xs text-text-secondary",
|
|
333
333
|
children: g("bigconsole.alerts.rule.enabledHelp", "Enabled rules evaluate when this sink is updated or refreshed. Saving a disabled rule does not send notifications.")
|
|
334
334
|
})] })]
|
|
335
335
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ p("div", {
|
|
337
337
|
className: "flex flex-wrap justify-end gap-control-gap border-t border-border-subtle pt-4",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ f(u, {
|
|
339
339
|
type: "button",
|
|
340
340
|
variant: "secondary",
|
|
341
341
|
onClick: k,
|
|
342
342
|
disabled: x,
|
|
343
343
|
children: g("bigconsole.alerts.rule.cancel", "Cancel")
|
|
344
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ p(u, {
|
|
345
345
|
type: "submit",
|
|
346
346
|
disabled: M,
|
|
347
|
-
children: [x ? /* @__PURE__ */
|
|
347
|
+
children: [x ? /* @__PURE__ */ f(a, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(c, { className: "mr-2 h-4 w-4" }), x ? g("bigconsole.alerts.rule.saving", "Saving…") : g("bigconsole.alerts.rule.save", "Save rule")]
|
|
348
348
|
})]
|
|
349
349
|
})
|
|
350
350
|
]
|