@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,145 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useOptionalBigConsole as e } from "../../../context/BigConsoleContext.js";
|
|
2
|
+
import "../../../context/index.js";
|
|
3
|
+
import { currentAppOrigin as t, resolveFrameSrc as n } from "../../../utils/safeUrl.js";
|
|
4
|
+
import { asNonEmptyString as r, asRecord as i } from "./utils.js";
|
|
5
|
+
import { getCustomConfigContent as a } from "./config.js";
|
|
6
|
+
import { sanitizeWidgetHtml as o } from "../../../utils/sanitizeHtml.js";
|
|
7
|
+
import { FRAME_REFERRER_POLICY as s, FRAME_SANDBOX as c, frameKey as l } from "../iframe-widget/framePolicy.js";
|
|
8
|
+
import { memo as u, useMemo as d } from "react";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
10
|
//#region src/bigconsole/components/widgets/custom/CustomWidget.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function l(e) {
|
|
19
|
-
let t = e.trim();
|
|
20
|
-
if (!t) return !1;
|
|
21
|
-
if (t.startsWith("#")) return !0;
|
|
22
|
-
if (t.startsWith("/")) return !t.startsWith("//");
|
|
23
|
-
try {
|
|
24
|
-
let e = new URL(t, window.location.origin);
|
|
25
|
-
return e.protocol === "http:" || e.protocol === "https:";
|
|
26
|
-
} catch {
|
|
27
|
-
return !1;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function u(e) {
|
|
31
|
-
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
32
|
-
}
|
|
33
|
-
function d(e) {
|
|
34
|
-
if (typeof window > "u") return u(e);
|
|
35
|
-
let t = new DOMParser().parseFromString(e, "text/html");
|
|
36
|
-
return t.body.querySelectorAll("script, style, iframe, object, embed, link, meta, base, form").forEach((e) => {
|
|
37
|
-
e.remove();
|
|
38
|
-
}), t.body.querySelectorAll("*").forEach((e) => {
|
|
39
|
-
Array.from(e.attributes).forEach((t) => {
|
|
40
|
-
let n = t.name.toLowerCase(), r = t.value.trim();
|
|
41
|
-
if (n.startsWith("on")) {
|
|
42
|
-
e.removeAttribute(t.name);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (n === "style") {
|
|
46
|
-
e.removeAttribute(t.name);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
[
|
|
50
|
-
"src",
|
|
51
|
-
"href",
|
|
52
|
-
"xlink:href"
|
|
53
|
-
].includes(n) && !l(r) && e.removeAttribute(t.name);
|
|
11
|
+
var m = u(function({ widget: u, data: m, render: h, onClick: g }) {
|
|
12
|
+
let _ = u.config, v = !!(g && u.drilldowns?.length), y = d(() => i(m), [m]), b = d(() => i(_), [_]), x = d(() => i(b?.props), [b]), S = d(() => a(_), [_]), C = S.componentId, w = e()?.iframeAllowedOrigins, T = d(() => {
|
|
13
|
+
let e = r(y?.html) ?? r(y?.contentHtml) ?? S.html;
|
|
14
|
+
if (!e) return null;
|
|
15
|
+
let t = o(e);
|
|
16
|
+
return t.trim().length > 0 ? t : null;
|
|
17
|
+
}, [y, S]), E = d(() => {
|
|
18
|
+
let e = r(y?.iframeUrl) ?? r(y?.url) ?? S.iframeUrl;
|
|
19
|
+
if (!e) return null;
|
|
20
|
+
let i = n(e, {
|
|
21
|
+
appOrigin: t(),
|
|
22
|
+
allowedOrigins: w
|
|
54
23
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
try {
|
|
62
|
-
let e = new URL(t);
|
|
63
|
-
if (e.protocol === "http:" || e.protocol === "https:") return e.href;
|
|
64
|
-
} catch {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
function p(e) {
|
|
70
|
-
if (!e) return s;
|
|
71
|
-
let t = new Set(e.split(/\s+/).filter(Boolean)), n = Array.from(t).filter((e) => c.has(e)), r = n.includes("allow-scripts"), i = n.includes("allow-same-origin"), a = r && i ? n.filter((e) => e !== "allow-same-origin") : n;
|
|
72
|
-
return a.length > 0 ? a.join(" ") : s;
|
|
73
|
-
}
|
|
74
|
-
var m = r(function({ widget: r, data: s, render: c, onClick: l }) {
|
|
75
|
-
let u = r.config, m = !!(l && r.drilldowns?.length), h = i(() => t(s), [s]), g = i(() => t(u), [u]), _ = i(() => t(g?.props), [g]), v = i(() => n(u), [u]), y = v.componentId, b = i(() => {
|
|
76
|
-
let t = e(h?.html) ?? e(h?.contentHtml) ?? v.html;
|
|
77
|
-
if (!t) return null;
|
|
78
|
-
let n = d(t);
|
|
79
|
-
return n.trim().length > 0 ? n : null;
|
|
80
|
-
}, [h, v]), x = i(() => {
|
|
81
|
-
let t = e(h?.iframeUrl) ?? e(h?.url) ?? v.iframeUrl;
|
|
82
|
-
if (!t) return null;
|
|
83
|
-
let n = f(t);
|
|
84
|
-
return n ? {
|
|
85
|
-
url: n,
|
|
86
|
-
title: e(h?.title) ?? e(_?.iframeTitle) ?? e(_?.title) ?? r.title ?? "Custom widget content",
|
|
87
|
-
sandbox: p(e(g?.sandbox) ?? e(_?.sandbox))
|
|
88
|
-
} : null;
|
|
24
|
+
if (!i.ok) return null;
|
|
25
|
+
let a = r(y?.title) ?? r(x?.iframeTitle) ?? r(x?.title) ?? u.title ?? "Custom widget content";
|
|
26
|
+
return {
|
|
27
|
+
url: i.src,
|
|
28
|
+
title: a
|
|
29
|
+
};
|
|
89
30
|
}, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
31
|
+
y,
|
|
32
|
+
S,
|
|
33
|
+
x,
|
|
34
|
+
u.title,
|
|
35
|
+
w
|
|
95
36
|
]);
|
|
96
|
-
if (
|
|
37
|
+
if (h) return /* @__PURE__ */ f("div", {
|
|
97
38
|
className: `
|
|
98
39
|
h-full
|
|
99
|
-
${
|
|
40
|
+
${v ? "cursor-pointer" : ""}
|
|
100
41
|
`,
|
|
101
|
-
onClick:
|
|
102
|
-
children:
|
|
42
|
+
onClick: g,
|
|
43
|
+
children: h(u, m)
|
|
103
44
|
});
|
|
104
|
-
if (
|
|
45
|
+
if (T) return /* @__PURE__ */ f("div", {
|
|
105
46
|
className: "h-full overflow-auto p-4",
|
|
106
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ f("div", {
|
|
107
48
|
className: "prose prose-sm max-w-none text-text-primary",
|
|
108
|
-
dangerouslySetInnerHTML: { __html:
|
|
49
|
+
dangerouslySetInnerHTML: { __html: T }
|
|
109
50
|
})
|
|
110
51
|
});
|
|
111
|
-
if (
|
|
52
|
+
if (E) return /* @__PURE__ */ f("div", {
|
|
112
53
|
className: "h-full w-full",
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
-
|
|
115
|
-
|
|
54
|
+
children: /* @__PURE__ */ f("iframe", {
|
|
55
|
+
sandbox: c,
|
|
56
|
+
referrerPolicy: s,
|
|
57
|
+
loading: "lazy",
|
|
58
|
+
title: E.title,
|
|
116
59
|
className: "h-full w-full rounded border-0",
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})
|
|
60
|
+
src: E.url
|
|
61
|
+
}, l(E.url, c))
|
|
120
62
|
});
|
|
121
|
-
if (
|
|
122
|
-
let e =
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
className: `flex flex-col items-center justify-center h-full p-4 ${
|
|
125
|
-
onClick:
|
|
63
|
+
if (y && "value" in y) {
|
|
64
|
+
let e = y.value, t = y.label || u.title, n = y.data;
|
|
65
|
+
return /* @__PURE__ */ p("div", {
|
|
66
|
+
className: `flex flex-col items-center justify-center h-full p-4 ${v ? "cursor-pointer hover:bg-bg-sunken/50 transition-colors" : ""}`,
|
|
67
|
+
onClick: g,
|
|
126
68
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ f("div", {
|
|
128
70
|
className: "text-4xl font-bold text-text-primary tabular-nums",
|
|
129
71
|
children: typeof e == "number" ? e.toLocaleString() : String(e)
|
|
130
72
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ f("div", {
|
|
132
74
|
className: "text-sm text-text-secondary mt-1",
|
|
133
75
|
children: t
|
|
134
76
|
}),
|
|
135
|
-
n && /* @__PURE__ */
|
|
77
|
+
n && /* @__PURE__ */ f("div", {
|
|
136
78
|
className: "mt-3 w-full grid grid-cols-2 gap-2 text-xs text-text-secondary",
|
|
137
|
-
children: Object.entries(n).filter(([e]) => e !== "value" && e !== "label" && typeof n[e] != "object").slice(0, 4).map(([e, t]) => /* @__PURE__ */
|
|
79
|
+
children: Object.entries(n).filter(([e]) => e !== "value" && e !== "label" && typeof n[e] != "object").slice(0, 4).map(([e, t]) => /* @__PURE__ */ p("div", {
|
|
138
80
|
className: "flex justify-between px-2 py-1 bg-bg-sunken rounded",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ f("span", {
|
|
140
82
|
className: "capitalize",
|
|
141
83
|
children: e.replace(/([A-Z])/g, " $1").trim()
|
|
142
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ f("span", {
|
|
143
85
|
className: "font-medium",
|
|
144
86
|
children: typeof t == "number" ? t.toLocaleString() : String(t)
|
|
145
87
|
})]
|
|
@@ -148,21 +90,21 @@ var m = r(function({ widget: r, data: s, render: c, onClick: l }) {
|
|
|
148
90
|
]
|
|
149
91
|
});
|
|
150
92
|
}
|
|
151
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ p("div", {
|
|
152
94
|
className: `
|
|
153
95
|
flex flex-col items-center justify-center h-full p-4
|
|
154
|
-
${
|
|
96
|
+
${v ? "cursor-pointer hover:bg-bg-sunken/50 transition-colors" : ""}
|
|
155
97
|
`,
|
|
156
|
-
onClick:
|
|
98
|
+
onClick: g,
|
|
157
99
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ f("div", {
|
|
159
101
|
className: "w-16 h-16 mb-4 flex items-center justify-center rounded-lg bg-bg-sunken",
|
|
160
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ f("svg", {
|
|
161
103
|
className: "w-8 h-8 text-text-secondary",
|
|
162
104
|
fill: "none",
|
|
163
105
|
stroke: "currentColor",
|
|
164
106
|
viewBox: "0 0 24 24",
|
|
165
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ f("path", {
|
|
166
108
|
strokeLinecap: "round",
|
|
167
109
|
strokeLinejoin: "round",
|
|
168
110
|
strokeWidth: 2,
|
|
@@ -170,26 +112,26 @@ var m = r(function({ widget: r, data: s, render: c, onClick: l }) {
|
|
|
170
112
|
})
|
|
171
113
|
})
|
|
172
114
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ f("h4", {
|
|
174
116
|
className: "text-sm font-medium text-text-primary mb-1",
|
|
175
117
|
children: "Custom Widget"
|
|
176
118
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ f("p", {
|
|
178
120
|
className: "text-xs text-text-secondary text-center max-w-[200px]",
|
|
179
|
-
children:
|
|
121
|
+
children: _?.description || "Provide HTML, an iframe URL, or a registered custom component."
|
|
180
122
|
}),
|
|
181
|
-
|
|
123
|
+
C ? /* @__PURE__ */ p("p", {
|
|
182
124
|
className: "text-xs text-text-secondary mt-2",
|
|
183
|
-
children: ["Component: ", /* @__PURE__ */
|
|
125
|
+
children: ["Component: ", /* @__PURE__ */ f("code", {
|
|
184
126
|
className: "font-mono",
|
|
185
|
-
children:
|
|
127
|
+
children: C
|
|
186
128
|
})]
|
|
187
129
|
}) : null,
|
|
188
|
-
|
|
130
|
+
m ? /* @__PURE__ */ f("div", {
|
|
189
131
|
className: "mt-4 w-full max-h-[100px] overflow-auto",
|
|
190
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ f("pre", {
|
|
191
133
|
className: "text-xs text-text-secondary bg-bg-sunken p-2 rounded",
|
|
192
|
-
children: JSON.stringify(
|
|
134
|
+
children: JSON.stringify(m, null, 2)
|
|
193
135
|
})
|
|
194
136
|
}) : null
|
|
195
137
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { getEventStatusColor as t, getEventStatusIcon as n, getEventStatusLabel as r } from "../../../hooks/useEventLogs.js";
|
|
2
2
|
import { memo as i, useCallback as a, useState as o } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
5
|
//#region src/bigconsole/components/widgets/event-logs/EventLogViewer.tsx
|
|
6
6
|
var d = {
|
|
7
7
|
container: {
|
|
@@ -165,27 +165,27 @@ function p(e, t) {
|
|
|
165
165
|
return i < 1 ? t("bigconsole.widget.eventLog.time.justNow", "Just now") : i < 60 ? t("bigconsole.widget.eventLog.time.minutesAgo", "{{count}}m ago", { count: i }) : a < 24 ? t("bigconsole.widget.eventLog.time.hoursAgo", "{{count}}h ago", { count: a }) : o < 7 ? t("bigconsole.widget.eventLog.time.daysAgo", "{{count}}d ago", { count: o }) : n.toLocaleDateString();
|
|
166
166
|
}
|
|
167
167
|
var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpand: m }) {
|
|
168
|
-
let { t: h } =
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
168
|
+
let { t: h } = u(), g = e.status === "FAILED";
|
|
169
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("tr", { children: [
|
|
170
|
+
/* @__PURE__ */ c("td", {
|
|
171
171
|
style: d.td,
|
|
172
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ c("button", {
|
|
173
173
|
type: "button",
|
|
174
174
|
onClick: m,
|
|
175
175
|
"aria-expanded": o,
|
|
176
176
|
"aria-label": o ? "Hide event payload" : "Show event payload",
|
|
177
177
|
style: d.expandButton,
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ c("span", {
|
|
179
179
|
"aria-hidden": "true",
|
|
180
180
|
children: o ? "▾" : "▸"
|
|
181
181
|
})
|
|
182
182
|
})
|
|
183
183
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ c("td", {
|
|
185
185
|
style: d.td,
|
|
186
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ l("div", {
|
|
187
187
|
style: d.statusCell,
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ c("span", { children: n(e.status) }), /* @__PURE__ */ c("span", {
|
|
189
189
|
style: {
|
|
190
190
|
...d.statusBadge,
|
|
191
191
|
backgroundColor: `${t(e.status)}20`,
|
|
@@ -195,12 +195,12 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
195
195
|
})]
|
|
196
196
|
})
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ l("td", {
|
|
199
199
|
style: d.td,
|
|
200
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ c("div", {
|
|
201
201
|
style: d.eventName,
|
|
202
202
|
children: e.eventName
|
|
203
|
-
}), e.actionName && /* @__PURE__ */
|
|
203
|
+
}), e.actionName && /* @__PURE__ */ c("div", {
|
|
204
204
|
style: {
|
|
205
205
|
fontSize: "11px",
|
|
206
206
|
color: "var(--color-text-muted)"
|
|
@@ -208,22 +208,22 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
208
208
|
children: h("bigconsole.widget.eventLog.actionLabel", "Action: {{action}}", { action: e.actionName ?? "" })
|
|
209
209
|
})]
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ c("td", {
|
|
212
212
|
style: d.td,
|
|
213
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ c("div", {
|
|
214
214
|
style: d.timeAgo,
|
|
215
215
|
children: p(e.createdAt, h)
|
|
216
216
|
})
|
|
217
217
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ c("td", {
|
|
219
219
|
style: d.td,
|
|
220
|
-
children: e.webhookUrl ? /* @__PURE__ */
|
|
220
|
+
children: e.webhookUrl ? /* @__PURE__ */ c("span", {
|
|
221
221
|
style: {
|
|
222
222
|
fontSize: "12px",
|
|
223
223
|
color: "var(--color-text-muted)"
|
|
224
224
|
},
|
|
225
225
|
children: f(e.webhookUrl)
|
|
226
|
-
}) : /* @__PURE__ */
|
|
226
|
+
}) : /* @__PURE__ */ c("span", {
|
|
227
227
|
style: {
|
|
228
228
|
fontSize: "var(--font-size-body-sm)",
|
|
229
229
|
color: "var(--color-text-muted)"
|
|
@@ -231,9 +231,9 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
231
231
|
children: "—"
|
|
232
232
|
})
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ c("td", {
|
|
235
235
|
style: d.td,
|
|
236
|
-
children: g && /* @__PURE__ */
|
|
236
|
+
children: g && /* @__PURE__ */ c("button", {
|
|
237
237
|
type: "button",
|
|
238
238
|
onClick: i,
|
|
239
239
|
disabled: a,
|
|
@@ -241,34 +241,34 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
241
241
|
children: a ? h("bigconsole.widget.eventLog.retrying", "Retrying…") : h("bigconsole.widget.eventLog.retry", "Retry")
|
|
242
242
|
})
|
|
243
243
|
})
|
|
244
|
-
] }), o && /* @__PURE__ */
|
|
244
|
+
] }), o && /* @__PURE__ */ c("tr", {
|
|
245
245
|
style: d.detailRow,
|
|
246
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ c("td", {
|
|
247
247
|
colSpan: 6,
|
|
248
248
|
style: d.td,
|
|
249
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ l("div", {
|
|
250
250
|
style: d.detailContent,
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ c("strong", { children: h("bigconsole.widget.eventLog.payload", "Payload:") }),
|
|
253
253
|
"\n",
|
|
254
254
|
JSON.stringify(e.payload, null, 2),
|
|
255
|
-
e.errorMessage && /* @__PURE__ */
|
|
255
|
+
e.errorMessage && /* @__PURE__ */ l(s, { children: [
|
|
256
256
|
"\n\n",
|
|
257
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ c("strong", {
|
|
258
258
|
style: { color: "var(--color-status-error-text)" },
|
|
259
259
|
children: h("bigconsole.widget.eventLog.error", "Error:")
|
|
260
260
|
}),
|
|
261
261
|
"\n",
|
|
262
262
|
e.errorMessage
|
|
263
263
|
] }),
|
|
264
|
-
e.responseCode && /* @__PURE__ */
|
|
264
|
+
e.responseCode && /* @__PURE__ */ l(s, { children: [
|
|
265
265
|
"\n\n",
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ c("strong", { children: h("bigconsole.widget.eventLog.responseCode", "Response Code:") }),
|
|
267
267
|
" ",
|
|
268
268
|
e.responseCode
|
|
269
269
|
] }),
|
|
270
270
|
"\n\n",
|
|
271
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ c("strong", { children: h("bigconsole.widget.eventLog.attempts", "Attempts:") }),
|
|
272
272
|
" ",
|
|
273
273
|
e.attempts
|
|
274
274
|
]
|
|
@@ -276,7 +276,7 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
276
276
|
})
|
|
277
277
|
})] });
|
|
278
278
|
}), h = i(function({ dashboardId: t, widgetId: n, maxHeight: r = "400px", onRetrySuccess: i }) {
|
|
279
|
-
let { t: f } =
|
|
279
|
+
let { t: f } = u(), [p, h] = o(""), [g, _] = o(/* @__PURE__ */ new Set()), [v, y] = o(null), { logs: b, loading: x, totalCount: S, hasMore: C, loadMore: w, retryDelivery: T, refetch: E } = e({
|
|
280
280
|
dashboardId: t,
|
|
281
281
|
widgetId: n,
|
|
282
282
|
status: p || void 0
|
|
@@ -290,59 +290,59 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
290
290
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
291
291
|
});
|
|
292
292
|
}, []);
|
|
293
|
-
return /* @__PURE__ */
|
|
293
|
+
return /* @__PURE__ */ l("div", {
|
|
294
294
|
style: d.container,
|
|
295
295
|
"data-testid": "event-log-viewer",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ l("div", {
|
|
297
297
|
style: d.header,
|
|
298
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("span", {
|
|
299
299
|
style: d.totalCount,
|
|
300
300
|
children: f("bigconsole.widget.eventLog.eventCount", "{{count}} events", { count: S })
|
|
301
|
-
}) }), /* @__PURE__ */
|
|
301
|
+
}) }), /* @__PURE__ */ l("div", {
|
|
302
302
|
style: d.headerActions,
|
|
303
303
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ c("label", {
|
|
305
305
|
htmlFor: "event-log-status-filter",
|
|
306
306
|
className: "sr-only",
|
|
307
307
|
children: "Filter events by status"
|
|
308
308
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ l("select", {
|
|
310
310
|
id: "event-log-status-filter",
|
|
311
311
|
value: p,
|
|
312
312
|
onChange: (e) => h(e.target.value),
|
|
313
313
|
style: d.filterSelect,
|
|
314
314
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ c("option", {
|
|
316
316
|
value: "",
|
|
317
317
|
children: f("bigconsole.widget.eventLog.filter.all", "All Status")
|
|
318
318
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ c("option", {
|
|
320
320
|
value: "DELIVERED",
|
|
321
321
|
children: f("bigconsole.widget.eventLog.filter.delivered", "Delivered")
|
|
322
322
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ c("option", {
|
|
324
324
|
value: "FAILED",
|
|
325
325
|
children: f("bigconsole.widget.eventLog.filter.failed", "Failed")
|
|
326
326
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ c("option", {
|
|
328
328
|
value: "PENDING",
|
|
329
329
|
children: f("bigconsole.widget.eventLog.filter.pending", "Pending")
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ c("option", {
|
|
332
332
|
value: "PROCESSING",
|
|
333
333
|
children: f("bigconsole.widget.eventLog.filter.processing", "Processing")
|
|
334
334
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ c("option", {
|
|
336
336
|
value: "RETRYING",
|
|
337
337
|
children: f("bigconsole.widget.eventLog.filter.retrying", "Retrying")
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ c("option", {
|
|
340
340
|
value: "IGNORED",
|
|
341
341
|
children: f("bigconsole.widget.eventLog.filter.ignored", "Ignored")
|
|
342
342
|
})
|
|
343
343
|
]
|
|
344
344
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ c("button", {
|
|
346
346
|
type: "button",
|
|
347
347
|
onClick: () => E(),
|
|
348
348
|
style: d.refreshButton,
|
|
@@ -350,58 +350,58 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
350
350
|
})
|
|
351
351
|
]
|
|
352
352
|
})]
|
|
353
|
-
}), x && b.length === 0 ? /* @__PURE__ */
|
|
353
|
+
}), x && b.length === 0 ? /* @__PURE__ */ c("div", {
|
|
354
354
|
style: d.emptyState,
|
|
355
355
|
role: "status",
|
|
356
|
-
children: /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ c("p", {
|
|
357
357
|
style: d.emptyTitle,
|
|
358
358
|
children: f("bigconsole.widget.eventLog.loading", "Loading...")
|
|
359
359
|
})
|
|
360
|
-
}) : b.length === 0 ? /* @__PURE__ */
|
|
360
|
+
}) : b.length === 0 ? /* @__PURE__ */ l("div", {
|
|
361
361
|
style: d.emptyState,
|
|
362
362
|
role: "status",
|
|
363
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ c("p", {
|
|
364
364
|
style: d.emptyTitle,
|
|
365
365
|
children: f("bigconsole.widget.eventLog.emptyTitle", "No events found")
|
|
366
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ c("p", {
|
|
367
367
|
style: {
|
|
368
368
|
fontSize: "var(--font-size-body-sm)",
|
|
369
369
|
marginTop: "8px"
|
|
370
370
|
},
|
|
371
371
|
children: f("bigconsole.widget.eventLog.emptyHint", "Events will appear here when actions are triggered.")
|
|
372
372
|
})]
|
|
373
|
-
}) : /* @__PURE__ */
|
|
373
|
+
}) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
|
|
374
374
|
style: {
|
|
375
375
|
...d.tableContainer,
|
|
376
376
|
maxHeight: r,
|
|
377
377
|
overflowY: "auto"
|
|
378
378
|
},
|
|
379
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ l("table", {
|
|
380
380
|
style: d.table,
|
|
381
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ c("thead", {
|
|
382
382
|
style: d.tableHeader,
|
|
383
|
-
children: /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
383
|
+
children: /* @__PURE__ */ l("tr", { children: [
|
|
384
|
+
/* @__PURE__ */ c("th", { style: {
|
|
385
385
|
...d.th,
|
|
386
386
|
width: "40px"
|
|
387
387
|
} }),
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ c("th", {
|
|
389
389
|
style: d.th,
|
|
390
390
|
children: f("bigconsole.widget.eventLog.column.status", "Status")
|
|
391
391
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ c("th", {
|
|
393
393
|
style: d.th,
|
|
394
394
|
children: f("bigconsole.widget.eventLog.column.event", "Event")
|
|
395
395
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ c("th", {
|
|
397
397
|
style: d.th,
|
|
398
398
|
children: f("bigconsole.widget.eventLog.column.time", "Time")
|
|
399
399
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ c("th", {
|
|
401
401
|
style: d.th,
|
|
402
402
|
children: f("bigconsole.widget.eventLog.column.webhook", "Webhook")
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ c("th", {
|
|
405
405
|
style: {
|
|
406
406
|
...d.th,
|
|
407
407
|
width: "80px"
|
|
@@ -409,7 +409,7 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
409
409
|
children: f("bigconsole.widget.eventLog.column.action", "Action")
|
|
410
410
|
})
|
|
411
411
|
] })
|
|
412
|
-
}), /* @__PURE__ */
|
|
412
|
+
}), /* @__PURE__ */ c("tbody", { children: b.map((e) => /* @__PURE__ */ c(m, {
|
|
413
413
|
log: e,
|
|
414
414
|
onRetry: () => D(e),
|
|
415
415
|
retrying: v === e.id,
|
|
@@ -417,7 +417,7 @@ var m = i(function({ log: e, onRetry: i, retrying: a, expanded: o, onToggleExpan
|
|
|
417
417
|
onToggleExpand: () => O(e.id)
|
|
418
418
|
}, e.id)) })]
|
|
419
419
|
})
|
|
420
|
-
}), C && /* @__PURE__ */
|
|
420
|
+
}), C && /* @__PURE__ */ c("button", {
|
|
421
421
|
onClick: w,
|
|
422
422
|
style: d.loadMoreButton,
|
|
423
423
|
children: f("bigconsole.widget.eventLog.loadMore", "Load More")
|