@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.2
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/asof/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.d.ts +4 -0
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +174 -184
- package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +13 -0
- package/dist/bigconsole/components/fleet/FleetCopySection.js +266 -0
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +8 -1
- package/dist/bigconsole/hooks/useFleetBreadcrumb.js +4 -1
- package/dist/bigconsole/hooks/useFleetChildren.d.ts +2 -0
- package/dist/bigconsole/hooks/useFleetChildren.js +10 -6
- package/dist/bigconsole/hooks/useFleetCopyActions.d.ts +23 -0
- package/dist/bigconsole/hooks/useFleetCopyActions.js +74 -0
- package/dist/bigconsole/hooks/useFleetFlags.d.ts +16 -0
- package/dist/bigconsole/hooks/useFleetFlags.js +79 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +33 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.js +41 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +292 -287
- package/dist/bigconsole/pages/DashboardsPage.js +647 -864
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/fleetFlags.d.ts +22 -0
- package/dist/bigconsole/utils/fleetFlags.js +40 -0
- package/dist/bigconsole/utils/fleetTree.d.ts +9 -0
- package/dist/bigconsole/utils/fleetTree.js +5 -1
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/dist/generated/wspace-operations.d.ts +101 -0
- package/dist/generated/wspace-operations.js +609 -90
- package/dist/generated/wspace-types.js +6 -4
- package/package.json +4 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import e from "../../../hooks/useEventWebhooks.js";
|
|
2
2
|
import { memo as t, useCallback as n, useState as r } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ThemedSelect as i } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
6
|
// src/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.tsx
|
|
6
|
-
var
|
|
7
|
+
var l = {
|
|
7
8
|
container: {
|
|
8
9
|
display: "flex",
|
|
9
10
|
flexDirection: "column",
|
|
@@ -229,208 +230,209 @@ var c = {
|
|
|
229
230
|
color: "var(--color-text-placeholder)",
|
|
230
231
|
marginTop: "4px"
|
|
231
232
|
}
|
|
232
|
-
},
|
|
233
|
-
let { t:
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
style:
|
|
233
|
+
}, u = t(function({ webhook: e, dashboardId: t, widgetId: n, onSave: o, onCancel: u, loading: d }) {
|
|
234
|
+
let { t: f } = a(), [p, m] = r(e?.eventPattern || "widget:*:clicked"), [h, g] = r(e?.webhookUrl || ""), [_, v] = r(e?.method || "POST"), [y, b] = r(e?.headers ? JSON.stringify(e.headers, null, 2) : "");
|
|
235
|
+
return /* @__PURE__ */ c("form", {
|
|
236
|
+
style: l.form,
|
|
236
237
|
onSubmit: async (r) => {
|
|
237
238
|
r.preventDefault();
|
|
238
239
|
let i;
|
|
239
|
-
if (
|
|
240
|
-
i = JSON.parse(
|
|
240
|
+
if (y.trim()) try {
|
|
241
|
+
i = JSON.parse(y);
|
|
241
242
|
} catch {
|
|
242
|
-
alert(
|
|
243
|
+
alert(f("bigconsole.widget.webhookConfig.invalidJson", "Invalid JSON in headers field"));
|
|
243
244
|
return;
|
|
244
245
|
}
|
|
245
|
-
e ? await
|
|
246
|
+
e ? await o({
|
|
246
247
|
id: e.id,
|
|
247
|
-
eventPattern:
|
|
248
|
-
webhookUrl:
|
|
249
|
-
method:
|
|
248
|
+
eventPattern: p,
|
|
249
|
+
webhookUrl: h,
|
|
250
|
+
method: _,
|
|
250
251
|
headers: i || null
|
|
251
|
-
}) : await
|
|
252
|
+
}) : await o({
|
|
252
253
|
dashboardId: t,
|
|
253
254
|
widgetId: n,
|
|
254
|
-
eventPattern:
|
|
255
|
-
webhookUrl:
|
|
256
|
-
method:
|
|
255
|
+
eventPattern: p,
|
|
256
|
+
webhookUrl: h,
|
|
257
|
+
method: _,
|
|
257
258
|
headers: i
|
|
258
259
|
});
|
|
259
260
|
},
|
|
260
261
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
style:
|
|
262
|
+
/* @__PURE__ */ c("div", {
|
|
263
|
+
style: l.formGroup,
|
|
263
264
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
style:
|
|
266
|
-
children:
|
|
265
|
+
/* @__PURE__ */ s("label", {
|
|
266
|
+
style: l.label,
|
|
267
|
+
children: f("bigconsole.widget.webhookConfig.eventPatternLabel", "Event Pattern *")
|
|
267
268
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ s("input", {
|
|
269
270
|
type: "text",
|
|
270
|
-
value:
|
|
271
|
-
onChange: (e) =>
|
|
271
|
+
value: p,
|
|
272
|
+
onChange: (e) => m(e.target.value),
|
|
272
273
|
placeholder: "widget:*:clicked",
|
|
273
|
-
style:
|
|
274
|
+
style: l.input,
|
|
274
275
|
required: !0
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
style:
|
|
278
|
-
children:
|
|
277
|
+
/* @__PURE__ */ s("p", {
|
|
278
|
+
style: l.helpText,
|
|
279
|
+
children: f("bigconsole.widget.webhookConfig.eventPatternHelp", "Use * as wildcard. Examples: widget:*:clicked, *:submit, button:save:*")
|
|
279
280
|
})
|
|
280
281
|
]
|
|
281
282
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
-
style:
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
-
style:
|
|
286
|
-
children:
|
|
287
|
-
}), /* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ c("div", {
|
|
284
|
+
style: l.formGroup,
|
|
285
|
+
children: [/* @__PURE__ */ s("label", {
|
|
286
|
+
style: l.label,
|
|
287
|
+
children: f("bigconsole.widget.webhookConfig.webhookUrlLabel", "Webhook URL *")
|
|
288
|
+
}), /* @__PURE__ */ s("input", {
|
|
288
289
|
type: "url",
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
290
|
+
value: h,
|
|
291
|
+
onChange: (e) => g(e.target.value),
|
|
291
292
|
placeholder: "https://your-api.com/webhooks/bigconsole",
|
|
292
|
-
style:
|
|
293
|
+
style: l.input,
|
|
293
294
|
required: !0
|
|
294
295
|
})]
|
|
295
296
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
style:
|
|
298
|
-
children: [/* @__PURE__ */
|
|
299
|
-
style:
|
|
300
|
-
children:
|
|
301
|
-
}), /* @__PURE__ */
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
297
|
+
/* @__PURE__ */ c("div", {
|
|
298
|
+
style: l.formGroup,
|
|
299
|
+
children: [/* @__PURE__ */ s("label", {
|
|
300
|
+
style: l.label,
|
|
301
|
+
children: f("bigconsole.widget.webhookConfig.httpMethodLabel", "HTTP Method")
|
|
302
|
+
}), /* @__PURE__ */ c(i, {
|
|
303
|
+
"aria-label": f("bigconsole.widget.webhookConfig.httpMethodLabel", "HTTP Method"),
|
|
304
|
+
value: _,
|
|
305
|
+
onChange: (e) => v(e.target.value),
|
|
306
|
+
style: l.select,
|
|
305
307
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ s("option", {
|
|
307
309
|
value: "POST",
|
|
308
310
|
children: "POST"
|
|
309
311
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ s("option", {
|
|
311
313
|
value: "PUT",
|
|
312
314
|
children: "PUT"
|
|
313
315
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ s("option", {
|
|
315
317
|
value: "PATCH",
|
|
316
318
|
children: "PATCH"
|
|
317
319
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ s("option", {
|
|
319
321
|
value: "GET",
|
|
320
322
|
children: "GET"
|
|
321
323
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ s("option", {
|
|
323
325
|
value: "DELETE",
|
|
324
326
|
children: "DELETE"
|
|
325
327
|
})
|
|
326
328
|
]
|
|
327
329
|
})]
|
|
328
330
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
style:
|
|
331
|
-
children: [/* @__PURE__ */
|
|
332
|
-
style:
|
|
333
|
-
children:
|
|
334
|
-
}), /* @__PURE__ */
|
|
335
|
-
value:
|
|
336
|
-
onChange: (e) =>
|
|
331
|
+
/* @__PURE__ */ c("div", {
|
|
332
|
+
style: l.formGroup,
|
|
333
|
+
children: [/* @__PURE__ */ s("label", {
|
|
334
|
+
style: l.label,
|
|
335
|
+
children: f("bigconsole.widget.webhookConfig.customHeadersLabel", "Custom Headers (JSON)")
|
|
336
|
+
}), /* @__PURE__ */ s("textarea", {
|
|
337
|
+
value: y,
|
|
338
|
+
onChange: (e) => b(e.target.value),
|
|
337
339
|
placeholder: "{\n \"Authorization\": \"Bearer your-token\"\n}",
|
|
338
|
-
style:
|
|
340
|
+
style: l.textarea
|
|
339
341
|
})]
|
|
340
342
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
style:
|
|
343
|
-
children: [/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ c("div", {
|
|
344
|
+
style: l.formActions,
|
|
345
|
+
children: [/* @__PURE__ */ s("button", {
|
|
344
346
|
type: "button",
|
|
345
|
-
onClick:
|
|
346
|
-
style:
|
|
347
|
-
children:
|
|
348
|
-
}), /* @__PURE__ */
|
|
347
|
+
onClick: u,
|
|
348
|
+
style: l.cancelButton,
|
|
349
|
+
children: f("bigconsole.widget.webhookConfig.cancel", "Cancel")
|
|
350
|
+
}), /* @__PURE__ */ s("button", {
|
|
349
351
|
type: "submit",
|
|
350
|
-
disabled:
|
|
351
|
-
style:
|
|
352
|
-
children:
|
|
352
|
+
disabled: d,
|
|
353
|
+
style: l.saveButton,
|
|
354
|
+
children: d ? f("bigconsole.widget.webhookConfig.saving", "Saving...") : e ? f("bigconsole.widget.webhookConfig.updateWebhook", "Update Webhook") : f("bigconsole.widget.webhookConfig.createWebhook", "Create Webhook")
|
|
353
355
|
})]
|
|
354
356
|
})
|
|
355
357
|
]
|
|
356
358
|
});
|
|
357
|
-
}),
|
|
358
|
-
let { t: f } =
|
|
359
|
-
return /* @__PURE__ */
|
|
360
|
-
style:
|
|
359
|
+
}), d = t(function({ webhook: e, onEdit: t, onDelete: n, onToggle: r, onTest: i, testResult: u, testing: d }) {
|
|
360
|
+
let { t: f } = a();
|
|
361
|
+
return /* @__PURE__ */ c("div", {
|
|
362
|
+
style: l.webhookCard,
|
|
361
363
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
style:
|
|
364
|
-
children: /* @__PURE__ */
|
|
365
|
-
style:
|
|
366
|
-
children: [/* @__PURE__ */
|
|
367
|
-
style:
|
|
364
|
+
/* @__PURE__ */ s("div", {
|
|
365
|
+
style: l.webhookHeader,
|
|
366
|
+
children: /* @__PURE__ */ c("div", {
|
|
367
|
+
style: l.webhookTitle,
|
|
368
|
+
children: [/* @__PURE__ */ s("span", {
|
|
369
|
+
style: l.webhookName,
|
|
368
370
|
children: e.eventPattern
|
|
369
|
-
}), /* @__PURE__ */
|
|
371
|
+
}), /* @__PURE__ */ s("span", {
|
|
370
372
|
style: {
|
|
371
|
-
...
|
|
372
|
-
...e.isActive ?
|
|
373
|
+
...l.statusBadge,
|
|
374
|
+
...e.isActive ? l.activeBadge : l.inactiveBadge
|
|
373
375
|
},
|
|
374
376
|
children: e.isActive ? f("bigconsole.widget.webhookConfig.active", "Active") : f("bigconsole.widget.webhookConfig.inactive", "Inactive")
|
|
375
377
|
})]
|
|
376
378
|
})
|
|
377
379
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
style:
|
|
380
|
+
/* @__PURE__ */ c("div", {
|
|
381
|
+
style: l.webhookDetails,
|
|
380
382
|
children: [
|
|
381
383
|
f("bigconsole.widget.webhookConfig.methodLabel", "Method:"),
|
|
382
384
|
" ",
|
|
383
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ s("strong", { children: e.method })
|
|
384
386
|
]
|
|
385
387
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
style:
|
|
388
|
+
/* @__PURE__ */ s("div", {
|
|
389
|
+
style: l.webhookUrl,
|
|
388
390
|
children: e.webhookUrl
|
|
389
391
|
}),
|
|
390
|
-
u && /* @__PURE__ */
|
|
392
|
+
u && /* @__PURE__ */ s("div", {
|
|
391
393
|
role: "status",
|
|
392
394
|
style: {
|
|
393
|
-
...
|
|
394
|
-
...u.success ?
|
|
395
|
+
...l.testResult,
|
|
396
|
+
...u.success ? l.testSuccess : l.testFailure
|
|
395
397
|
},
|
|
396
|
-
children: u.success ? /* @__PURE__ */ o
|
|
398
|
+
children: u.success ? /* @__PURE__ */ s(o, { children: f("bigconsole.widget.webhookConfig.testSuccess", "Test successful! Status: {{statusCode}}, Latency: {{latencyMs}}ms", {
|
|
397
399
|
statusCode: u.statusCode ?? "",
|
|
398
400
|
latencyMs: u.latencyMs ?? ""
|
|
399
|
-
}) }) : /* @__PURE__ */ o
|
|
401
|
+
}) }) : /* @__PURE__ */ s(o, { children: f("bigconsole.widget.webhookConfig.testFailure", "Test failed: {{error}}", { error: u.errorMessage || f("bigconsole.widget.webhookConfig.unknownError", "Unknown error") }) })
|
|
400
402
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
style:
|
|
403
|
+
/* @__PURE__ */ c("div", {
|
|
404
|
+
style: l.webhookActions,
|
|
403
405
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ s("button", {
|
|
405
407
|
onClick: t,
|
|
406
408
|
style: {
|
|
407
|
-
...
|
|
408
|
-
...
|
|
409
|
+
...l.actionButton,
|
|
410
|
+
...l.editButton
|
|
409
411
|
},
|
|
410
412
|
children: f("bigconsole.widget.webhookConfig.edit", "Edit")
|
|
411
413
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
onClick:
|
|
414
|
+
/* @__PURE__ */ s("button", {
|
|
415
|
+
onClick: i,
|
|
414
416
|
disabled: d,
|
|
415
417
|
style: {
|
|
416
|
-
...
|
|
417
|
-
...
|
|
418
|
+
...l.actionButton,
|
|
419
|
+
...l.testButton
|
|
418
420
|
},
|
|
419
421
|
children: d ? f("bigconsole.widget.webhookConfig.testing", "Testing...") : f("bigconsole.widget.webhookConfig.test", "Test")
|
|
420
422
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ s("button", {
|
|
422
424
|
onClick: r,
|
|
423
425
|
style: {
|
|
424
|
-
...
|
|
425
|
-
...
|
|
426
|
+
...l.actionButton,
|
|
427
|
+
...l.toggleButton
|
|
426
428
|
},
|
|
427
429
|
children: e.isActive ? f("bigconsole.widget.webhookConfig.disable", "Disable") : f("bigconsole.widget.webhookConfig.enable", "Enable")
|
|
428
430
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ s("button", {
|
|
430
432
|
onClick: n,
|
|
431
433
|
style: {
|
|
432
|
-
...
|
|
433
|
-
...
|
|
434
|
+
...l.actionButton,
|
|
435
|
+
...l.deleteButton
|
|
434
436
|
},
|
|
435
437
|
children: f("bigconsole.widget.webhookConfig.delete", "Delete")
|
|
436
438
|
})
|
|
@@ -438,22 +440,22 @@ var c = {
|
|
|
438
440
|
})
|
|
439
441
|
]
|
|
440
442
|
});
|
|
441
|
-
}),
|
|
442
|
-
let { t: p } =
|
|
443
|
+
}), f = t(function({ dashboardId: t, widgetId: i, onWebhookCreated: o, onWebhookDeleted: f }) {
|
|
444
|
+
let { t: p } = a(), [m, h] = r(!1), [g, _] = r(null), [v, y] = r({}), [b, x] = r(null), { webhooks: S, loading: C, error: w, refetch: T, createWebhook: E, updateWebhook: D, deleteWebhook: O, toggleWebhook: k, testWebhook: A } = e({
|
|
443
445
|
dashboardId: t,
|
|
444
|
-
widgetId:
|
|
446
|
+
widgetId: i
|
|
445
447
|
}), j = n(async (e) => {
|
|
446
448
|
if (!w) {
|
|
447
449
|
if ("id" in e) await D(e) && (_(null), h(!1));
|
|
448
450
|
else {
|
|
449
451
|
let t = await E(e);
|
|
450
|
-
t && (h(!1),
|
|
452
|
+
t && (h(!1), o?.(t));
|
|
451
453
|
}
|
|
452
454
|
}
|
|
453
455
|
}, [
|
|
454
456
|
E,
|
|
455
457
|
D,
|
|
456
|
-
|
|
458
|
+
o,
|
|
457
459
|
w
|
|
458
460
|
]), M = n(async (e) => {
|
|
459
461
|
confirm(p("bigconsole.widget.webhookConfig.deleteConfirm", "Are you sure you want to delete this webhook?")) && await O(e) && f?.(e);
|
|
@@ -475,58 +477,58 @@ var c = {
|
|
|
475
477
|
}, []), I = n(() => {
|
|
476
478
|
h(!1), _(null);
|
|
477
479
|
}, []);
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
-
style:
|
|
480
|
+
return /* @__PURE__ */ c("div", {
|
|
481
|
+
style: l.container,
|
|
480
482
|
"data-testid": "webhook-config-panel",
|
|
481
483
|
children: [
|
|
482
|
-
!m && !w && /* @__PURE__ */
|
|
483
|
-
style:
|
|
484
|
-
children: /* @__PURE__ */
|
|
484
|
+
!m && !w && /* @__PURE__ */ s("div", {
|
|
485
|
+
style: l.header,
|
|
486
|
+
children: /* @__PURE__ */ s("button", {
|
|
485
487
|
type: "button",
|
|
486
488
|
onClick: () => h(!0),
|
|
487
|
-
style:
|
|
489
|
+
style: l.addButton,
|
|
488
490
|
children: p("bigconsole.widget.webhookConfig.addWebhook", "+ Add Webhook")
|
|
489
491
|
})
|
|
490
492
|
}),
|
|
491
|
-
m && !w && /* @__PURE__ */
|
|
493
|
+
m && !w && /* @__PURE__ */ s(u, {
|
|
492
494
|
webhook: g || void 0,
|
|
493
495
|
dashboardId: t,
|
|
494
|
-
widgetId:
|
|
496
|
+
widgetId: i,
|
|
495
497
|
onSave: j,
|
|
496
498
|
onCancel: I,
|
|
497
499
|
loading: C
|
|
498
500
|
}),
|
|
499
|
-
w ? /* @__PURE__ */
|
|
501
|
+
w ? /* @__PURE__ */ c("div", {
|
|
500
502
|
role: "alert",
|
|
501
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ s("p", { children: p("bigconsole.widget.webhookConfig.loadError", "Webhook mappings could not be verified.") }), /* @__PURE__ */ s("button", {
|
|
502
504
|
type: "button",
|
|
503
505
|
disabled: C,
|
|
504
506
|
onClick: () => void T().catch(() => {}),
|
|
505
507
|
children: p("bigconsole.widget.webhookConfig.retry", "Retry")
|
|
506
508
|
})]
|
|
507
|
-
}) : C && S.length === 0 ? /* @__PURE__ */
|
|
508
|
-
style:
|
|
509
|
+
}) : C && S.length === 0 ? /* @__PURE__ */ s("div", {
|
|
510
|
+
style: l.emptyState,
|
|
509
511
|
role: "status",
|
|
510
|
-
children: /* @__PURE__ */
|
|
511
|
-
style:
|
|
512
|
+
children: /* @__PURE__ */ s("p", {
|
|
513
|
+
style: l.emptyTitle,
|
|
512
514
|
children: p("bigconsole.widget.webhookConfig.loading", "Loading...")
|
|
513
515
|
})
|
|
514
|
-
}) : S.length === 0 ? /* @__PURE__ */
|
|
515
|
-
style:
|
|
516
|
+
}) : S.length === 0 ? /* @__PURE__ */ c("div", {
|
|
517
|
+
style: l.emptyState,
|
|
516
518
|
role: "status",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
518
|
-
style:
|
|
519
|
+
children: [/* @__PURE__ */ s("p", {
|
|
520
|
+
style: l.emptyTitle,
|
|
519
521
|
children: p("bigconsole.widget.webhookConfig.noWebhooks", "No webhooks configured")
|
|
520
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ s("p", {
|
|
521
523
|
style: {
|
|
522
524
|
fontSize: "var(--font-size-body-sm)",
|
|
523
525
|
marginTop: "8px"
|
|
524
526
|
},
|
|
525
527
|
children: p("bigconsole.widget.webhookConfig.noWebhooksHelp", "Add a webhook to receive events when actions are triggered.")
|
|
526
528
|
})]
|
|
527
|
-
}) : /* @__PURE__ */
|
|
528
|
-
style:
|
|
529
|
-
children: S.map((e) => /* @__PURE__ */
|
|
529
|
+
}) : /* @__PURE__ */ s("div", {
|
|
530
|
+
style: l.webhookList,
|
|
531
|
+
children: S.map((e) => /* @__PURE__ */ s(d, {
|
|
530
532
|
webhook: e,
|
|
531
533
|
onEdit: () => F(e),
|
|
532
534
|
onDelete: () => M(e.id),
|
|
@@ -539,4 +541,4 @@ var c = {
|
|
|
539
541
|
]
|
|
540
542
|
});
|
|
541
543
|
});
|
|
542
|
-
export {
|
|
544
|
+
export { f as WebhookConfigPanel, f as default };
|