@solidxai/core-ui 0.1.13-beta.6 → 0.1.14-beta.0
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/components/common/SolidPopupContainer.d.ts.map +1 -1
- package/dist/components/common/SolidPopupContainer.js +68 -5
- package/dist/components/common/SolidPopupContainer.js.map +1 -1
- package/dist/components/common/SolidPopupContainer.tsx +50 -4
- package/dist/components/core/card/SolidCardViewConfigure.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +3 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts +2 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js +4 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.ts +3 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts +8 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js +9 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.ts +17 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +52 -22
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +49 -9
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +3 -1
- package/dist/components/core/list/SolidCustomListViewColumn.d.ts +2 -1
- package/dist/components/core/list/SolidCustomListViewColumn.d.ts.map +1 -1
- package/dist/components/core/list/SolidCustomListViewColumn.js +3 -2
- package/dist/components/core/list/SolidCustomListViewColumn.js.map +1 -1
- package/dist/components/core/list/SolidCustomListViewColumn.tsx +4 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +75 -71
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +25 -10
- package/dist/components/core/list/SolidListViewColumn.d.ts +3 -1
- package/dist/components/core/list/SolidListViewColumn.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.js +81 -42
- package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.tsx +93 -44
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +2 -2
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +4 -2
- package/dist/components/core/list/widgets/PillWidget.d.ts +3 -0
- package/dist/components/core/list/widgets/PillWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/PillWidget.js +95 -0
- package/dist/components/core/list/widgets/PillWidget.js.map +1 -0
- package/dist/components/core/list/widgets/PillWidget.tsx +127 -0
- package/dist/components/shad-cn-ui/SolidDialog.js +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.tsx +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.d.ts +3 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.js +2 -2
- package/dist/components/shad-cn-ui/SolidDropdownMenu.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.tsx +11 -5
- package/dist/components/shad-cn-ui/SolidIcon.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidIcon.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidIcon.js +2 -1
- package/dist/components/shad-cn-ui/SolidIcon.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidIcon.tsx +2 -0
- package/dist/components/workflow/WorkflowFlowCanvas.css +454 -0
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts +40 -0
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts.map +1 -0
- package/dist/components/workflow/WorkflowFlowCanvas.js +861 -0
- package/dist/components/workflow/WorkflowFlowCanvas.js.map +1 -0
- package/dist/components/workflow/WorkflowFlowCanvas.tsx +1522 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.css +247 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.d.ts +22 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.d.ts.map +1 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.js +97 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.js.map +1 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.tsx +363 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.css +802 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts +72 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts.map +1 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js +1107 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js.map +1 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.tsx +2347 -0
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +7 -0
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +37 -0
- package/dist/redux/api/workflowDefinitionEditorApi.d.ts +17 -0
- package/dist/redux/api/workflowDefinitionEditorApi.d.ts.map +1 -0
- package/dist/redux/api/workflowDefinitionEditorApi.js +38 -0
- package/dist/redux/api/workflowDefinitionEditorApi.js.map +1 -0
- package/dist/redux/api/workflowDefinitionEditorApi.ts +40 -0
- package/dist/redux/api/workflowNodeApi.d.ts +6 -0
- package/dist/redux/api/workflowNodeApi.d.ts.map +1 -0
- package/dist/redux/api/workflowNodeApi.js +14 -0
- package/dist/redux/api/workflowNodeApi.js.map +1 -0
- package/dist/redux/api/workflowNodeApi.ts +18 -0
- package/dist/redux/features/popupSlice.d.ts +17 -2
- package/dist/redux/features/popupSlice.d.ts.map +1 -1
- package/dist/redux/features/popupSlice.js.map +1 -1
- package/dist/redux/features/popupSlice.ts +19 -3
- package/dist/redux/store/defaultStoreConfig.d.ts +13 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/defaultStoreConfig.js +4 -0
- package/dist/redux/store/defaultStoreConfig.js.map +1 -1
- package/dist/redux/store/defaultStoreConfig.ts +4 -0
- package/dist/redux/store/solidEntityApiPool.d.ts.map +1 -1
- package/dist/redux/store/solidEntityApiPool.js +1 -0
- package/dist/redux/store/solidEntityApiPool.js.map +1 -1
- package/dist/redux/store/solidEntityApiPool.ts +1 -0
- package/dist/resources/solid-custom.css +16 -0
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.css +3194 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js +3371 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.tsx +6215 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.css +217 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js +268 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.tsx +510 -0
- package/dist/routes/pages/admin/core/WorkflowExecutionDetailPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/WorkflowExecutionDetailPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowExecutionDetailPage.js +618 -0
- package/dist/routes/pages/admin/core/WorkflowExecutionDetailPage.js.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowExecutionDetailPage.tsx +1322 -0
- package/dist/routes/solidRoutes.d.ts.map +1 -1
- package/dist/routes/solidRoutes.js +6 -0
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +6 -0
- package/dist/types/extension-registry.d.ts +4 -0
- package/dist/types/extension-registry.d.ts.map +1 -1
- package/dist/types/extension-registry.js +5 -1
- package/dist/types/extension-registry.js.map +1 -1
- package/dist/types/extension-registry.ts +5 -1
- package/dist/types/solid-core.d.ts +32 -0
- package/dist/types/workflow-node.d.ts +142 -0
- package/dist/types/workflow-node.d.ts.map +1 -0
- package/dist/types/workflow-node.js +2 -0
- package/dist/types/workflow-node.js.map +1 -0
- package/dist/types/workflow-node.ts +179 -0
- package/package.json +3 -1
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
+
import { ArrowLeft, Braces, ChevronFirst, ChevronLast, ChevronLeft, ChevronRight, Layers3, Search, X } from "lucide-react";
|
|
23
|
+
import React from "react";
|
|
24
|
+
import { useNavigate, useParams } from "react-router-dom";
|
|
25
|
+
import qs from "qs";
|
|
26
|
+
import YAML from "yaml";
|
|
27
|
+
import { createSolidEntityApi } from "../../../../redux/api/solidEntityApi";
|
|
28
|
+
import { SolidButton, SolidCodeEditor, SolidInput, SolidSelect, SolidSpinner, SolidTag, } from "../../../../components/shad-cn-ui";
|
|
29
|
+
import "./WorkflowDefinitionEditorPage.css";
|
|
30
|
+
var WORKFLOW_LOG_LEVEL_OPTIONS = [
|
|
31
|
+
{ label: "All levels", value: "all" },
|
|
32
|
+
{ label: "Debug", value: "debug" },
|
|
33
|
+
{ label: "Info", value: "info" },
|
|
34
|
+
{ label: "Warn", value: "warn" },
|
|
35
|
+
{ label: "Error", value: "error" },
|
|
36
|
+
];
|
|
37
|
+
var WORKFLOW_EXECUTION_SUMMARY_FIELDS = [
|
|
38
|
+
"id",
|
|
39
|
+
"executionIdentifier",
|
|
40
|
+
"workflowKey",
|
|
41
|
+
"workflowDisplayName",
|
|
42
|
+
"status",
|
|
43
|
+
"triggerType",
|
|
44
|
+
"startedAt",
|
|
45
|
+
"finishedAt",
|
|
46
|
+
"durationMs",
|
|
47
|
+
"definitionVersion",
|
|
48
|
+
"definitionChecksum",
|
|
49
|
+
"errorSummary",
|
|
50
|
+
"requestedByUserId",
|
|
51
|
+
"createdAt",
|
|
52
|
+
];
|
|
53
|
+
var WORKFLOW_EXECUTION_INPUT_FIELDS = ["id", "inputPayload"];
|
|
54
|
+
var WORKFLOW_EXECUTION_ERROR_FIELDS = ["id", "errorDetails"];
|
|
55
|
+
var WORKFLOW_EXECUTION_DEFINITION_FIELDS = ["id", "definitionSnapshot"];
|
|
56
|
+
var WORKFLOW_PAGE_SIZE_OPTIONS = [25, 50, 100, 200];
|
|
57
|
+
function formatReadonlyJson(value, emptyValue) {
|
|
58
|
+
if (emptyValue === void 0) { emptyValue = "{}"; }
|
|
59
|
+
if (value === undefined || value === null || value === "")
|
|
60
|
+
return emptyValue;
|
|
61
|
+
if (typeof value === "string") {
|
|
62
|
+
try {
|
|
63
|
+
return JSON.stringify(JSON.parse(value), null, 2);
|
|
64
|
+
}
|
|
65
|
+
catch (_a) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return JSON.stringify(value, null, 2);
|
|
70
|
+
}
|
|
71
|
+
function formatReadonlyYaml(value) {
|
|
72
|
+
if (value === undefined || value === null || value === "")
|
|
73
|
+
return "";
|
|
74
|
+
if (typeof value === "string")
|
|
75
|
+
return value;
|
|
76
|
+
return YAML.stringify(value);
|
|
77
|
+
}
|
|
78
|
+
function normalizeJsonDisplayValue(value) {
|
|
79
|
+
if (value === undefined || value === null || value === "")
|
|
80
|
+
return null;
|
|
81
|
+
if (typeof value === "string") {
|
|
82
|
+
try {
|
|
83
|
+
return JSON.parse(value);
|
|
84
|
+
}
|
|
85
|
+
catch (_a) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
function isPlainObjectValue(value) {
|
|
92
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
93
|
+
}
|
|
94
|
+
function isUrlLike(value) {
|
|
95
|
+
return /^https?:\/\//i.test(value);
|
|
96
|
+
}
|
|
97
|
+
function formatOutputVisualValue(value) {
|
|
98
|
+
if (value === null || value === undefined)
|
|
99
|
+
return "null";
|
|
100
|
+
if (typeof value === "boolean")
|
|
101
|
+
return value ? "true" : "false";
|
|
102
|
+
if (typeof value === "string" || typeof value === "number")
|
|
103
|
+
return String(value);
|
|
104
|
+
return JSON.stringify(value);
|
|
105
|
+
}
|
|
106
|
+
function summarizeOutputValue(value) {
|
|
107
|
+
var normalizedValue = normalizeJsonDisplayValue(value);
|
|
108
|
+
if (normalizedValue === null || normalizedValue === undefined)
|
|
109
|
+
return "No output";
|
|
110
|
+
if (Array.isArray(normalizedValue))
|
|
111
|
+
return "".concat(normalizedValue.length, " item").concat(normalizedValue.length === 1 ? "" : "s");
|
|
112
|
+
if (isPlainObjectValue(normalizedValue)) {
|
|
113
|
+
var count = Object.keys(normalizedValue).length;
|
|
114
|
+
return "".concat(count, " field").concat(count === 1 ? "" : "s");
|
|
115
|
+
}
|
|
116
|
+
return String(formatOutputVisualValue(normalizedValue));
|
|
117
|
+
}
|
|
118
|
+
function formatExecutionDate(value) {
|
|
119
|
+
if (!value)
|
|
120
|
+
return "Not available";
|
|
121
|
+
var parsed = new Date(value);
|
|
122
|
+
if (Number.isNaN(parsed.getTime()))
|
|
123
|
+
return "Not available";
|
|
124
|
+
return parsed.toLocaleString(undefined, {
|
|
125
|
+
year: "numeric",
|
|
126
|
+
month: "short",
|
|
127
|
+
day: "numeric",
|
|
128
|
+
hour: "numeric",
|
|
129
|
+
minute: "2-digit",
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function formatExecutionLogTime(value) {
|
|
133
|
+
if (!value)
|
|
134
|
+
return "-";
|
|
135
|
+
var parsed = new Date(value);
|
|
136
|
+
if (Number.isNaN(parsed.getTime()))
|
|
137
|
+
return "-";
|
|
138
|
+
return parsed.toLocaleTimeString(undefined, {
|
|
139
|
+
hour: "2-digit",
|
|
140
|
+
minute: "2-digit",
|
|
141
|
+
second: "2-digit",
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function parseExecutionTimestamp(value) {
|
|
145
|
+
if (!value)
|
|
146
|
+
return null;
|
|
147
|
+
var parsed = new Date(value).getTime();
|
|
148
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
149
|
+
}
|
|
150
|
+
function getNumericDurationMs(value) {
|
|
151
|
+
var numericValue = typeof value === "string" ? Number(value) : typeof value === "number" ? value : null;
|
|
152
|
+
return typeof numericValue === "number" && Number.isFinite(numericValue) ? numericValue : null;
|
|
153
|
+
}
|
|
154
|
+
function formatDurationMs(value) {
|
|
155
|
+
var numericValue = getNumericDurationMs(value);
|
|
156
|
+
if (numericValue == null || Number.isNaN(numericValue) || numericValue <= 0)
|
|
157
|
+
return "Not available";
|
|
158
|
+
if (numericValue < 1000)
|
|
159
|
+
return "".concat(numericValue, " ms");
|
|
160
|
+
var seconds = numericValue / 1000;
|
|
161
|
+
if (seconds < 60)
|
|
162
|
+
return "".concat(seconds.toFixed(seconds >= 10 ? 0 : 1), " s");
|
|
163
|
+
var minutes = Math.floor(seconds / 60);
|
|
164
|
+
var remainingSeconds = Math.round(seconds % 60);
|
|
165
|
+
return "".concat(minutes, "m ").concat(remainingSeconds, "s");
|
|
166
|
+
}
|
|
167
|
+
function workflowLogLevelTone(level) {
|
|
168
|
+
var value = (level !== null && level !== void 0 ? level : "").toLowerCase();
|
|
169
|
+
if (value === "error" || value === "fatal")
|
|
170
|
+
return "danger";
|
|
171
|
+
if (value === "warn" || value === "warning")
|
|
172
|
+
return "warn";
|
|
173
|
+
if (value === "info" || value === "success")
|
|
174
|
+
return "success";
|
|
175
|
+
return undefined;
|
|
176
|
+
}
|
|
177
|
+
function buildWorkflowExecutionFieldsQueryString(fields) {
|
|
178
|
+
return qs.stringify({ fields: fields }, { encodeValuesOnly: true });
|
|
179
|
+
}
|
|
180
|
+
function buildWorkflowExecutionLogQueryString(options) {
|
|
181
|
+
var _a;
|
|
182
|
+
var queryData = {
|
|
183
|
+
limit: options.limit,
|
|
184
|
+
offset: options.offset,
|
|
185
|
+
fields: [
|
|
186
|
+
"id",
|
|
187
|
+
"logKey",
|
|
188
|
+
"level",
|
|
189
|
+
"message",
|
|
190
|
+
"eventType",
|
|
191
|
+
"source",
|
|
192
|
+
"nodeId",
|
|
193
|
+
"nodeType",
|
|
194
|
+
"sequenceNumber",
|
|
195
|
+
"occurredAt",
|
|
196
|
+
"context",
|
|
197
|
+
"metadata",
|
|
198
|
+
"createdAt",
|
|
199
|
+
],
|
|
200
|
+
sort: ["sequenceNumber:asc", "occurredAt:asc", "id:asc"],
|
|
201
|
+
filters: {
|
|
202
|
+
workflowExecution: {
|
|
203
|
+
id: {
|
|
204
|
+
$eq: options.workflowExecutionId,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
if (options.level && options.level !== "all") {
|
|
210
|
+
queryData.filters.level = {
|
|
211
|
+
$eqi: options.level,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
var trimmedSearch = (_a = options.search) === null || _a === void 0 ? void 0 : _a.trim();
|
|
215
|
+
if (trimmedSearch) {
|
|
216
|
+
queryData.filters.$or = [
|
|
217
|
+
{ message: { $containsi: trimmedSearch } },
|
|
218
|
+
{ nodeId: { $containsi: trimmedSearch } },
|
|
219
|
+
{ nodeType: { $containsi: trimmedSearch } },
|
|
220
|
+
{ source: { $containsi: trimmedSearch } },
|
|
221
|
+
{ eventType: { $containsi: trimmedSearch } },
|
|
222
|
+
];
|
|
223
|
+
}
|
|
224
|
+
return qs.stringify(queryData, { encodeValuesOnly: true });
|
|
225
|
+
}
|
|
226
|
+
function buildWorkflowStepExecutionQueryString(options) {
|
|
227
|
+
var queryData = {
|
|
228
|
+
limit: options.limit,
|
|
229
|
+
offset: options.offset,
|
|
230
|
+
fields: __spreadArray([
|
|
231
|
+
"id",
|
|
232
|
+
"stepExecutionKey",
|
|
233
|
+
"nodeId",
|
|
234
|
+
"nodeName",
|
|
235
|
+
"nodeKind",
|
|
236
|
+
"nodeType",
|
|
237
|
+
"status",
|
|
238
|
+
"attemptNumber",
|
|
239
|
+
"parentNodeId",
|
|
240
|
+
"parentStepExecutionKey",
|
|
241
|
+
"sequenceNumber",
|
|
242
|
+
"startedAt",
|
|
243
|
+
"finishedAt",
|
|
244
|
+
"durationMs",
|
|
245
|
+
"errorSummary",
|
|
246
|
+
"createdAt"
|
|
247
|
+
], (options.includeOutputPayload ? ["outputPayload"] : []), true),
|
|
248
|
+
sort: ["startedAt:asc", "sequenceNumber:asc", "id:asc"],
|
|
249
|
+
filters: __assign({ workflowExecution: {
|
|
250
|
+
id: {
|
|
251
|
+
$eq: options.workflowExecutionId,
|
|
252
|
+
},
|
|
253
|
+
} }, (options.includeOutputPayload
|
|
254
|
+
? {
|
|
255
|
+
outputPayload: {
|
|
256
|
+
$notNull: true,
|
|
257
|
+
},
|
|
258
|
+
}
|
|
259
|
+
: {})),
|
|
260
|
+
};
|
|
261
|
+
return qs.stringify(queryData, { encodeValuesOnly: true });
|
|
262
|
+
}
|
|
263
|
+
function buildExecutionOutputEntriesFromSteps(steps) {
|
|
264
|
+
return steps
|
|
265
|
+
.filter(function (step) { return normalizeJsonDisplayValue(step.outputPayload) !== null; })
|
|
266
|
+
.map(function (step) {
|
|
267
|
+
var _a, _b, _c;
|
|
268
|
+
return ({
|
|
269
|
+
key: String(step.id),
|
|
270
|
+
label: step.nodeName || step.nodeId || step.stepExecutionKey || "Step ".concat(step.id),
|
|
271
|
+
nodeId: (_a = step.nodeId) !== null && _a !== void 0 ? _a : undefined,
|
|
272
|
+
nodeType: (_c = (_b = step.nodeType) !== null && _b !== void 0 ? _b : step.nodeKind) !== null && _c !== void 0 ? _c : undefined,
|
|
273
|
+
value: step.outputPayload,
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
function renderOutputPrimitive(value) {
|
|
278
|
+
if (typeof value === "string" && isUrlLike(value)) {
|
|
279
|
+
return (_jsx("a", { href: value, target: "_blank", rel: "noreferrer", children: value }));
|
|
280
|
+
}
|
|
281
|
+
return formatOutputVisualValue(value);
|
|
282
|
+
}
|
|
283
|
+
function renderOutputVisual(value, options) {
|
|
284
|
+
if (options === void 0) { options = {}; }
|
|
285
|
+
var normalizedValue = normalizeJsonDisplayValue(value);
|
|
286
|
+
if (normalizedValue === null || normalizedValue === undefined) {
|
|
287
|
+
return (_jsxs("div", { className: "workflow-editor-output-empty", children: [_jsx("h4", { children: "No output produced" }), _jsx("p", { children: "This execution completed without returning an output payload." })] }));
|
|
288
|
+
}
|
|
289
|
+
if (!isPlainObjectValue(normalizedValue) && !Array.isArray(normalizedValue)) {
|
|
290
|
+
return (_jsxs("div", { className: "workflow-editor-output-primitive", children: [_jsx("span", { children: "Result" }), _jsx("strong", { children: renderOutputPrimitive(normalizedValue) })] }));
|
|
291
|
+
}
|
|
292
|
+
if (Array.isArray(normalizedValue)) {
|
|
293
|
+
if (!normalizedValue.length) {
|
|
294
|
+
return (_jsxs("div", { className: "workflow-editor-output-empty", children: [_jsx("h4", { children: "Empty array" }), _jsx("p", { children: "The execution returned an empty collection." })] }));
|
|
295
|
+
}
|
|
296
|
+
var objectRows_1 = normalizedValue.filter(isPlainObjectValue);
|
|
297
|
+
var tableKeys_1 = Array.from(new Set(objectRows_1
|
|
298
|
+
.flatMap(function (item) { return Object.keys(item); })
|
|
299
|
+
.filter(function (key) {
|
|
300
|
+
return objectRows_1.some(function (item) {
|
|
301
|
+
var cell = item[key];
|
|
302
|
+
return !isPlainObjectValue(cell) && !Array.isArray(cell);
|
|
303
|
+
});
|
|
304
|
+
}))).slice(0, 6);
|
|
305
|
+
if (objectRows_1.length === normalizedValue.length && tableKeys_1.length) {
|
|
306
|
+
return (_jsxs("div", { className: "workflow-editor-output-visual", children: [options.hideSummary ? null : (_jsxs("div", { className: "workflow-editor-output-visual__summary", children: [_jsx("strong", { children: normalizedValue.length }), _jsx("span", { children: "items returned" })] })), _jsx("div", { className: "workflow-editor-output-table-wrap", children: _jsxs("table", { className: "workflow-editor-output-table", children: [_jsx("thead", { children: _jsx("tr", { children: tableKeys_1.map(function (key) { return (_jsx("th", { children: key }, key)); }) }) }), _jsx("tbody", { children: objectRows_1.slice(0, 25).map(function (item, index) { return (_jsx("tr", { children: tableKeys_1.map(function (key) { return (_jsx("td", { children: renderOutputPrimitive(item[key]) }, key)); }) }, index)); }) })] }) })] }));
|
|
307
|
+
}
|
|
308
|
+
return (_jsx("div", { className: "workflow-editor-output-list", children: normalizedValue.slice(0, 25).map(function (item, index) { return (_jsxs("div", { className: "workflow-editor-output-list-item", children: [_jsxs("span", { children: ["Item ", index + 1] }), _jsx("strong", { children: renderOutputPrimitive(item) })] }, index)); }) }));
|
|
309
|
+
}
|
|
310
|
+
var entries = isPlainObjectValue(normalizedValue) ? Object.entries(normalizedValue) : [];
|
|
311
|
+
return (_jsxs("div", { className: "workflow-editor-output-object", children: [options.hideSummary ? null : (_jsxs("div", { className: "workflow-editor-output-visual__summary", children: [_jsx("strong", { children: entries.length }), _jsx("span", { children: "top-level fields" })] })), _jsx("div", { className: "workflow-editor-output-object-grid", children: entries.map(function (_a) {
|
|
312
|
+
var key = _a[0], item = _a[1];
|
|
313
|
+
var isNested = isPlainObjectValue(item) || Array.isArray(item);
|
|
314
|
+
return (_jsxs("div", { className: "workflow-editor-output-field ".concat(isNested ? "is-nested" : ""), children: [_jsx("span", { children: key }), isNested ? _jsx("pre", { children: formatReadonlyJson(item) }) : _jsx("strong", { children: renderOutputPrimitive(item) })] }, key));
|
|
315
|
+
}) })] }));
|
|
316
|
+
}
|
|
317
|
+
function WorkflowExecutionPagination(_a) {
|
|
318
|
+
var _b, _c, _d;
|
|
319
|
+
var meta = _a.meta, pagination = _a.pagination, disabled = _a.disabled, onChange = _a.onChange;
|
|
320
|
+
var totalRecords = (_b = meta === null || meta === void 0 ? void 0 : meta.totalRecords) !== null && _b !== void 0 ? _b : 0;
|
|
321
|
+
var totalPages = (_c = meta === null || meta === void 0 ? void 0 : meta.totalPages) !== null && _c !== void 0 ? _c : Math.max(1, Math.ceil(totalRecords / pagination.limit));
|
|
322
|
+
var currentPage = (_d = meta === null || meta === void 0 ? void 0 : meta.currentPage) !== null && _d !== void 0 ? _d : Math.floor(pagination.offset / pagination.limit) + 1;
|
|
323
|
+
var firstRecord = totalRecords === 0 ? 0 : pagination.offset + 1;
|
|
324
|
+
var lastRecord = Math.min(pagination.offset + pagination.limit, totalRecords);
|
|
325
|
+
var canGoPrevious = currentPage > 1;
|
|
326
|
+
var canGoNext = currentPage < totalPages;
|
|
327
|
+
var goToPage = function (page) {
|
|
328
|
+
var safePage = Math.min(Math.max(page, 1), totalPages);
|
|
329
|
+
onChange({
|
|
330
|
+
offset: (safePage - 1) * pagination.limit,
|
|
331
|
+
limit: pagination.limit,
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
return (_jsxs("div", { className: "workflow-editor-execution-pagination", children: [_jsxs("div", { className: "workflow-editor-execution-pagination__meta", children: [_jsx("span", { children: "Rows" }), _jsx(SolidSelect, { value: pagination.limit, options: WORKFLOW_PAGE_SIZE_OPTIONS.map(function (option) { return ({ label: String(option), value: option }); }), native: false, menuPlacement: "top", disabled: disabled, onChange: function (event) { return onChange({ offset: 0, limit: Number(event.value) }); } }), _jsxs("span", { children: [firstRecord, " - ", lastRecord, " of ", totalRecords] })] }), _jsxs("div", { className: "workflow-editor-execution-pagination__actions", children: [_jsx(SolidButton, { size: "small", variant: "ghost", leftIcon: _jsx(ChevronFirst, { size: 14 }), "aria-label": "First page", disabled: disabled || !canGoPrevious, onClick: function () { return goToPage(1); } }), _jsx(SolidButton, { size: "small", variant: "ghost", leftIcon: _jsx(ChevronLeft, { size: 14 }), "aria-label": "Previous page", disabled: disabled || !canGoPrevious, onClick: function () { return goToPage(currentPage - 1); } }), _jsxs("span", { children: ["Page ", currentPage, " of ", totalPages] }), _jsx(SolidButton, { size: "small", variant: "ghost", leftIcon: _jsx(ChevronRight, { size: 14 }), "aria-label": "Next page", disabled: disabled || !canGoNext, onClick: function () { return goToPage(currentPage + 1); } }), _jsx(SolidButton, { size: "small", variant: "ghost", leftIcon: _jsx(ChevronLast, { size: 14 }), "aria-label": "Last page", disabled: disabled || !canGoNext, onClick: function () { return goToPage(totalPages); } })] })] }));
|
|
335
|
+
}
|
|
336
|
+
export function WorkflowExecutionDetailPage() {
|
|
337
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
338
|
+
var params = useParams();
|
|
339
|
+
var navigate = useNavigate();
|
|
340
|
+
var executionId = (_a = params.id) !== null && _a !== void 0 ? _a : "";
|
|
341
|
+
var workflowExecutionApi = React.useMemo(function () { return createSolidEntityApi("workflowExecution"); }, []);
|
|
342
|
+
var workflowExecutionLogApi = React.useMemo(function () { return createSolidEntityApi("workflowExecutionLog"); }, []);
|
|
343
|
+
var workflowStepExecutionApi = React.useMemo(function () { return createSolidEntityApi("workflowStepExecution"); }, []);
|
|
344
|
+
var useGetSolidEntityByIdQuery = workflowExecutionApi.useGetSolidEntityByIdQuery, useLazyGetSolidEntityByIdQuery = workflowExecutionApi.useLazyGetSolidEntityByIdQuery;
|
|
345
|
+
var useLazyGetWorkflowExecutionLogsQuery = workflowExecutionLogApi.useLazyGetSolidEntitiesQuery;
|
|
346
|
+
var useLazyGetWorkflowStepExecutionsQuery = workflowStepExecutionApi.useLazyGetSolidEntitiesQuery;
|
|
347
|
+
var _1 = useGetSolidEntityByIdQuery({
|
|
348
|
+
id: executionId,
|
|
349
|
+
qs: buildWorkflowExecutionFieldsQueryString(WORKFLOW_EXECUTION_SUMMARY_FIELDS),
|
|
350
|
+
}, { skip: !executionId }), workflowExecutionResponse = _1.data, isWorkflowExecutionLoading = _1.isLoading, isWorkflowExecutionError = _1.isError;
|
|
351
|
+
var _2 = useLazyGetSolidEntityByIdQuery(), triggerGetWorkflowExecutionDetail = _2[0], workflowExecutionDetailQuery = _2[1];
|
|
352
|
+
var _3 = useLazyGetWorkflowExecutionLogsQuery(), triggerGetWorkflowExecutionLogs = _3[0], workflowExecutionLogsQuery = _3[1];
|
|
353
|
+
var _4 = useLazyGetWorkflowStepExecutionsQuery(), triggerGetWorkflowStepExecutions = _4[0], workflowStepExecutionsQuery = _4[1];
|
|
354
|
+
var _5 = useLazyGetWorkflowStepExecutionsQuery(), triggerGetWorkflowOutputStepExecutions = _5[0], workflowOutputStepExecutionsQuery = _5[1];
|
|
355
|
+
var executionSummary = workflowExecutionResponse === null || workflowExecutionResponse === void 0 ? void 0 : workflowExecutionResponse.data;
|
|
356
|
+
var executionDetail = (_b = workflowExecutionDetailQuery.data) === null || _b === void 0 ? void 0 : _b.data;
|
|
357
|
+
var execution = executionSummary
|
|
358
|
+
? __assign(__assign({}, executionSummary), executionDetail) : undefined;
|
|
359
|
+
var _6 = React.useState("summary"), activeTab = _6[0], setActiveTab = _6[1];
|
|
360
|
+
var _7 = React.useState("visual"), outputMode = _7[0], setOutputMode = _7[1];
|
|
361
|
+
var _8 = React.useState(null), expandedOutputKey = _8[0], setExpandedOutputKey = _8[1];
|
|
362
|
+
var _9 = React.useState("all"), logLevelFilter = _9[0], setLogLevelFilter = _9[1];
|
|
363
|
+
var _10 = React.useState(""), logSearch = _10[0], setLogSearch = _10[1];
|
|
364
|
+
var _11 = React.useState(""), debouncedLogSearch = _11[0], setDebouncedLogSearch = _11[1];
|
|
365
|
+
var _12 = React.useState(null), expandedLogId = _12[0], setExpandedLogId = _12[1];
|
|
366
|
+
var _13 = React.useState(null), expandedTimelineStepId = _13[0], setExpandedTimelineStepId = _13[1];
|
|
367
|
+
var _14 = React.useState({
|
|
368
|
+
offset: 0,
|
|
369
|
+
limit: 50,
|
|
370
|
+
}), timelinePagination = _14[0], setTimelinePagination = _14[1];
|
|
371
|
+
var _15 = React.useState({
|
|
372
|
+
offset: 0,
|
|
373
|
+
limit: 100,
|
|
374
|
+
}), logPagination = _15[0], setLogPagination = _15[1];
|
|
375
|
+
var _16 = React.useState({
|
|
376
|
+
offset: 0,
|
|
377
|
+
limit: 50,
|
|
378
|
+
}), outputPagination = _16[0], setOutputPagination = _16[1];
|
|
379
|
+
React.useEffect(function () {
|
|
380
|
+
var timer = window.setTimeout(function () {
|
|
381
|
+
setDebouncedLogSearch(logSearch);
|
|
382
|
+
}, 300);
|
|
383
|
+
return function () { return window.clearTimeout(timer); };
|
|
384
|
+
}, [logSearch]);
|
|
385
|
+
React.useEffect(function () {
|
|
386
|
+
setLogPagination(function (current) { return (__assign(__assign({}, current), { offset: 0 })); });
|
|
387
|
+
}, [logLevelFilter, debouncedLogSearch]);
|
|
388
|
+
React.useEffect(function () {
|
|
389
|
+
if (!(execution === null || execution === void 0 ? void 0 : execution.id) || activeTab !== "timeline")
|
|
390
|
+
return;
|
|
391
|
+
void triggerGetWorkflowStepExecutions(buildWorkflowStepExecutionQueryString({
|
|
392
|
+
workflowExecutionId: execution.id,
|
|
393
|
+
offset: timelinePagination.offset,
|
|
394
|
+
limit: timelinePagination.limit,
|
|
395
|
+
}));
|
|
396
|
+
}, [activeTab, execution === null || execution === void 0 ? void 0 : execution.id, timelinePagination, triggerGetWorkflowStepExecutions]);
|
|
397
|
+
React.useEffect(function () {
|
|
398
|
+
if (!(execution === null || execution === void 0 ? void 0 : execution.id) || activeTab !== "logs")
|
|
399
|
+
return;
|
|
400
|
+
void triggerGetWorkflowExecutionLogs(buildWorkflowExecutionLogQueryString({
|
|
401
|
+
workflowExecutionId: execution.id,
|
|
402
|
+
level: logLevelFilter,
|
|
403
|
+
search: debouncedLogSearch,
|
|
404
|
+
offset: logPagination.offset,
|
|
405
|
+
limit: logPagination.limit,
|
|
406
|
+
}));
|
|
407
|
+
}, [activeTab, debouncedLogSearch, execution === null || execution === void 0 ? void 0 : execution.id, logLevelFilter, logPagination, triggerGetWorkflowExecutionLogs]);
|
|
408
|
+
React.useEffect(function () {
|
|
409
|
+
if (!(execution === null || execution === void 0 ? void 0 : execution.id) || activeTab !== "output")
|
|
410
|
+
return;
|
|
411
|
+
void triggerGetWorkflowOutputStepExecutions(buildWorkflowStepExecutionQueryString({
|
|
412
|
+
workflowExecutionId: execution.id,
|
|
413
|
+
offset: outputPagination.offset,
|
|
414
|
+
limit: outputPagination.limit,
|
|
415
|
+
includeOutputPayload: true,
|
|
416
|
+
}));
|
|
417
|
+
}, [activeTab, execution === null || execution === void 0 ? void 0 : execution.id, outputPagination, triggerGetWorkflowOutputStepExecutions]);
|
|
418
|
+
React.useEffect(function () {
|
|
419
|
+
if (!executionId)
|
|
420
|
+
return;
|
|
421
|
+
if (activeTab === "input") {
|
|
422
|
+
void triggerGetWorkflowExecutionDetail({
|
|
423
|
+
id: executionId,
|
|
424
|
+
qs: buildWorkflowExecutionFieldsQueryString(WORKFLOW_EXECUTION_INPUT_FIELDS),
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
if (activeTab === "error") {
|
|
428
|
+
void triggerGetWorkflowExecutionDetail({
|
|
429
|
+
id: executionId,
|
|
430
|
+
qs: buildWorkflowExecutionFieldsQueryString(WORKFLOW_EXECUTION_ERROR_FIELDS),
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
if (activeTab === "definition") {
|
|
434
|
+
void triggerGetWorkflowExecutionDetail({
|
|
435
|
+
id: executionId,
|
|
436
|
+
qs: buildWorkflowExecutionFieldsQueryString(WORKFLOW_EXECUTION_DEFINITION_FIELDS),
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
}, [activeTab, executionId, triggerGetWorkflowExecutionDetail]);
|
|
440
|
+
var executionLogRecords = React.useMemo(function () { var _a, _b; return ((_b = (_a = workflowExecutionLogsQuery.data) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []); }, [(_c = workflowExecutionLogsQuery.data) === null || _c === void 0 ? void 0 : _c.records]);
|
|
441
|
+
var executionLogMeta = (_d = workflowExecutionLogsQuery.data) === null || _d === void 0 ? void 0 : _d.meta;
|
|
442
|
+
var executionStepRecords = React.useMemo(function () { var _a, _b; return ((_b = (_a = workflowStepExecutionsQuery.data) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []); }, [(_e = workflowStepExecutionsQuery.data) === null || _e === void 0 ? void 0 : _e.records]);
|
|
443
|
+
var executionStepMeta = (_f = workflowStepExecutionsQuery.data) === null || _f === void 0 ? void 0 : _f.meta;
|
|
444
|
+
var outputStepRecords = React.useMemo(function () { var _a, _b; return ((_b = (_a = workflowOutputStepExecutionsQuery.data) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []); }, [(_g = workflowOutputStepExecutionsQuery.data) === null || _g === void 0 ? void 0 : _g.records]);
|
|
445
|
+
var outputStepMeta = (_h = workflowOutputStepExecutionsQuery.data) === null || _h === void 0 ? void 0 : _h.meta;
|
|
446
|
+
var executionTimeline = React.useMemo(function () {
|
|
447
|
+
var _a, _b, _c, _d;
|
|
448
|
+
if (!execution) {
|
|
449
|
+
return {
|
|
450
|
+
rows: [],
|
|
451
|
+
totalDurationMs: 0,
|
|
452
|
+
startLabel: "-",
|
|
453
|
+
endLabel: "-",
|
|
454
|
+
slowestStep: null,
|
|
455
|
+
statusCounts: {},
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
var executionStart = (_b = (_a = parseExecutionTimestamp(execution.startedAt)) !== null && _a !== void 0 ? _a : parseExecutionTimestamp(execution.createdAt)) !== null && _b !== void 0 ? _b : Date.now();
|
|
459
|
+
var executionFinish = (_c = parseExecutionTimestamp(execution.finishedAt)) !== null && _c !== void 0 ? _c : (getNumericDurationMs(execution.durationMs) != null
|
|
460
|
+
? executionStart + ((_d = getNumericDurationMs(execution.durationMs)) !== null && _d !== void 0 ? _d : 0)
|
|
461
|
+
: executionStart);
|
|
462
|
+
var sortedSteps = __spreadArray([], executionStepRecords, true).sort(function (first, second) {
|
|
463
|
+
var _a, _b, _c, _d;
|
|
464
|
+
var firstSequence = (_a = first.sequenceNumber) !== null && _a !== void 0 ? _a : first.id;
|
|
465
|
+
var secondSequence = (_b = second.sequenceNumber) !== null && _b !== void 0 ? _b : second.id;
|
|
466
|
+
var firstStart = (_c = parseExecutionTimestamp(first.startedAt)) !== null && _c !== void 0 ? _c : executionStart;
|
|
467
|
+
var secondStart = (_d = parseExecutionTimestamp(second.startedAt)) !== null && _d !== void 0 ? _d : executionStart;
|
|
468
|
+
return firstStart - secondStart || firstSequence - secondSequence;
|
|
469
|
+
});
|
|
470
|
+
var normalizedSteps = sortedSteps.map(function (step) {
|
|
471
|
+
var _a, _b, _c, _d;
|
|
472
|
+
var durationMs = (_a = getNumericDurationMs(step.durationMs)) !== null && _a !== void 0 ? _a : 0;
|
|
473
|
+
var startedAt = (_c = (_b = parseExecutionTimestamp(step.startedAt)) !== null && _b !== void 0 ? _b : parseExecutionTimestamp(step.createdAt)) !== null && _c !== void 0 ? _c : executionStart;
|
|
474
|
+
var finishedAt = (_d = parseExecutionTimestamp(step.finishedAt)) !== null && _d !== void 0 ? _d : (durationMs > 0 ? startedAt + durationMs : startedAt);
|
|
475
|
+
return {
|
|
476
|
+
step: step,
|
|
477
|
+
startedAt: startedAt,
|
|
478
|
+
finishedAt: Math.max(finishedAt, startedAt),
|
|
479
|
+
durationMs: Math.max(durationMs, Math.max(finishedAt - startedAt, 0)),
|
|
480
|
+
};
|
|
481
|
+
});
|
|
482
|
+
var startMs = Math.min.apply(Math, __spreadArray([executionStart], normalizedSteps.map(function (item) { return item.startedAt; }), false));
|
|
483
|
+
var endMs = Math.max.apply(Math, __spreadArray(__spreadArray([executionFinish], normalizedSteps.map(function (item) { return item.finishedAt; }), false), [startMs + 1], false));
|
|
484
|
+
var spanMs = Math.max(endMs - startMs, 1);
|
|
485
|
+
var statusCounts = {};
|
|
486
|
+
var slowestStep = null;
|
|
487
|
+
var slowestDuration = -1;
|
|
488
|
+
var rows = normalizedSteps.map(function (item, index) {
|
|
489
|
+
var _a, _b;
|
|
490
|
+
var status = ((_a = item.step.status) !== null && _a !== void 0 ? _a : "unknown").toLowerCase();
|
|
491
|
+
statusCounts[status] = ((_b = statusCounts[status]) !== null && _b !== void 0 ? _b : 0) + 1;
|
|
492
|
+
if (item.durationMs > slowestDuration) {
|
|
493
|
+
slowestDuration = item.durationMs;
|
|
494
|
+
slowestStep = item.step;
|
|
495
|
+
}
|
|
496
|
+
var width = Math.max((item.durationMs / spanMs) * 100, item.durationMs > 0 ? 1.2 : 0.55);
|
|
497
|
+
return __assign(__assign({}, item), { index: index, label: item.step.nodeName || item.step.nodeId || item.step.stepExecutionKey || "Step ".concat(index + 1), startOffsetPercent: Math.min(Math.max(((item.startedAt - startMs) / spanMs) * 100, 0), 100), widthPercent: Math.min(width, 100), depth: item.step.parentStepExecutionKey || item.step.parentNodeId ? 1 : 0, status: status });
|
|
498
|
+
});
|
|
499
|
+
return {
|
|
500
|
+
rows: rows,
|
|
501
|
+
totalDurationMs: spanMs,
|
|
502
|
+
startLabel: formatExecutionLogTime(new Date(startMs).toISOString()),
|
|
503
|
+
endLabel: formatExecutionLogTime(new Date(endMs).toISOString()),
|
|
504
|
+
slowestStep: slowestStep,
|
|
505
|
+
statusCounts: statusCounts,
|
|
506
|
+
};
|
|
507
|
+
}, [execution, executionStepRecords]);
|
|
508
|
+
var outputEntries = React.useMemo(function () { return buildExecutionOutputEntriesFromSteps(outputStepRecords); }, [outputStepRecords]);
|
|
509
|
+
var logLevelCounts = executionLogRecords.reduce(function (counts, log) {
|
|
510
|
+
var _a, _b;
|
|
511
|
+
var key = ((_a = log.level) !== null && _a !== void 0 ? _a : "unknown").toLowerCase();
|
|
512
|
+
counts[key] = ((_b = counts[key]) !== null && _b !== void 0 ? _b : 0) + 1;
|
|
513
|
+
return counts;
|
|
514
|
+
}, {});
|
|
515
|
+
if (isWorkflowExecutionLoading) {
|
|
516
|
+
return (_jsx("div", { className: "workflow-editor-page workflow-editor-page--loading", children: _jsx(SolidSpinner, {}) }));
|
|
517
|
+
}
|
|
518
|
+
if (isWorkflowExecutionError || !execution) {
|
|
519
|
+
return (_jsx("div", { className: "workflow-editor-page workflow-execution-detail-page", children: _jsx("div", { className: "workflow-editor-empty-state", children: "Workflow execution not found." }) }));
|
|
520
|
+
}
|
|
521
|
+
var tabs = [
|
|
522
|
+
{ value: "summary", label: "Summary" },
|
|
523
|
+
{ value: "timeline", label: "Timeline" },
|
|
524
|
+
{ value: "logs", label: "Logs" },
|
|
525
|
+
{ value: "input", label: "Input" },
|
|
526
|
+
{ value: "output", label: "Output" },
|
|
527
|
+
{ value: "error", label: "Error" },
|
|
528
|
+
{ value: "definition", label: "Definition" },
|
|
529
|
+
];
|
|
530
|
+
return (_jsxs("div", { className: "workflow-editor-page workflow-execution-detail-page", children: [_jsx("div", { className: "workflow-editor-header", children: _jsx("div", { className: "workflow-editor-header-main", children: _jsx(SolidButton, { size: "small", variant: "ghost", leftIcon: _jsx(ArrowLeft, { size: 16 }), onClick: function () { return navigate(-1); }, children: "Back" }) }) }), _jsxs("section", { className: "workflow-editor-execution-modal workflow-execution-detail-page__surface", children: [_jsx("div", { className: "workflow-editor-execution-modal__header", children: _jsxs("div", { children: [_jsx("div", { className: "workflow-editor-execution-modal__eyebrow", children: "Execution Detail" }), _jsx("h3", { children: (_j = execution.executionIdentifier) !== null && _j !== void 0 ? _j : "Execution ".concat(execution.id) }), _jsxs("div", { className: "workflow-editor-execution-modal__meta", children: [_jsx(SolidTag, { children: (_k = execution.status) !== null && _k !== void 0 ? _k : "Unknown" }), _jsx("span", { children: formatDurationMs(execution.durationMs) }), _jsx("span", { children: formatExecutionDate(execution.startedAt || execution.createdAt) })] })] }) }), _jsxs("div", { className: "workflow-editor-execution-modal-tabs", children: [_jsx("div", { className: "workflow-editor-execution-modal-tabs__list", role: "tablist", "aria-label": "Execution detail sections", children: tabs.map(function (tab) {
|
|
531
|
+
var isActive = activeTab === tab.value;
|
|
532
|
+
return (_jsx("button", { type: "button", role: "tab", "aria-selected": isActive, "aria-controls": "workflow-execution-detail-tab-".concat(tab.value), id: "workflow-execution-detail-tab-trigger-".concat(tab.value), className: "workflow-editor-execution-modal-tabs__trigger ".concat(isActive ? "is-active" : ""), onClick: function () { return setActiveTab(tab.value); }, children: tab.label }, tab.value));
|
|
533
|
+
}) }), _jsxs("div", { role: "tabpanel", id: "workflow-execution-detail-tab-".concat(activeTab), "aria-labelledby": "workflow-execution-detail-tab-trigger-".concat(activeTab), className: "workflow-editor-execution-modal-tabs__panel", children: [activeTab === "summary" ? (_jsx("div", { className: "workflow-editor-execution-detail-summary", children: [
|
|
534
|
+
["Status", (_l = execution.status) !== null && _l !== void 0 ? _l : "Unknown"],
|
|
535
|
+
["Execution Identifier", (_m = execution.executionIdentifier) !== null && _m !== void 0 ? _m : "-"],
|
|
536
|
+
["Workflow", (_o = execution.workflowDisplayName) !== null && _o !== void 0 ? _o : "-"],
|
|
537
|
+
["Workflow Key", (_p = execution.workflowKey) !== null && _p !== void 0 ? _p : "-"],
|
|
538
|
+
["Trigger Type", (_q = execution.triggerType) !== null && _q !== void 0 ? _q : "manual"],
|
|
539
|
+
["Started", formatExecutionDate(execution.startedAt || execution.createdAt)],
|
|
540
|
+
["Finished", formatExecutionDate(execution.finishedAt)],
|
|
541
|
+
["Duration", formatDurationMs(execution.durationMs)],
|
|
542
|
+
["Definition Version", (_r = execution.definitionVersion) !== null && _r !== void 0 ? _r : "-"],
|
|
543
|
+
["Definition Checksum", (_s = execution.definitionChecksum) !== null && _s !== void 0 ? _s : "-"],
|
|
544
|
+
["Requested By", (_t = execution.requestedByUserId) !== null && _t !== void 0 ? _t : "-"],
|
|
545
|
+
].map(function (_a) {
|
|
546
|
+
var label = _a[0], value = _a[1];
|
|
547
|
+
return (_jsxs("div", { className: "workflow-editor-execution-detail-kv", children: [_jsx("div", { className: "workflow-editor-execution-detail-kv__label", children: label }), _jsx("div", { className: "workflow-editor-execution-detail-kv__value", children: value })] }, label));
|
|
548
|
+
}) })) : null, activeTab === "timeline" ? (_jsxs("div", { className: "workflow-editor-execution-timeline", children: [_jsxs("div", { className: "workflow-editor-execution-timeline__hero", children: [_jsxs("div", { children: [_jsx("h4", { children: "Execution Timeline" }), _jsx("p", { children: "Step-level timing across this execution." })] }), _jsxs("div", { className: "workflow-editor-execution-timeline__stats", children: [_jsxs("div", { children: [_jsx("span", { children: "Total span" }), _jsx("strong", { children: formatDurationMs(executionTimeline.totalDurationMs) })] }), _jsxs("div", { children: [_jsx("span", { children: "Steps" }), _jsx("strong", { children: (_u = executionStepMeta === null || executionStepMeta === void 0 ? void 0 : executionStepMeta.totalRecords) !== null && _u !== void 0 ? _u : executionTimeline.rows.length })] }), _jsxs("div", { children: [_jsx("span", { children: "Slowest" }), _jsx("strong", { children: (_y = (_w = (_v = executionTimeline.slowestStep) === null || _v === void 0 ? void 0 : _v.nodeName) !== null && _w !== void 0 ? _w : (_x = executionTimeline.slowestStep) === null || _x === void 0 ? void 0 : _x.nodeId) !== null && _y !== void 0 ? _y : "-" })] })] })] }), workflowStepExecutionsQuery.isFetching && !executionTimeline.rows.length ? (_jsxs("div", { className: "workflow-editor-execution-timeline__loading", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Loading step timeline..." })] })) : executionTimeline.rows.length ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "workflow-editor-execution-timeline__legend", children: Object.entries(executionTimeline.statusCounts).map(function (_a) {
|
|
549
|
+
var status = _a[0], count = _a[1];
|
|
550
|
+
return (_jsxs(SolidTag, { tone: workflowLogLevelTone(status), children: [status, ": ", count] }, status));
|
|
551
|
+
}) }), _jsxs("div", { className: "workflow-editor-execution-gantt", children: [_jsxs("div", { className: "workflow-editor-execution-gantt__ruler", children: [_jsx("span", { children: executionTimeline.startLabel }), _jsx("span", { children: formatDurationMs(executionTimeline.totalDurationMs) }), _jsx("span", { children: executionTimeline.endLabel })] }), _jsx("div", { className: "workflow-editor-execution-gantt__rows", children: executionTimeline.rows.map(function (row) {
|
|
552
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
553
|
+
var isExpanded = expandedTimelineStepId === row.step.id;
|
|
554
|
+
return (_jsxs("div", { className: "workflow-editor-execution-gantt-row workflow-editor-execution-gantt-row--".concat(row.status, " ").concat(isExpanded ? "is-expanded" : ""), children: [_jsxs("button", { type: "button", className: "workflow-editor-execution-gantt-row__main", "aria-expanded": isExpanded, onClick: function () { return setExpandedTimelineStepId(function (current) { return current === row.step.id ? null : row.step.id; }); }, children: [_jsx("span", { className: "workflow-editor-execution-gantt-row__toggle", children: _jsx(ChevronRight, { size: 14 }) }), _jsxs("span", { className: "workflow-editor-execution-gantt-row__identity", style: { "--workflow-step-depth": row.depth }, children: [_jsx("strong", { children: row.label }), _jsx("span", { children: (_b = (_a = row.step.nodeType) !== null && _a !== void 0 ? _a : row.step.nodeKind) !== null && _b !== void 0 ? _b : "step" })] }), _jsx("span", { className: "workflow-editor-execution-gantt-row__track", children: _jsx("span", { className: "workflow-editor-execution-gantt-row__bar", style: { left: "".concat(row.startOffsetPercent, "%"), width: "".concat(row.widthPercent, "%") } }) }), _jsx(SolidTag, { tone: workflowLogLevelTone(row.status), children: (_c = row.step.status) !== null && _c !== void 0 ? _c : "unknown" }), _jsx("span", { className: "workflow-editor-execution-gantt-row__duration", children: formatDurationMs(row.durationMs) })] }), isExpanded ? (_jsx("div", { className: "workflow-editor-execution-gantt-row__details", children: _jsxs("div", { className: "workflow-editor-execution-step-inspector", children: [_jsxs("div", { className: "workflow-editor-execution-step-inspector__header", children: [_jsxs("div", { children: [_jsx("span", { children: "Step Detail" }), _jsx("h4", { children: row.label })] }), _jsx("button", { type: "button", "aria-label": "Collapse step detail", onClick: function () { return setExpandedTimelineStepId(null); }, children: _jsx(X, { size: 14 }) })] }), _jsx("div", { className: "workflow-editor-execution-step-inspector__meta", children: [
|
|
555
|
+
["Status", (_d = row.step.status) !== null && _d !== void 0 ? _d : "unknown"],
|
|
556
|
+
["Node Id", (_e = row.step.nodeId) !== null && _e !== void 0 ? _e : "-"],
|
|
557
|
+
["Node Type", (_f = row.step.nodeType) !== null && _f !== void 0 ? _f : "-"],
|
|
558
|
+
["Attempt", (_g = row.step.attemptNumber) !== null && _g !== void 0 ? _g : 1],
|
|
559
|
+
["Started", formatExecutionDate(row.step.startedAt)],
|
|
560
|
+
["Finished", formatExecutionDate(row.step.finishedAt)],
|
|
561
|
+
["Duration", formatDurationMs(row.durationMs)],
|
|
562
|
+
["Step Key", (_h = row.step.stepExecutionKey) !== null && _h !== void 0 ? _h : "-"],
|
|
563
|
+
].map(function (_a) {
|
|
564
|
+
var label = _a[0], value = _a[1];
|
|
565
|
+
return (_jsxs("div", { children: [_jsx("span", { children: label }), _jsx("strong", { children: value })] }, label));
|
|
566
|
+
}) }), row.step.errorSummary ? (_jsx("div", { className: "workflow-editor-execution-step-inspector__error", children: row.step.errorSummary })) : null] }) })) : null] }, row.step.id));
|
|
567
|
+
}) })] }), _jsx(WorkflowExecutionPagination, { meta: executionStepMeta, pagination: timelinePagination, disabled: workflowStepExecutionsQuery.isFetching, onChange: function (nextPagination) {
|
|
568
|
+
setExpandedTimelineStepId(null);
|
|
569
|
+
setTimelinePagination(nextPagination);
|
|
570
|
+
} })] })) : (_jsxs("div", { className: "workflow-editor-execution-timeline__empty", children: [_jsx("h4", { children: "No step timing captured" }), _jsx("p", { children: "This execution does not have persisted step execution records yet." })] }))] })) : null, activeTab === "logs" ? (_jsxs("div", { className: "workflow-editor-execution-logs", children: [_jsxs("div", { className: "workflow-editor-execution-logs__hero", children: [_jsxs("div", { children: [_jsx("h4", { children: "Execution Log Stream" }), _jsx("p", { children: "Runtime messages emitted while this execution was processed." })] }), _jsxs("div", { className: "workflow-editor-execution-logs__stats", children: [_jsx("span", { children: workflowExecutionLogsQuery.isFetching
|
|
571
|
+
? "Loading"
|
|
572
|
+
: "".concat(executionLogRecords.length, " of ").concat((_z = executionLogMeta === null || executionLogMeta === void 0 ? void 0 : executionLogMeta.totalRecords) !== null && _z !== void 0 ? _z : executionLogRecords.length, " logs") }), Object.entries(logLevelCounts).map(function (_a) {
|
|
573
|
+
var level = _a[0], count = _a[1];
|
|
574
|
+
return (_jsxs(SolidTag, { tone: workflowLogLevelTone(level), children: [level, ": ", count] }, level));
|
|
575
|
+
})] })] }), _jsxs("div", { className: "workflow-editor-execution-logs__filters", children: [_jsxs("div", { className: "workflow-editor-execution-logs__search", children: [_jsx(Search, { size: 14 }), _jsx(SolidInput, { value: logSearch, placeholder: "Search message, node, source", onChange: function (event) {
|
|
576
|
+
setLogSearch(event.target.value);
|
|
577
|
+
setExpandedLogId(null);
|
|
578
|
+
} })] }), _jsx(SolidSelect, { value: logLevelFilter, options: WORKFLOW_LOG_LEVEL_OPTIONS, onChange: function (event) {
|
|
579
|
+
var _a;
|
|
580
|
+
setLogLevelFilter((_a = event.value) !== null && _a !== void 0 ? _a : "all");
|
|
581
|
+
setExpandedLogId(null);
|
|
582
|
+
} })] }), workflowExecutionLogsQuery.isFetching && executionLogRecords.length ? (_jsxs("div", { className: "workflow-editor-execution-logs__refreshing", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Refreshing logs..." })] })) : null, workflowExecutionLogsQuery.isFetching && !executionLogRecords.length ? (_jsxs("div", { className: "workflow-editor-execution-logs__loading", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Loading execution logs..." })] })) : executionLogRecords.length ? (_jsx("div", { className: "workflow-editor-execution-log-list", children: executionLogRecords.map(function (log) {
|
|
583
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
584
|
+
var isSelected = expandedLogId === log.id;
|
|
585
|
+
return (_jsxs("div", { className: "workflow-editor-execution-log-row workflow-editor-execution-log-row--".concat(((_a = log.level) !== null && _a !== void 0 ? _a : "info").toLowerCase(), " ").concat(isSelected ? "is-selected" : ""), children: [_jsxs("button", { type: "button", className: "workflow-editor-execution-log-row__main", "aria-expanded": isSelected, onClick: function () { return setExpandedLogId(function (current) { return current === log.id ? null : log.id; }); }, children: [_jsx("span", { className: "workflow-editor-execution-log-row__toggle", children: _jsx(ChevronRight, { size: 14 }) }), _jsx("span", { className: "workflow-editor-execution-log-row__sequence", children: (_b = log.sequenceNumber) !== null && _b !== void 0 ? _b : log.id }), _jsx("span", { className: "workflow-editor-execution-log-row__time", children: formatExecutionLogTime(log.occurredAt || log.createdAt) }), _jsx(SolidTag, { tone: workflowLogLevelTone(log.level), children: (_c = log.level) !== null && _c !== void 0 ? _c : "info" }), _jsx("span", { className: "workflow-editor-execution-log-row__node", children: (_e = (_d = log.nodeId) !== null && _d !== void 0 ? _d : log.source) !== null && _e !== void 0 ? _e : "runtime" }), _jsx("span", { className: "workflow-editor-execution-log-row__message", children: (_f = log.message) !== null && _f !== void 0 ? _f : "No message" }), log.eventType ? _jsx("span", { className: "workflow-editor-execution-log-row__event", children: log.eventType }) : null] }), isSelected ? (_jsx("div", { className: "workflow-editor-execution-log-row__details", children: _jsxs("div", { className: "workflow-editor-execution-log-inspector", children: [_jsxs("div", { className: "workflow-editor-execution-log-inspector__header", children: [_jsxs("div", { children: [_jsx("span", { children: "Log Detail" }), _jsx("h4", { children: (_g = log.message) !== null && _g !== void 0 ? _g : "No message" })] }), _jsx("button", { type: "button", "aria-label": "Collapse log detail", onClick: function () { return setExpandedLogId(null); }, children: _jsx(X, { size: 14 }) })] }), _jsx("div", { className: "workflow-editor-execution-log-inspector__meta", children: [
|
|
586
|
+
["Level", (_h = log.level) !== null && _h !== void 0 ? _h : "info"],
|
|
587
|
+
["Sequence", (_j = log.sequenceNumber) !== null && _j !== void 0 ? _j : log.id],
|
|
588
|
+
["Occurred", formatExecutionDate(log.occurredAt || log.createdAt)],
|
|
589
|
+
["Node", (_k = log.nodeId) !== null && _k !== void 0 ? _k : "-"],
|
|
590
|
+
["Node Type", (_l = log.nodeType) !== null && _l !== void 0 ? _l : "-"],
|
|
591
|
+
["Source", (_m = log.source) !== null && _m !== void 0 ? _m : "-"],
|
|
592
|
+
["Event Type", (_o = log.eventType) !== null && _o !== void 0 ? _o : "-"],
|
|
593
|
+
["Log Key", (_p = log.logKey) !== null && _p !== void 0 ? _p : "-"],
|
|
594
|
+
].map(function (_a) {
|
|
595
|
+
var label = _a[0], value = _a[1];
|
|
596
|
+
return (_jsxs("div", { children: [_jsx("span", { children: label }), _jsx("strong", { children: value })] }, label));
|
|
597
|
+
}) }), log.context || log.metadata ? (_jsxs("div", { className: "workflow-editor-execution-log-inspector__payloads", children: [_jsxs("div", { children: [_jsx("h5", { children: "Context" }), _jsx(SolidCodeEditor, { language: "json", height: "180px", fontSize: 12, readOnly: true, value: formatReadonlyJson(log.context) })] }), _jsxs("div", { children: [_jsx("h5", { children: "Metadata" }), _jsx(SolidCodeEditor, { language: "json", height: "180px", fontSize: 12, readOnly: true, value: formatReadonlyJson(log.metadata) })] })] })) : (_jsx("div", { className: "workflow-editor-execution-log-inspector__empty", children: "No structured context or metadata was captured for this log." }))] }) })) : null] }, log.id));
|
|
598
|
+
}) })) : (_jsxs("div", { className: "workflow-editor-execution-logs__empty", children: [_jsx("h4", { children: "No logs found" }), _jsx("p", { children: "This execution has no log entries matching the current filters." })] })), _jsx(WorkflowExecutionPagination, { meta: executionLogMeta, pagination: logPagination, disabled: workflowExecutionLogsQuery.isFetching, onChange: function (nextPagination) {
|
|
599
|
+
setExpandedLogId(null);
|
|
600
|
+
setLogPagination(nextPagination);
|
|
601
|
+
} })] })) : null, activeTab === "input" ? (workflowExecutionDetailQuery.isFetching && execution.inputPayload === undefined ? (_jsxs("div", { className: "workflow-editor-execution-logs__loading", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Loading execution input..." })] })) : (_jsx(SolidCodeEditor, { language: "json", height: "calc(100vh - 260px)", fontSize: 12, readOnly: true, value: formatReadonlyJson(execution.inputPayload) }))) : null, activeTab === "output" ? (_jsxs("div", { className: "workflow-editor-output-viewer", children: [_jsxs("div", { className: "workflow-editor-output-viewer__toolbar", children: [_jsxs("div", { children: [_jsx("h4", { children: "Execution Output" }), _jsx("p", { children: "Inspect node outputs visually or switch to the raw JSON payload." })] }), _jsxs("div", { className: "workflow-editor-view-toggle", "aria-label": "Output view", children: [_jsx("button", { type: "button", className: "workflow-editor-view-toggle__button ".concat(outputMode === "visual" ? "is-active" : ""), "aria-label": "Show visual output", title: "Visual output", onClick: function () { return setOutputMode("visual"); }, children: _jsx(Layers3, { size: 14 }) }), _jsx("button", { type: "button", className: "workflow-editor-view-toggle__button ".concat(outputMode === "json" ? "is-active" : ""), "aria-label": "Show JSON output", title: "JSON output", onClick: function () { return setOutputMode("json"); }, children: _jsx(Braces, { size: 14 }) })] })] }), workflowOutputStepExecutionsQuery.isFetching && !outputStepRecords.length ? (_jsxs("div", { className: "workflow-editor-execution-logs__loading", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Loading step outputs..." })] })) : outputMode === "json" ? (_jsx("div", { className: "workflow-editor-output-json-editor", children: _jsx(SolidCodeEditor, { language: "json", height: "calc(100vh - 320px)", fontSize: 12, readOnly: true, value: formatReadonlyJson(outputStepRecords.map(function (step) { return ({
|
|
602
|
+
id: step.id,
|
|
603
|
+
stepExecutionKey: step.stepExecutionKey,
|
|
604
|
+
nodeId: step.nodeId,
|
|
605
|
+
nodeName: step.nodeName,
|
|
606
|
+
nodeType: step.nodeType,
|
|
607
|
+
sequenceNumber: step.sequenceNumber,
|
|
608
|
+
outputPayload: step.outputPayload,
|
|
609
|
+
}); }), "[]") }) })) : outputEntries.length ? (_jsx("div", { className: "workflow-editor-output-node-list", children: outputEntries.map(function (entry, index) {
|
|
610
|
+
var _a;
|
|
611
|
+
var isExpanded = expandedOutputKey === entry.key;
|
|
612
|
+
return (_jsxs("div", { className: "workflow-editor-output-node-row ".concat(isExpanded ? "is-expanded" : ""), children: [_jsxs("button", { type: "button", className: "workflow-editor-output-node-row__header", "aria-expanded": isExpanded, onClick: function () { return setExpandedOutputKey(function (current) { return current === entry.key ? null : entry.key; }); }, children: [_jsx("span", { className: "workflow-editor-output-node-row__toggle", children: _jsx(ChevronRight, { size: 15 }) }), _jsx("span", { className: "workflow-editor-output-node-row__sequence", children: index + 1 }), _jsx("span", { className: "workflow-editor-output-node-row__identity", children: _jsx("strong", { children: entry.label }) }), _jsx("span", { className: "workflow-editor-output-node-row__node-key", children: (_a = entry.nodeId) !== null && _a !== void 0 ? _a : entry.key }), entry.nodeType ? _jsx(SolidTag, { children: entry.nodeType }) : null, _jsx("span", { className: "workflow-editor-output-node-row__summary", children: summarizeOutputValue(entry.value) })] }), isExpanded ? (_jsx("div", { className: "workflow-editor-output-node-row__body", children: _jsxs("div", { className: "workflow-editor-output-node-detail", children: [_jsxs("div", { className: "workflow-editor-output-node-detail__header", children: [_jsxs("div", { children: [_jsx("span", { children: "Output Detail" }), _jsx("h4", { children: entry.label })] }), _jsx("button", { type: "button", "aria-label": "Collapse output detail", onClick: function () { return setExpandedOutputKey(null); }, children: _jsx(X, { size: 14 }) })] }), renderOutputVisual(entry.value, { hideSummary: true })] }) })) : null] }, entry.key));
|
|
613
|
+
}) })) : (_jsxs("div", { className: "workflow-editor-output-empty", children: [_jsx("h4", { children: "No step outputs found" }), _jsx("p", { children: "This page does not contain step output payloads." })] })), _jsx(WorkflowExecutionPagination, { meta: outputStepMeta, pagination: outputPagination, disabled: workflowOutputStepExecutionsQuery.isFetching, onChange: function (nextPagination) {
|
|
614
|
+
setExpandedOutputKey(null);
|
|
615
|
+
setOutputPagination(nextPagination);
|
|
616
|
+
} })] })) : null, activeTab === "error" ? (_jsxs("div", { className: "workflow-editor-execution-detail-error", children: [_jsxs("div", { className: "workflow-editor-execution-detail-kv", children: [_jsx("div", { className: "workflow-editor-execution-detail-kv__label", children: "Error Summary" }), _jsx("div", { className: "workflow-editor-execution-detail-kv__value", children: (_0 = execution.errorSummary) !== null && _0 !== void 0 ? _0 : "-" })] }), workflowExecutionDetailQuery.isFetching && execution.errorDetails === undefined ? (_jsxs("div", { className: "workflow-editor-execution-logs__loading", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Loading error detail..." })] })) : (_jsx(SolidCodeEditor, { language: "json", height: "calc(100vh - 320px)", fontSize: 12, readOnly: true, value: formatReadonlyJson(execution.errorDetails) }))] })) : null, activeTab === "definition" ? (workflowExecutionDetailQuery.isFetching && execution.definitionSnapshot === undefined ? (_jsxs("div", { className: "workflow-editor-execution-logs__loading", children: [_jsx(SolidSpinner, {}), _jsx("span", { children: "Loading definition snapshot..." })] })) : (_jsx(SolidCodeEditor, { language: "yaml", height: "calc(100vh - 260px)", fontSize: 12, readOnly: true, value: formatReadonlyYaml(execution.definitionSnapshot) }))) : null] })] })] })] }));
|
|
617
|
+
}
|
|
618
|
+
//# sourceMappingURL=WorkflowExecutionDetailPage.js.map
|