@burdenoff/microfe-bigconsole 2026.1004.3 → 2026.1004.4
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.d.ts +1 -1
- package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
- package/dist/bigconsole/BigConsoleRoutes.js +15 -1
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.d.ts.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +54 -53
- package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +3 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +40 -39
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +184 -177
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +40 -22
- package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +31 -25
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +115 -80
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +177 -146
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +375 -325
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.d.ts.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +7 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.d.ts +3 -1
- package/dist/bigconsole/components/parser/ParserSelector.d.ts.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +94 -94
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.d.ts.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +111 -89
- package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts +8 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts.map +1 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +52 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js.map +1 -0
- package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +257 -221
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts +1 -0
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +29 -29
- package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts +2 -0
- package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +247 -239
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +6 -4
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.d.ts +1 -0
- package/dist/bigconsole/components/widgets/states/EmptyState.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +4 -4
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts +7 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js +94 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts +7 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +101 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js.map +1 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts +16 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.js +57 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.js.map +1 -0
- package/dist/bigconsole/hooks/useDashboardOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +102 -79
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.d.ts +3 -1
- package/dist/bigconsole/hooks/useExportDashboard.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.js +23 -13
- package/dist/bigconsole/hooks/useExportDashboard.js.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.d.ts +18 -0
- package/dist/bigconsole/hooks/useFilterUrlSync.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.js +87 -57
- package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +39 -29
- package/dist/bigconsole/hooks/useGlobalFilters.js.map +1 -1
- package/dist/bigconsole/hooks/usePageOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/usePageOperations.js +1 -0
- package/dist/bigconsole/hooks/usePageOperations.js.map +1 -1
- package/dist/bigconsole/hooks/usePipelineOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/usePipelineOperations.js +114 -112
- package/dist/bigconsole/hooks/usePipelineOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useShareRecipients.d.ts +22 -0
- package/dist/bigconsole/hooks/useShareRecipients.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useShareRecipients.js +198 -0
- package/dist/bigconsole/hooks/useShareRecipients.js.map +1 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +198 -193
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +171 -167
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +313 -266
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +84 -79
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +267 -257
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +465 -402
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +169 -157
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +370 -230
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +181 -151
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +188 -208
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +134 -117
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +315 -267
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +4 -3
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/types/index.d.ts +4 -0
- package/dist/bigconsole/types/index.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +148 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +172 -133
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +21 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/microfe-bigconsole.css +1 -1
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,582 +2,630 @@ import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
|
2
2
|
import "../contexts/index.js";
|
|
3
3
|
import t from "../hooks/useWorkflowOperations.js";
|
|
4
4
|
import { BOOTSTRAP_RETRY_DELAY_MS as n } from "../constants.js";
|
|
5
|
-
import {
|
|
6
|
-
import "../context/index.js";
|
|
7
|
-
import { SECTION_FOCUS_RING as i, sectionSurfaceClasses as ee } from "../components/common/sectionStyles.js";
|
|
5
|
+
import { SECTION_FOCUS_RING as r, sectionSurfaceClasses as i } from "../components/common/sectionStyles.js";
|
|
8
6
|
import { Section as a, SectionStack as o } from "../components/common/Section.js";
|
|
9
7
|
import "../components/common/index.js";
|
|
10
8
|
import { BIGCONSOLE_PERMISSIONS as s } from "../../constants/permissions.js";
|
|
11
|
-
import { isNative as c, nativeCopyText as
|
|
9
|
+
import { isNative as c, nativeCopyText as ee, nativeNotify as l, nativeToast as te } from "../../utils/nativeBridge.js";
|
|
12
10
|
import ne from "../components/workflow/WorkflowStatusBadge.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
11
|
+
import re from "../components/workflow/WorkflowDeleteDialog.js";
|
|
12
|
+
import { WorkflowSinkLinkForm as ie } from "../components/workflow/WorkflowSinkLinkForm.js";
|
|
13
|
+
import { WorkflowDesignPreview as ae } from "../components/workflow/WorkflowDesignPreview.js";
|
|
14
|
+
import { memo as u, useCallback as d, useEffect as oe, useState as f } from "react";
|
|
15
|
+
import { useParams as se } from "react-router";
|
|
16
|
+
import { AccessDenied as ce, PermissionButton as p } from "@burdenoff/fe-libs/shared/components";
|
|
17
|
+
import { usePermissions as le } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
18
|
+
import { Button as m, IllustratedEmptyState as h, NextSteps as ue, PagePurpose as de, Spinner as g } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
20
|
+
import { useLazyWorkflowDefinition as fe } from "@burdenoff/fluidgrids-fe-sdk";
|
|
21
|
+
import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
22
|
+
import { formatDistanceToNow as b } from "date-fns";
|
|
23
23
|
//#region src/bigconsole/pages/WorkflowViewPage.tsx
|
|
24
|
-
var
|
|
24
|
+
var me = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
25
25
|
className: e,
|
|
26
26
|
fill: "none",
|
|
27
27
|
stroke: "currentColor",
|
|
28
28
|
viewBox: "0 0 24 24",
|
|
29
|
-
children: /* @__PURE__ */
|
|
29
|
+
children: /* @__PURE__ */ v("path", {
|
|
30
30
|
strokeLinecap: "round",
|
|
31
31
|
strokeLinejoin: "round",
|
|
32
32
|
strokeWidth: 2,
|
|
33
33
|
d: "M15 19l-7-7 7-7"
|
|
34
34
|
})
|
|
35
|
-
}),
|
|
35
|
+
}), he = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
36
36
|
className: e,
|
|
37
37
|
fill: "none",
|
|
38
38
|
stroke: "currentColor",
|
|
39
39
|
viewBox: "0 0 24 24",
|
|
40
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ v("path", {
|
|
41
41
|
strokeLinecap: "round",
|
|
42
42
|
strokeLinejoin: "round",
|
|
43
43
|
strokeWidth: 2,
|
|
44
44
|
d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
|
|
45
45
|
})
|
|
46
|
-
}),
|
|
46
|
+
}), ge = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
47
47
|
className: e,
|
|
48
48
|
fill: "none",
|
|
49
49
|
stroke: "currentColor",
|
|
50
50
|
viewBox: "0 0 24 24",
|
|
51
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ v("path", {
|
|
52
52
|
strokeLinecap: "round",
|
|
53
53
|
strokeLinejoin: "round",
|
|
54
54
|
strokeWidth: 2,
|
|
55
55
|
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
56
56
|
})
|
|
57
|
-
}),
|
|
57
|
+
}), _e = ({ className: e }) => /* @__PURE__ */ y("svg", {
|
|
58
58
|
className: e,
|
|
59
59
|
fill: "none",
|
|
60
60
|
stroke: "currentColor",
|
|
61
61
|
viewBox: "0 0 24 24",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ v("path", {
|
|
63
63
|
strokeLinecap: "round",
|
|
64
64
|
strokeLinejoin: "round",
|
|
65
65
|
strokeWidth: 2,
|
|
66
66
|
d: "M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
|
|
67
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ v("path", {
|
|
68
68
|
strokeLinecap: "round",
|
|
69
69
|
strokeLinejoin: "round",
|
|
70
70
|
strokeWidth: 2,
|
|
71
71
|
d: "M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
72
72
|
})]
|
|
73
|
-
}),
|
|
73
|
+
}), ve = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
74
74
|
className: e,
|
|
75
75
|
fill: "none",
|
|
76
76
|
stroke: "currentColor",
|
|
77
77
|
viewBox: "0 0 24 24",
|
|
78
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ v("path", {
|
|
79
79
|
strokeLinecap: "round",
|
|
80
80
|
strokeLinejoin: "round",
|
|
81
81
|
strokeWidth: 2,
|
|
82
82
|
d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
|
|
83
83
|
})
|
|
84
|
-
}),
|
|
84
|
+
}), ye = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
85
85
|
className: e,
|
|
86
86
|
fill: "none",
|
|
87
87
|
stroke: "currentColor",
|
|
88
88
|
viewBox: "0 0 24 24",
|
|
89
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ v("path", {
|
|
90
90
|
strokeLinecap: "round",
|
|
91
91
|
strokeLinejoin: "round",
|
|
92
92
|
strokeWidth: 2,
|
|
93
93
|
d: "M5 13l4 4L19 7"
|
|
94
94
|
})
|
|
95
|
-
}),
|
|
95
|
+
}), be = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
96
96
|
className: e,
|
|
97
97
|
fill: "none",
|
|
98
98
|
stroke: "currentColor",
|
|
99
99
|
viewBox: "0 0 24 24",
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ v("path", {
|
|
101
101
|
strokeLinecap: "round",
|
|
102
102
|
strokeLinejoin: "round",
|
|
103
103
|
strokeWidth: 2,
|
|
104
104
|
d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"
|
|
105
105
|
})
|
|
106
|
-
}),
|
|
106
|
+
}), xe = ({ className: e }) => /* @__PURE__ */ v("svg", {
|
|
107
107
|
className: e,
|
|
108
108
|
fill: "none",
|
|
109
109
|
stroke: "currentColor",
|
|
110
110
|
viewBox: "0 0 24 24",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ v("path", {
|
|
112
112
|
strokeLinecap: "round",
|
|
113
113
|
strokeLinejoin: "round",
|
|
114
114
|
strokeWidth: 2,
|
|
115
115
|
d: "M19 9l-7 7-7-7"
|
|
116
116
|
})
|
|
117
|
-
}),
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
|
|
122
|
-
if (!
|
|
123
|
-
|
|
117
|
+
}), x = u(function() {
|
|
118
|
+
let u = e(), { t: x } = pe(), { workflowId: S } = se(), { hasPermission: C, isLoading: Se } = le(), Ce = C(s.WORKFLOW_READ), w = C(s.WORKFLOW_UPDATE), T = C(s.DATASINK_READ);
|
|
119
|
+
C(s.WORKFLOW_DELETE);
|
|
120
|
+
let we = C(s.WORKFLOW_EXECUTE), [E, D] = f(null), [Te, O] = f(!1), [, k] = f(!1), [A, j] = f(!1), [Ee, M] = f(!1), [N, P] = f(!1), [F, I] = f(null), [De, L] = f(null), { unlinkDataSink: Oe } = t({ skipFetch: !0 }), [R, z] = f(!1), { getWorkflow: ke, workflow: B, loading: Ae, error: je } = fe(), [Me, V] = f(!1), [H, U] = f(null), { loading: Ne, error: W, fetchWorkflow: G, deleteWorkflow: K, executeWorkflow: q, pollWorkflowExecution: J } = t({ skipFetch: !0 });
|
|
121
|
+
oe(() => {
|
|
122
|
+
if (!S) {
|
|
123
|
+
V(!0);
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
let e = !1, t = async (r) => {
|
|
127
127
|
try {
|
|
128
|
-
let i = await
|
|
128
|
+
let i = await G(S);
|
|
129
129
|
if (e) return;
|
|
130
|
-
i ? (
|
|
130
|
+
i ? (D(i), V(!0)) : r === 0 ? setTimeout(() => {
|
|
131
131
|
e || t(1);
|
|
132
|
-
}, n) :
|
|
132
|
+
}, n) : V(!0);
|
|
133
133
|
} catch {
|
|
134
|
-
e ||
|
|
134
|
+
e || V(!0);
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
return t(0), () => {
|
|
138
138
|
e = !0;
|
|
139
139
|
};
|
|
140
|
-
}, [
|
|
141
|
-
let
|
|
142
|
-
|
|
143
|
-
}, [
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
}, [S, G]);
|
|
141
|
+
let Pe = d(() => {
|
|
142
|
+
u("/workflows/feeds");
|
|
143
|
+
}, [u]), Y = d(() => {
|
|
144
|
+
E?.key && u(`/workflows/workflow/${encodeURIComponent(E.key)}/${encodeURIComponent(B?.version ?? "v1")}`);
|
|
145
|
+
}, [
|
|
146
|
+
u,
|
|
147
|
+
E,
|
|
148
|
+
B
|
|
149
|
+
]), Fe = d(async () => {
|
|
150
|
+
if (S) {
|
|
151
|
+
k(!0);
|
|
148
152
|
try {
|
|
149
|
-
await
|
|
153
|
+
await K(S) ? (c() && l("success"), u("/workflows/feeds")) : c() && l("error");
|
|
150
154
|
} catch {
|
|
151
155
|
c() && l("error");
|
|
152
156
|
} finally {
|
|
153
|
-
|
|
157
|
+
k(!1), O(!1);
|
|
154
158
|
}
|
|
155
159
|
}
|
|
156
160
|
}, [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
]),
|
|
161
|
-
if (!
|
|
162
|
-
|
|
161
|
+
S,
|
|
162
|
+
K,
|
|
163
|
+
u
|
|
164
|
+
]), X = d(async () => {
|
|
165
|
+
if (!S) return;
|
|
166
|
+
j(!0), U(null);
|
|
163
167
|
let e = Date.now();
|
|
164
168
|
try {
|
|
165
|
-
let t = await
|
|
169
|
+
let t = await q(S);
|
|
166
170
|
if (t) {
|
|
167
171
|
let n = Date.now() - e;
|
|
168
|
-
t.externalWorkflowId ? (
|
|
172
|
+
t.externalWorkflowId ? (U({
|
|
169
173
|
success: !0,
|
|
170
174
|
output: {
|
|
171
175
|
externalWorkflowId: t.externalWorkflowId,
|
|
172
176
|
executionCount: t.executionCount,
|
|
173
|
-
status:
|
|
177
|
+
status: x("bigconsole.workflows.view.executionTriggeredPolling", "Triggered — polling for completion...")
|
|
174
178
|
},
|
|
175
179
|
error: null,
|
|
176
180
|
executionTimeMs: n
|
|
177
|
-
}),
|
|
181
|
+
}), J(S, {
|
|
178
182
|
intervalMs: 3e3,
|
|
179
183
|
timeoutMs: 12e4,
|
|
180
184
|
onProgress: (e) => {
|
|
181
|
-
|
|
185
|
+
D(e);
|
|
182
186
|
}
|
|
183
187
|
}).then((t) => {
|
|
184
|
-
t && (
|
|
188
|
+
t && (D(t), U((n) => n && {
|
|
185
189
|
...n,
|
|
186
190
|
output: {
|
|
187
191
|
...n.output || {},
|
|
188
|
-
status: t.status === "error" ?
|
|
192
|
+
status: t.status === "error" ? x("bigconsole.workflows.view.executionStatusFailed", "Failed") : x("bigconsole.workflows.view.executionStatusCompleted", "Completed"),
|
|
189
193
|
executionCount: t.executionCount,
|
|
190
194
|
lastExecutedAt: t.lastExecutedAt
|
|
191
195
|
},
|
|
192
196
|
executionTimeMs: Date.now() - e
|
|
193
197
|
}));
|
|
194
|
-
})) :
|
|
198
|
+
})) : U({
|
|
195
199
|
success: !0,
|
|
196
200
|
output: {
|
|
197
201
|
executionCount: t.executionCount,
|
|
198
202
|
lastExecutedAt: t.lastExecutedAt,
|
|
199
|
-
status:
|
|
203
|
+
status: x("bigconsole.workflows.view.executionStatusCompleted", "Completed")
|
|
200
204
|
},
|
|
201
205
|
error: null,
|
|
202
206
|
executionTimeMs: n
|
|
203
207
|
});
|
|
204
|
-
let r = await
|
|
205
|
-
r &&
|
|
208
|
+
let r = await G(S);
|
|
209
|
+
r && D(r);
|
|
206
210
|
}
|
|
207
211
|
} catch (t) {
|
|
208
|
-
|
|
212
|
+
U({
|
|
209
213
|
success: !1,
|
|
210
214
|
output: null,
|
|
211
|
-
error: t instanceof Error ? t.message :
|
|
215
|
+
error: t instanceof Error ? t.message : x("bigconsole.workflows.errors.executionFailed", "Execution failed"),
|
|
212
216
|
executionTimeMs: Date.now() - e
|
|
213
217
|
});
|
|
214
218
|
} finally {
|
|
215
|
-
|
|
219
|
+
j(!1);
|
|
216
220
|
}
|
|
217
221
|
}, [
|
|
218
|
-
|
|
222
|
+
S,
|
|
223
|
+
q,
|
|
224
|
+
G,
|
|
219
225
|
J,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if (M?.webhookUrl) try {
|
|
225
|
-
await te(M.webhookUrl), z(!0), c() && u(w("bigconsole.workflows.view.webhookCopiedToast", "Webhook copied")), setTimeout(() => z(!1), 2e3);
|
|
226
|
+
x
|
|
227
|
+
]), Ie = d(async () => {
|
|
228
|
+
if (E?.webhookUrl) try {
|
|
229
|
+
await ee(E.webhookUrl), M(!0), c() && te(x("bigconsole.workflows.view.webhookCopiedToast", "Webhook copied")), setTimeout(() => M(!1), 2e3);
|
|
226
230
|
} catch {}
|
|
227
|
-
}, [
|
|
228
|
-
|
|
229
|
-
}, [
|
|
231
|
+
}, [E?.webhookUrl, x]), Le = d((e) => {
|
|
232
|
+
u(`/datasinks/${e}`);
|
|
233
|
+
}, [u]), Z = /* @__PURE__ */ y("button", {
|
|
230
234
|
type: "button",
|
|
231
|
-
onClick:
|
|
232
|
-
className: `inline-flex min-h-[var(--size-controlHeight-md)] items-center gap-1 rounded-button text-sm text-text-secondary motion-safe:transition-colors hover:text-text-primary ${
|
|
233
|
-
children: [/* @__PURE__ */
|
|
235
|
+
onClick: Pe,
|
|
236
|
+
className: `inline-flex min-h-[var(--size-controlHeight-md)] items-center gap-1 rounded-button text-sm text-text-secondary motion-safe:transition-colors hover:text-text-primary ${r}`,
|
|
237
|
+
children: [/* @__PURE__ */ v(me, { className: "w-4 h-4" }), x("bigconsole.workflows.view.backToWorkflows", "Back to Workflows")]
|
|
234
238
|
});
|
|
235
|
-
if (!
|
|
239
|
+
if (!Me || Ne && !E || Se) return /* @__PURE__ */ v("div", {
|
|
236
240
|
className: "mx-auto flex min-h-[400px] max-w-5xl items-center justify-center p-4 sm:p-[var(--space-pagePadding)]",
|
|
237
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ v(g, { size: "lg" })
|
|
238
242
|
});
|
|
239
|
-
if (!
|
|
240
|
-
title:
|
|
241
|
-
description:
|
|
243
|
+
if (!Ce) return /* @__PURE__ */ v(ce, {
|
|
244
|
+
title: x("bigconsole.workflows.errors.accessDeniedTitle", "Access Denied"),
|
|
245
|
+
description: x("bigconsole.workflows.errors.accessDeniedViewDescription", "You don't have permission to view this workflow.")
|
|
242
246
|
});
|
|
243
|
-
if (
|
|
247
|
+
if (W || !E) return /* @__PURE__ */ v("div", {
|
|
244
248
|
className: "mx-auto max-w-5xl p-4 sm:p-[var(--space-pagePadding)]",
|
|
245
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v("div", { children: Z }), /* @__PURE__ */ v("section", {
|
|
246
250
|
"aria-label": "Workflow not found",
|
|
247
251
|
"data-section-emphasis": "standard",
|
|
248
252
|
"data-testid": "workflow-not-found",
|
|
249
|
-
className:
|
|
250
|
-
children: /* @__PURE__ */
|
|
253
|
+
className: i("standard"),
|
|
254
|
+
children: /* @__PURE__ */ v(h, {
|
|
251
255
|
illustration: "empty-data",
|
|
252
|
-
title:
|
|
253
|
-
description:
|
|
256
|
+
title: x("bigconsole.workflows.view.notFoundTitle", "Workflow not found"),
|
|
257
|
+
description: W?.message || x("bigconsole.workflows.view.notFoundDescription", "The workflow you are looking for does not exist.")
|
|
254
258
|
})
|
|
255
259
|
})] })
|
|
256
260
|
});
|
|
257
|
-
let
|
|
258
|
-
...
|
|
261
|
+
let Q = E.dataSinkLinks?.length || 0, Re = !!E.externalWorkflowId, $ = B?.id === E.externalWorkflowId ? B.definitionJson?.data : void 0, ze = [
|
|
262
|
+
...we ? [{
|
|
259
263
|
id: "execute",
|
|
260
|
-
label:
|
|
261
|
-
description:
|
|
262
|
-
onClick:
|
|
264
|
+
label: x("bigconsole.workflows.view.nextStepExecuteLabel", "Run the workflow"),
|
|
265
|
+
description: x("bigconsole.workflows.view.nextStepExecuteDescription", "Trigger an execution to pull fresh data now."),
|
|
266
|
+
onClick: X
|
|
263
267
|
}] : [],
|
|
264
268
|
{
|
|
265
269
|
id: "design",
|
|
266
|
-
label:
|
|
267
|
-
description:
|
|
268
|
-
onClick: () =>
|
|
270
|
+
label: x("bigconsole.workflows.view.nextStepDesignLabel", "Inspect the design"),
|
|
271
|
+
description: x("bigconsole.workflows.view.nextStepDesignDescription", "Expand the read-only preview to see each step."),
|
|
272
|
+
onClick: () => z(!0)
|
|
269
273
|
},
|
|
270
|
-
...
|
|
274
|
+
...w ? [{
|
|
271
275
|
id: "edit",
|
|
272
|
-
label:
|
|
273
|
-
description:
|
|
274
|
-
onClick:
|
|
276
|
+
label: x("bigconsole.workflows.view.nextStepEditLabel", "Edit in the builder"),
|
|
277
|
+
description: x("bigconsole.workflows.view.nextStepEditDescription", "Open the FluidGrids visual builder to change the flow."),
|
|
278
|
+
onClick: Y
|
|
275
279
|
}] : [],
|
|
276
280
|
{
|
|
277
281
|
id: "sinks",
|
|
278
|
-
label:
|
|
279
|
-
description:
|
|
280
|
-
onClick: () =>
|
|
282
|
+
label: x("bigconsole.workflows.view.nextStepSinksLabel", "Check the linked data sinks"),
|
|
283
|
+
description: x("bigconsole.workflows.view.nextStepSinksDescription", "See where this workflow writes its output."),
|
|
284
|
+
onClick: () => u("/datasinks")
|
|
281
285
|
}
|
|
282
286
|
];
|
|
283
|
-
return /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ y("div", {
|
|
284
288
|
className: "mx-auto max-w-5xl p-4 sm:p-[var(--space-pagePadding)]",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ y(o, { children: [
|
|
290
|
+
/* @__PURE__ */ y("header", {
|
|
287
291
|
"data-section-emphasis": "bare",
|
|
288
292
|
className: "min-w-0",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ v("div", {
|
|
290
294
|
className: "mb-form-gap",
|
|
291
|
-
children:
|
|
292
|
-
}), /* @__PURE__ */
|
|
295
|
+
children: Z
|
|
296
|
+
}), /* @__PURE__ */ y("div", {
|
|
293
297
|
className: "flex flex-col gap-form-gap md:flex-row md:items-start md:justify-between",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ y("div", {
|
|
295
299
|
className: "min-w-0",
|
|
296
300
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ y("div", {
|
|
298
302
|
className: "flex flex-wrap items-center gap-icon-gap",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ v("h1", {
|
|
300
304
|
className: "break-words text-2xl font-bold text-text-primary",
|
|
301
|
-
children:
|
|
302
|
-
}), /* @__PURE__ */
|
|
305
|
+
children: E.name
|
|
306
|
+
}), /* @__PURE__ */ v(ne, { status: E.status })]
|
|
303
307
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ v("p", {
|
|
305
309
|
className: "mt-1 break-all font-mono text-sm text-text-secondary",
|
|
306
|
-
children:
|
|
310
|
+
children: E.key
|
|
307
311
|
}),
|
|
308
|
-
|
|
312
|
+
E.externalWorkflowId && /* @__PURE__ */ y("p", {
|
|
309
313
|
className: "mt-1 text-xs text-text-muted",
|
|
310
314
|
children: [
|
|
311
|
-
|
|
315
|
+
x("bigconsole.workflows.view.fluidGridsIdLabel", "FluidGrids ID:"),
|
|
312
316
|
" ",
|
|
313
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ v("span", {
|
|
314
318
|
className: "break-all font-mono",
|
|
315
|
-
children:
|
|
319
|
+
children: E.externalWorkflowId
|
|
316
320
|
})
|
|
317
321
|
]
|
|
318
322
|
})
|
|
319
323
|
]
|
|
320
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ y("div", {
|
|
321
325
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
322
326
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ v(p, {
|
|
324
328
|
permission: s.WORKFLOW_EXECUTE,
|
|
325
329
|
deniedBehavior: "disable",
|
|
326
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ y(m, {
|
|
327
331
|
size: "lg",
|
|
328
|
-
onClick:
|
|
329
|
-
disabled:
|
|
330
|
-
children: [/* @__PURE__ */
|
|
332
|
+
onClick: X,
|
|
333
|
+
disabled: A,
|
|
334
|
+
children: [/* @__PURE__ */ v(_e, { className: "w-4 h-4" }), A ? x("bigconsole.workflows.actions.executing", "Executing...") : x("bigconsole.workflows.actions.execute", "Execute")]
|
|
331
335
|
})
|
|
332
336
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ v(p, {
|
|
334
338
|
permission: s.WORKFLOW_UPDATE,
|
|
335
339
|
deniedBehavior: "disable",
|
|
336
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ y(m, {
|
|
337
341
|
size: "lg",
|
|
338
342
|
variant: "outline",
|
|
339
|
-
onClick:
|
|
340
|
-
children: [/* @__PURE__ */
|
|
343
|
+
onClick: Y,
|
|
344
|
+
children: [/* @__PURE__ */ v(he, { className: "w-4 h-4" }), x("bigconsole.workflows.actions.edit", "Edit")]
|
|
341
345
|
})
|
|
342
346
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ v(p, {
|
|
344
348
|
permission: s.WORKFLOW_DELETE,
|
|
345
349
|
deniedBehavior: "hide",
|
|
346
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ y(m, {
|
|
347
351
|
size: "lg",
|
|
348
352
|
variant: "ghost",
|
|
349
|
-
onClick: () =>
|
|
353
|
+
onClick: () => O(!0),
|
|
350
354
|
className: "text-[var(--color-status-error-text)] hover:bg-status-error-bg/10 hover:text-[var(--color-status-error-text)]",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ v(ge, { className: "w-4 h-4" }), x("bigconsole.workflows.actions.delete", "Delete")]
|
|
352
356
|
})
|
|
353
357
|
})
|
|
354
358
|
]
|
|
355
359
|
})]
|
|
356
360
|
})]
|
|
357
361
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ v(de, { children: x("bigconsole.workflows.view.purpose", "A workflow is the visual ETL job that feeds this BigConsole — it fetches, transforms, and delivers data into linked data sinks. From here you can run it on demand, inspect its design and execution history, copy its webhook trigger, and edit it in the visual builder.") }),
|
|
363
|
+
/* @__PURE__ */ v(ue, {
|
|
360
364
|
storageKey: "bigconsole-workflow-view",
|
|
361
|
-
steps:
|
|
365
|
+
steps: ze
|
|
362
366
|
}),
|
|
363
|
-
|
|
367
|
+
H && /* @__PURE__ */ y(a, {
|
|
364
368
|
headingLevel: 2,
|
|
365
|
-
tone:
|
|
366
|
-
title:
|
|
367
|
-
description:
|
|
368
|
-
meta: /* @__PURE__ */
|
|
369
|
+
tone: H.success ? "success" : "danger",
|
|
370
|
+
title: H.success ? x("bigconsole.workflows.view.executionResultTriggered", "Execution Triggered") : x("bigconsole.workflows.view.executionResultFailed", "Execution Failed"),
|
|
371
|
+
description: H.success ? "The run was accepted. Results refresh below as the run progresses." : "The run could not be started. The detail below comes straight from the workflow service.",
|
|
372
|
+
meta: /* @__PURE__ */ y("span", {
|
|
369
373
|
className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
370
|
-
children: [
|
|
374
|
+
children: [H.executionTimeMs, "ms"]
|
|
371
375
|
}),
|
|
372
376
|
"data-testid": "workflow-execution-result",
|
|
373
|
-
children: [
|
|
377
|
+
children: [H.error ? /* @__PURE__ */ v("p", {
|
|
374
378
|
className: "break-words text-sm text-[var(--color-status-error-text)]",
|
|
375
|
-
children:
|
|
376
|
-
}) : /* @__PURE__ */
|
|
379
|
+
children: H.error
|
|
380
|
+
}) : /* @__PURE__ */ v("pre", {
|
|
377
381
|
className: "max-h-[200px] min-w-0 overflow-auto rounded-card bg-bg-sunken p-2 font-mono text-xs text-text-secondary",
|
|
378
|
-
children: JSON.stringify(
|
|
379
|
-
}),
|
|
382
|
+
children: JSON.stringify(H.output, null, 2)
|
|
383
|
+
}), H.runId && /* @__PURE__ */ y("p", {
|
|
380
384
|
className: "mt-2 text-xs text-text-muted",
|
|
381
385
|
children: [
|
|
382
|
-
|
|
386
|
+
x("bigconsole.workflows.view.runIdLabel", "Run ID:"),
|
|
383
387
|
" ",
|
|
384
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ v("span", {
|
|
385
389
|
className: "break-all font-mono",
|
|
386
|
-
children:
|
|
390
|
+
children: H.runId
|
|
387
391
|
})
|
|
388
392
|
]
|
|
389
393
|
})]
|
|
390
394
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ y("div", {
|
|
392
396
|
className: "grid grid-cols-1 gap-section-gap md:grid-cols-2",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ v(a, {
|
|
394
398
|
headingLevel: 2,
|
|
395
399
|
emphasis: "muted",
|
|
396
|
-
title:
|
|
400
|
+
title: x("bigconsole.workflows.view.descriptionLabel", "Description"),
|
|
397
401
|
description: "What this workflow is for, as entered by its author.",
|
|
398
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ v("p", {
|
|
399
403
|
className: "break-words text-sm text-text-primary",
|
|
400
|
-
children:
|
|
404
|
+
children: E.description || x("bigconsole.workflows.view.noDescription", "No description")
|
|
401
405
|
})
|
|
402
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ v(a, {
|
|
403
407
|
headingLevel: 2,
|
|
404
|
-
emphasis:
|
|
405
|
-
title:
|
|
408
|
+
emphasis: Re ? "standard" : "primary",
|
|
409
|
+
title: x("bigconsole.workflows.view.executionStatsLabel", "Execution Stats"),
|
|
406
410
|
description: "How often this workflow has run, and when it last did.",
|
|
407
411
|
"data-testid": "workflow-execution-stats",
|
|
408
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ y("div", {
|
|
409
413
|
className: "grid grid-cols-1 gap-form-gap sm:grid-cols-2",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ y("div", {
|
|
411
415
|
className: "min-w-0",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ v("p", {
|
|
413
417
|
className: "text-2xl font-bold text-text-primary",
|
|
414
|
-
children:
|
|
415
|
-
}), /* @__PURE__ */
|
|
418
|
+
children: E.executionCount
|
|
419
|
+
}), /* @__PURE__ */ v("p", {
|
|
416
420
|
className: "text-xs text-text-secondary",
|
|
417
|
-
children:
|
|
421
|
+
children: x("bigconsole.workflows.view.totalExecutionsLabel", "Total Executions")
|
|
418
422
|
})]
|
|
419
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ y("div", {
|
|
420
424
|
className: "min-w-0",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ v("p", {
|
|
422
426
|
className: "text-sm font-medium text-text-primary",
|
|
423
|
-
children:
|
|
424
|
-
}), /* @__PURE__ */
|
|
427
|
+
children: E.lastExecutedAt ? b(new Date(E.lastExecutedAt), { addSuffix: !0 }) : x("bigconsole.workflows.view.never", "Never")
|
|
428
|
+
}), /* @__PURE__ */ v("p", {
|
|
425
429
|
className: "text-xs text-text-secondary",
|
|
426
|
-
children:
|
|
430
|
+
children: x("bigconsole.workflows.view.lastExecutedLabel", "Last Executed")
|
|
427
431
|
})]
|
|
428
432
|
})]
|
|
429
433
|
})
|
|
430
434
|
})]
|
|
431
435
|
}),
|
|
432
|
-
|
|
436
|
+
E.externalWorkflowId && /* @__PURE__ */ v(a, {
|
|
433
437
|
headingLevel: 2,
|
|
434
438
|
emphasis: "primary",
|
|
435
|
-
title:
|
|
439
|
+
title: x("bigconsole.workflows.view.designPreviewTitle", "Workflow Design Preview"),
|
|
436
440
|
description: "The steps this workflow runs, read-only. Open the builder to change them.",
|
|
437
|
-
actions: /* @__PURE__ */
|
|
441
|
+
actions: /* @__PURE__ */ y(m, {
|
|
438
442
|
variant: "outline",
|
|
439
443
|
size: "sm",
|
|
440
|
-
"aria-expanded":
|
|
444
|
+
"aria-expanded": R,
|
|
441
445
|
"aria-controls": "workflow-design-canvas",
|
|
442
|
-
onClick: () =>
|
|
443
|
-
|
|
446
|
+
onClick: () => {
|
|
447
|
+
let e = !R;
|
|
448
|
+
z(e), e && E.externalWorkflowId && ke(E.key, E.externalWorkflowId);
|
|
449
|
+
},
|
|
450
|
+
children: [R ? "Hide design" : "Show design", /* @__PURE__ */ v(xe, { className: `w-4 h-4 motion-safe:transition-transform ${R ? "rotate-180" : ""}` })]
|
|
444
451
|
}),
|
|
445
452
|
"data-testid": "workflow-design-preview",
|
|
446
|
-
children:
|
|
453
|
+
children: R ? /* @__PURE__ */ v("div", {
|
|
447
454
|
id: "workflow-design-canvas",
|
|
448
455
|
className: "h-[320px] min-w-0 overflow-hidden rounded-card border border-[var(--color-border-subtle)] sm:h-[420px] lg:h-[450px]",
|
|
449
|
-
children: /* @__PURE__ */
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
456
|
+
children: Ae ? /* @__PURE__ */ v("div", {
|
|
457
|
+
role: "status",
|
|
458
|
+
className: "flex h-full items-center justify-center",
|
|
459
|
+
children: /* @__PURE__ */ v(g, {})
|
|
460
|
+
}) : je ? /* @__PURE__ */ v("p", {
|
|
461
|
+
role: "alert",
|
|
462
|
+
className: "p-4 text-sm text-status-error-text",
|
|
463
|
+
children: x("bigconsole.workflows.view.previewError", "Could not load the workflow design. Close and reopen the preview to retry.")
|
|
464
|
+
}) : $ ? /* @__PURE__ */ v(ae, { workflow: $ }, B?.id) : /* @__PURE__ */ v("p", {
|
|
465
|
+
className: "p-4 text-sm text-text-secondary",
|
|
466
|
+
children: x("bigconsole.workflows.view.previewUnavailable", "No saved workflow design is available.")
|
|
457
467
|
})
|
|
458
|
-
}) : /* @__PURE__ */
|
|
468
|
+
}) : /* @__PURE__ */ v("p", {
|
|
459
469
|
id: "workflow-design-canvas",
|
|
460
470
|
className: "text-sm text-text-secondary",
|
|
461
471
|
children: "The canvas is collapsed. Show the design to see every step, its order and its connections."
|
|
462
472
|
})
|
|
463
473
|
}),
|
|
464
|
-
|
|
474
|
+
E.webhookUrl && /* @__PURE__ */ v(a, {
|
|
465
475
|
headingLevel: 2,
|
|
466
476
|
emphasis: "muted",
|
|
467
|
-
title:
|
|
477
|
+
title: x("bigconsole.workflows.view.webhookUrlLabel", "Webhook URL"),
|
|
468
478
|
description: "POST to this URL to run the workflow from an external system.",
|
|
469
|
-
actions: /* @__PURE__ */
|
|
479
|
+
actions: /* @__PURE__ */ v(m, {
|
|
470
480
|
variant: "ghost",
|
|
471
481
|
size: "sm",
|
|
472
|
-
onClick:
|
|
473
|
-
children:
|
|
482
|
+
onClick: Ie,
|
|
483
|
+
children: Ee ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ye, { className: "w-4 h-4 text-status-success-text" }), x("bigconsole.workflows.actions.copied", "Copied!")] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ve, { className: "w-4 h-4" }), x("bigconsole.workflows.actions.copy", "Copy")] })
|
|
474
484
|
}),
|
|
475
|
-
children: /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ v("code", {
|
|
476
486
|
className: "block min-w-0 overflow-x-auto break-all rounded-card bg-bg-sunken px-3 py-2 font-mono text-sm text-text-primary",
|
|
477
|
-
children:
|
|
487
|
+
children: E.webhookUrl
|
|
478
488
|
})
|
|
479
489
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ y(a, {
|
|
481
491
|
headingLevel: 2,
|
|
482
|
-
title:
|
|
492
|
+
title: x("bigconsole.workflows.view.linkedDataSinksTitle", "Linked DataSinks ({{count}})", { count: Q }),
|
|
483
493
|
description: "Where this workflow writes the data it produces.",
|
|
494
|
+
actions: w && T ? /* @__PURE__ */ v(m, {
|
|
495
|
+
variant: "outline",
|
|
496
|
+
"aria-expanded": N,
|
|
497
|
+
onClick: () => P((e) => !e),
|
|
498
|
+
children: N ? x("bigconsole.workflows.links.cancel", "Cancel linking") : x("bigconsole.workflows.links.link", "Link sink")
|
|
499
|
+
}) : void 0,
|
|
484
500
|
"data-testid": "workflow-linked-datasinks",
|
|
485
|
-
children:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
children: [
|
|
502
|
+
F && /* @__PURE__ */ v("p", {
|
|
503
|
+
role: "status",
|
|
504
|
+
className: "mb-3 text-sm text-text-secondary",
|
|
505
|
+
children: F
|
|
506
|
+
}),
|
|
507
|
+
N && w && T && /* @__PURE__ */ v(ie, {
|
|
508
|
+
workflowId: E.id,
|
|
509
|
+
linkedSinkIds: E.dataSinkLinks.map((e) => e.dataSinkId),
|
|
510
|
+
onLinked: async () => {
|
|
511
|
+
let e = await G(E.id);
|
|
512
|
+
e && D(e), P(!1), I(x("bigconsole.workflows.links.linked", "Data sink linked."));
|
|
513
|
+
}
|
|
514
|
+
}),
|
|
515
|
+
Q === 0 ? /* @__PURE__ */ v(h, {
|
|
516
|
+
illustration: "empty-generic",
|
|
517
|
+
title: x("bigconsole.workflows.view.noDataSinksTitle", "No data sinks linked"),
|
|
518
|
+
description: x("bigconsole.workflows.view.noDataSinksDescription", "This workflow has no data sinks linked yet — its output isn't being stored.")
|
|
519
|
+
}) : /* @__PURE__ */ v("ul", {
|
|
520
|
+
className: "flex flex-col gap-list-gap",
|
|
521
|
+
children: [...E.dataSinkLinks].sort((e, t) => e.priority - t.priority).map((e) => /* @__PURE__ */ y("li", {
|
|
522
|
+
className: "flex flex-col gap-control-gap rounded-card bg-bg-sunken px-3 py-2 sm:flex-row sm:items-center sm:justify-between",
|
|
523
|
+
children: [/* @__PURE__ */ y("div", {
|
|
524
|
+
className: "flex min-w-0 items-center gap-icon-gap",
|
|
525
|
+
children: [/* @__PURE__ */ v(be, { className: "w-4 h-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ y("div", {
|
|
526
|
+
className: "min-w-0",
|
|
527
|
+
children: [/* @__PURE__ */ v("p", {
|
|
528
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
529
|
+
children: e.dataSink?.name || e.dataSink?.key || e.dataSinkId
|
|
530
|
+
}), e.dataSink?.key && /* @__PURE__ */ v("p", {
|
|
531
|
+
className: "truncate font-mono text-xs text-text-secondary",
|
|
532
|
+
children: e.dataSink.key
|
|
533
|
+
})]
|
|
503
534
|
})]
|
|
535
|
+
}), /* @__PURE__ */ y("div", {
|
|
536
|
+
className: "flex flex-wrap items-center gap-control-gap",
|
|
537
|
+
children: [
|
|
538
|
+
e.isEnabled ? /* @__PURE__ */ v("span", {
|
|
539
|
+
className: "rounded-pill bg-[var(--color-status-success-bgSubtle)] px-2 py-0.5 text-xs font-medium text-status-success-text",
|
|
540
|
+
children: x("bigconsole.workflows.view.dataSinkEnabled", "Enabled")
|
|
541
|
+
}) : /* @__PURE__ */ v("span", {
|
|
542
|
+
className: "rounded-pill bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
543
|
+
children: x("bigconsole.workflows.view.dataSinkDisabled", "Disabled")
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ v("span", {
|
|
546
|
+
className: "text-xs text-text-muted",
|
|
547
|
+
children: x("bigconsole.workflows.view.dataSinkPriority", "Priority: {{priority}}", { priority: e.priority })
|
|
548
|
+
}),
|
|
549
|
+
w && /* @__PURE__ */ v(m, {
|
|
550
|
+
variant: "outline",
|
|
551
|
+
size: "sm",
|
|
552
|
+
disabled: De !== null,
|
|
553
|
+
onClick: async () => {
|
|
554
|
+
L(e.dataSinkId);
|
|
555
|
+
try {
|
|
556
|
+
if (await Oe(E.id, e.dataSinkId)) {
|
|
557
|
+
let e = await G(E.id);
|
|
558
|
+
e && D(e), I(x("bigconsole.workflows.links.unlinked", "Data sink unlinked."));
|
|
559
|
+
} else I(x("bigconsole.workflows.links.unlinkError", "The data sink could not be unlinked. Try again."));
|
|
560
|
+
} finally {
|
|
561
|
+
L(null);
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
children: x("bigconsole.workflows.links.unlink", "Unlink")
|
|
565
|
+
}),
|
|
566
|
+
e.dataSink && /* @__PURE__ */ v("button", {
|
|
567
|
+
type: "button",
|
|
568
|
+
onClick: () => Le(e.dataSinkId),
|
|
569
|
+
className: "inline-flex min-h-[var(--size-controlHeight-md)] items-center rounded-button px-2 text-xs font-medium text-text-link hover:underline sm:min-h-[var(--size-controlHeight-sm)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
570
|
+
children: x("bigconsole.workflows.actions.view", "View")
|
|
571
|
+
})
|
|
572
|
+
]
|
|
504
573
|
})]
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
e.isEnabled ? /* @__PURE__ */ x("span", {
|
|
509
|
-
className: "rounded-pill bg-[var(--color-status-success-bgSubtle)] px-2 py-0.5 text-xs font-medium text-status-success-text",
|
|
510
|
-
children: w("bigconsole.workflows.view.dataSinkEnabled", "Enabled")
|
|
511
|
-
}) : /* @__PURE__ */ x("span", {
|
|
512
|
-
className: "rounded-pill bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
513
|
-
children: w("bigconsole.workflows.view.dataSinkDisabled", "Disabled")
|
|
514
|
-
}),
|
|
515
|
-
/* @__PURE__ */ x("span", {
|
|
516
|
-
className: "text-xs text-text-muted",
|
|
517
|
-
children: w("bigconsole.workflows.view.dataSinkPriority", "Priority: {{priority}}", { priority: e.priority })
|
|
518
|
-
}),
|
|
519
|
-
e.dataSink && /* @__PURE__ */ x("button", {
|
|
520
|
-
type: "button",
|
|
521
|
-
onClick: () => Ee(e.dataSinkId),
|
|
522
|
-
className: "inline-flex min-h-[var(--size-controlHeight-md)] items-center rounded-button px-2 text-xs font-medium text-text-link hover:underline sm:min-h-[var(--size-controlHeight-sm)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
523
|
-
children: w("bigconsole.workflows.actions.view", "View")
|
|
524
|
-
})
|
|
525
|
-
]
|
|
526
|
-
})]
|
|
527
|
-
}, e.id))
|
|
528
|
-
})
|
|
574
|
+
}, e.id))
|
|
575
|
+
})
|
|
576
|
+
]
|
|
529
577
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ v(a, {
|
|
531
579
|
headingLevel: 2,
|
|
532
580
|
emphasis: "muted",
|
|
533
581
|
title: "Record history",
|
|
534
582
|
padding: "compact",
|
|
535
|
-
children: /* @__PURE__ */
|
|
583
|
+
children: /* @__PURE__ */ y("dl", {
|
|
536
584
|
className: "grid grid-cols-1 gap-form-gap sm:grid-cols-2",
|
|
537
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ y("div", {
|
|
538
586
|
className: "min-w-0",
|
|
539
587
|
children: [
|
|
540
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ v("dt", {
|
|
541
589
|
className: "text-xs text-text-secondary",
|
|
542
|
-
children:
|
|
590
|
+
children: x("bigconsole.workflows.view.createdLabel", "Created")
|
|
543
591
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ v("dd", {
|
|
545
593
|
className: "text-sm text-text-primary",
|
|
546
|
-
children:
|
|
594
|
+
children: b(new Date(E.createdAt), { addSuffix: !0 })
|
|
547
595
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ v("dd", {
|
|
549
597
|
className: "truncate text-xs text-text-muted",
|
|
550
|
-
children:
|
|
598
|
+
children: x("bigconsole.workflows.view.byAuthor", "by {{author}}", { author: E.createdBy })
|
|
551
599
|
})
|
|
552
600
|
]
|
|
553
|
-
}), /* @__PURE__ */
|
|
601
|
+
}), /* @__PURE__ */ y("div", {
|
|
554
602
|
className: "min-w-0",
|
|
555
603
|
children: [
|
|
556
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ v("dt", {
|
|
557
605
|
className: "text-xs text-text-secondary",
|
|
558
|
-
children:
|
|
606
|
+
children: x("bigconsole.workflows.view.lastUpdatedLabel", "Last Updated")
|
|
559
607
|
}),
|
|
560
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ v("dd", {
|
|
561
609
|
className: "text-sm text-text-primary",
|
|
562
|
-
children:
|
|
610
|
+
children: b(new Date(E.updatedAt), { addSuffix: !0 })
|
|
563
611
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ v("dd", {
|
|
565
613
|
className: "truncate text-xs text-text-muted",
|
|
566
|
-
children:
|
|
614
|
+
children: x("bigconsole.workflows.view.byAuthor", "by {{author}}", { author: E.updatedBy || E.createdBy })
|
|
567
615
|
})
|
|
568
616
|
]
|
|
569
617
|
})]
|
|
570
618
|
})
|
|
571
619
|
})
|
|
572
|
-
] }),
|
|
573
|
-
workflow:
|
|
574
|
-
isOpen:
|
|
575
|
-
onClose: () =>
|
|
576
|
-
onConfirm:
|
|
620
|
+
] }), E && /* @__PURE__ */ v(re, {
|
|
621
|
+
workflow: E,
|
|
622
|
+
isOpen: Te,
|
|
623
|
+
onClose: () => O(!1),
|
|
624
|
+
onConfirm: Fe
|
|
577
625
|
})]
|
|
578
626
|
});
|
|
579
627
|
});
|
|
580
628
|
//#endregion
|
|
581
|
-
export {
|
|
629
|
+
export { x as WorkflowViewPage };
|
|
582
630
|
|
|
583
631
|
//# sourceMappingURL=WorkflowViewPage.js.map
|