@burdenoff/fluidgrids-fe-sdk 2026.1113.1 → 2026.1113.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiStudioPage-D3MAk-bs.js → AiStudioPage-5KYZ8r8-.js} +464 -7
- package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
- package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/{DataSinkDashboardPage-Dc2QuJbL.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
- package/dist/{DataTablesPage-Cv4veaKK.js → DataTablesPage-BBvABuxE.js} +5 -4
- package/dist/{EntityTagPicker-D8ws706D.js → EntityTagPicker-BppBSEJk.js} +2 -2
- package/dist/{ExecutionDetailPage-CTVGE-d-.js → ExecutionDetailPage-BXDF2eoT.js} +1444 -18
- package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
- package/dist/{ExecutionsListPage-J0sJPuoM.js → ExecutionsListPage--4BthM8L.js} +285 -11
- package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
- package/dist/{FluidGridsProvider-C4FVNz0n.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
- package/dist/{HistoryPage-B9XcTPrO.js → HistoryPage-BvFk2m1m.js} +4 -3
- package/dist/{InsightsPage-DFOltjyj.js → InsightsPage-Dwmb02F6.js} +2682 -5
- package/dist/{MissingNodesInstallModal-D8H-YNCJ.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
- package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
- package/dist/{OpenTemplateAsCodeButton-hH26HQCk.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
- package/dist/{PaidTemplateConfirm-DoKWMBtR.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
- package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
- package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
- package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
- package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
- package/dist/{SettingsPage-DEKPCVVP.js → SettingsPage-CfjXiGpb.js} +694 -14
- package/dist/{TagFilterSelect-CwM2-DU6.js → TagFilterSelect-CAShgvbS.js} +1 -1
- package/dist/{TaskQueuesPage-Dhi6SIT4.js → TaskQueuesPage--Mmn36b-.js} +3 -3
- package/dist/{TemplateCard-DVSd_4zJ.js → TemplateCard-BA_9em22.js} +644 -352
- package/dist/{TemplateConfigurationModal-BKi1z7z7.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
- package/dist/{TemplateDetailPanel-DK1gF7P5.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
- package/dist/{TemplatePreview-DuSX2Q7H.js → TemplatePreview-Bagja6WN.js} +7 -7
- package/dist/{TemplatesPage-CAWHh61l.js → TemplatesPage-CAajpJ5w.js} +711 -6
- package/dist/{VariablesPage-D7CoatWf.js → VariablesPage-CgUBKhAe.js} +3 -3
- package/dist/{VersionDiffDialog-DGwysiyE.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
- package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
- package/dist/{WorkflowBuilder-DAeoQi5E.js → WorkflowBuilder-DMpSPElu.js} +16 -13
- package/dist/{WorkflowBuilder-BJgqDboZ.js → WorkflowBuilder-v8h8skwG.js} +5 -5
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
- package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/{WorkflowSearchRedirect-CMEvd_AR.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
- package/dist/{WorkflowShareDialog-BgHRsDP0.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
- package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
- package/dist/{WorkflowsList-CcQPxWKL.js → WorkflowsList-CPYzfE4K.js} +11 -9
- package/dist/agent-form-D0uLvzx4.js +718 -0
- package/dist/{agentTools-DKpNKztf.js → agentTools-DTXUqtfu.js} +4 -4
- package/dist/api-BZVyX5d2.js +2286 -0
- package/dist/api-BqA-f-AD.js +8064 -0
- package/dist/app-BJUvugPM.js +3813 -0
- package/dist/assert-rules-CPNrO44K.js +318 -0
- package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/{canvasNoteTools-C_AN79m0.js → canvasNoteTools-DmfZwtnL.js} +3 -3
- package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
- package/dist/client-Ctl4jmY3.js +127 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/{code-editor-field-Dt6KNWwN.js → code-editor-field-Cv907s3W.js} +2 -2
- package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
- package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
- package/dist/config-X97zrIvn.js +600 -0
- package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
- package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
- package/dist/durable-nodes-DXCCQYWD.js +81 -0
- package/dist/errors-xPZ-IbQd.js +142 -0
- package/dist/executions.js +2 -2
- package/dist/{flow-builder-D3Hl2AFk.js → flow-builder-Dv5fWJ6F.js} +9301 -8189
- package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
- package/dist/global-operations-7pvXw_j9.js +145 -0
- package/dist/history.js +1 -1
- package/dist/{index-CWcP-tG1.d.ts → index-DtMUtXNq.d.ts} +247 -247
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4403 -46
- package/dist/input-ChT6Q-Pr.js +17 -0
- package/dist/logs-panel-DtG93ocy.js +342 -0
- package/dist/mapping-colors-BIX_YeCQ.js +48 -0
- package/dist/{node-detail-view-bVLeYarT.js → node-detail-view-BKI_2kM6.js} +12 -11
- package/dist/{node-editor-tab-body-JHHVtQgR.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
- package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/nodes.js +1 -1
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/{popover-Xx3gN7vg.js → popover-DDv7J1Kl.js} +717 -6
- package/dist/{quick-config-panel-BvVQXuIL.js → quick-config-panel-BPCRfqWI.js} +4 -4
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/{schedule-panel-DCb40TPN.js → schedule-panel-C1KwfLCE.js} +14 -12
- package/dist/settings.js +1 -1
- package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
- package/dist/{sidebar-node-editor-DxCWFZG2.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
- package/dist/sticky-notes-23j-wL6Q.js +96 -0
- package/dist/template-code-dqRunGOv.js +184 -0
- package/dist/template-preview-C01KV277.js +29 -0
- package/dist/templates.js +2 -2
- package/dist/token-refresh-link-BjN7H4qA.js +291 -0
- package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
- package/dist/useConnections-BlB0gbOB.js +931 -0
- package/dist/useDurableParity-BgLH_SCF.js +2088 -0
- package/dist/{useEntityTags-Db4Pc8_M.js → useEntityTags-4iW6UTly.js} +227 -3
- package/dist/{useExecutions-DOpG1pUQ.js → useExecutions-Bm7q_UwN.js} +6 -3
- package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
- package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
- package/dist/{useObservability-rQmwhoZZ.js → useObservability-DPATdbw7.js} +4 -2
- package/dist/{useRunHistory-COn6dl7l.js → useRunHistory-CGfjCsJ3.js} +1122 -4
- package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
- package/dist/{useWorkflowCodeExport-ZoUJKRSK.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
- package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
- package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
- package/dist/{useWorkflows-jOW60YmD.js → useWorkflows-aqVD7kGa.js} +694 -4
- package/dist/workflow-builder.js +5 -5
- package/dist/{workflow-code-transfer-l9wO34S0.js → workflow-code-transfer-5C0HUzae.js} +1 -53
- package/dist/workflow-host.js +4 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +19 -19
- package/dist/workflow-preview.js +3 -2
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
- package/dist/FailureTriagePanel-BbYFYeV_.js +0 -311
- package/dist/WorkflowProposalCard-DGMdZC4R.js +0 -1432
- package/dist/agent-form-Bfvm32j1.js +0 -83
- package/dist/api-DQtHXbIg.js +0 -224
- package/dist/api-MeAm6g7E.js +0 -55
- package/dist/client-C9XSzSXr.js +0 -1147
- package/dist/graphql-operation-types-C9qbvRa8.js +0 -53122
- package/dist/useAgentDefinitions-_hgNCK1A.js +0 -550
- package/dist/useConnections-Cs7LCWEM.js +0 -401
- package/dist/useDurableParity-CcLeCDfv.js +0 -504
- package/dist/useWorkflowOrganization-QxVePSkk.js +0 -282
|
@@ -1,504 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { _ as throwIfResultError, m as describeOperationError, n as getFluidGridsClient } from "./client-C9XSzSXr.js";
|
|
3
|
-
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
|
-
import { Fn as SetWorkflowRunVersioningOverrideDocument, ii as WorkflowRunPendingDocument, it as DurableParityRunFieldsDocument, ri as WorkflowRunMetadataDocument, si as WorkflowRunsCountDocument } from "./graphql-operation-types-C9qbvRa8.js";
|
|
5
|
-
import { f as STATUS_COUNT_GROUP_BY, v as statusCountFilter, y as statusCountsOf } from "./useExecutions-DOpG1pUQ.js";
|
|
6
|
-
import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
|
|
7
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
|
-
import { Icon } from "@iconify/react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@burdenoff/fe-libs/ui";
|
|
11
|
-
|
|
12
|
-
// src/modules/executions/types/index.ts
|
|
13
|
-
const RUN_STATUS_CONFIG = {
|
|
14
|
-
PENDING: {
|
|
15
|
-
label: "Pending",
|
|
16
|
-
color: "text-text-secondary",
|
|
17
|
-
bgColor: "bg-bg-sunken",
|
|
18
|
-
borderColor: "border-border-default",
|
|
19
|
-
icon: "mdi:clock-outline"
|
|
20
|
-
},
|
|
21
|
-
RUNNING: {
|
|
22
|
-
label: "Running",
|
|
23
|
-
color: "text-status-info-text",
|
|
24
|
-
bgColor: "bg-status-info-bg-subtle",
|
|
25
|
-
borderColor: "border-status-info-border",
|
|
26
|
-
icon: "mdi:play-circle-outline"
|
|
27
|
-
},
|
|
28
|
-
COMPLETED: {
|
|
29
|
-
label: "Completed",
|
|
30
|
-
color: "text-status-success-text",
|
|
31
|
-
bgColor: "bg-status-success-bg-subtle",
|
|
32
|
-
borderColor: "border-status-success-border",
|
|
33
|
-
icon: "mdi:check-circle-outline"
|
|
34
|
-
},
|
|
35
|
-
FAILED: {
|
|
36
|
-
label: "Failed",
|
|
37
|
-
color: "text-status-error-text",
|
|
38
|
-
bgColor: "bg-status-error-bg-subtle",
|
|
39
|
-
borderColor: "border-status-error-border",
|
|
40
|
-
icon: "mdi:alert-circle-outline"
|
|
41
|
-
},
|
|
42
|
-
CANCELLED: {
|
|
43
|
-
label: "Cancelled",
|
|
44
|
-
color: "text-status-warning-text",
|
|
45
|
-
bgColor: "bg-status-warning-bg-subtle",
|
|
46
|
-
borderColor: "border-status-warning-border",
|
|
47
|
-
icon: "mdi:cancel"
|
|
48
|
-
},
|
|
49
|
-
WAITING: {
|
|
50
|
-
label: "Waiting",
|
|
51
|
-
color: "text-chart-3",
|
|
52
|
-
bgColor: "bg-chart-3/10",
|
|
53
|
-
borderColor: "border-chart-3/30",
|
|
54
|
-
icon: "mdi:timer-sand"
|
|
55
|
-
},
|
|
56
|
-
TERMINATED: {
|
|
57
|
-
label: "Terminated",
|
|
58
|
-
color: "text-text-secondary",
|
|
59
|
-
bgColor: "bg-bg-sunken",
|
|
60
|
-
borderColor: "border-border-strong",
|
|
61
|
-
icon: "mdi:stop-circle-outline"
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
const NODE_STATUS_CONFIG = {
|
|
65
|
-
PENDING: {
|
|
66
|
-
label: "Pending",
|
|
67
|
-
color: "text-text-secondary",
|
|
68
|
-
bgColor: "bg-bg-sunken",
|
|
69
|
-
borderColor: "border-border-default",
|
|
70
|
-
icon: "mdi:clock-outline"
|
|
71
|
-
},
|
|
72
|
-
RUNNING: {
|
|
73
|
-
label: "Running",
|
|
74
|
-
color: "text-status-info-text",
|
|
75
|
-
bgColor: "bg-status-info-bg-subtle",
|
|
76
|
-
borderColor: "border-status-info-border",
|
|
77
|
-
icon: "mdi:play-circle-outline"
|
|
78
|
-
},
|
|
79
|
-
COMPLETED: {
|
|
80
|
-
label: "Completed",
|
|
81
|
-
color: "text-status-success-text",
|
|
82
|
-
bgColor: "bg-status-success-bg-subtle",
|
|
83
|
-
borderColor: "border-status-success-border",
|
|
84
|
-
icon: "mdi:check-circle-outline"
|
|
85
|
-
},
|
|
86
|
-
FAILED: {
|
|
87
|
-
label: "Failed",
|
|
88
|
-
color: "text-status-error-text",
|
|
89
|
-
bgColor: "bg-status-error-bg-subtle",
|
|
90
|
-
borderColor: "border-status-error-border",
|
|
91
|
-
icon: "mdi:alert-circle-outline"
|
|
92
|
-
},
|
|
93
|
-
SKIPPED: {
|
|
94
|
-
label: "Skipped",
|
|
95
|
-
color: "text-text-muted",
|
|
96
|
-
bgColor: "bg-bg-sunken",
|
|
97
|
-
borderColor: "border-border-default",
|
|
98
|
-
icon: "mdi:skip-next"
|
|
99
|
-
},
|
|
100
|
-
DELAYED: {
|
|
101
|
-
label: "Delayed",
|
|
102
|
-
color: "text-status-warning-text",
|
|
103
|
-
bgColor: "bg-status-warning-bg-subtle",
|
|
104
|
-
borderColor: "border-status-warning-border",
|
|
105
|
-
icon: "mdi:clock-alert-outline"
|
|
106
|
-
},
|
|
107
|
-
CANCELLED: {
|
|
108
|
-
label: "Cancelled",
|
|
109
|
-
color: "text-status-warning-text",
|
|
110
|
-
bgColor: "bg-status-warning-bg-subtle",
|
|
111
|
-
borderColor: "border-status-warning-border",
|
|
112
|
-
icon: "mdi:cancel"
|
|
113
|
-
},
|
|
114
|
-
TIMEOUT: {
|
|
115
|
-
label: "Timeout",
|
|
116
|
-
color: "text-status-error-text",
|
|
117
|
-
bgColor: "bg-status-error-bg-subtle",
|
|
118
|
-
borderColor: "border-status-error-border",
|
|
119
|
-
icon: "mdi:timer-off-outline"
|
|
120
|
-
},
|
|
121
|
-
WAITING: {
|
|
122
|
-
label: "Waiting",
|
|
123
|
-
color: "text-chart-3",
|
|
124
|
-
bgColor: "bg-chart-3/10",
|
|
125
|
-
borderColor: "border-chart-3/30",
|
|
126
|
-
icon: "mdi:timer-sand"
|
|
127
|
-
},
|
|
128
|
-
WAITING_SUBWORKFLOW: {
|
|
129
|
-
label: "Waiting",
|
|
130
|
-
color: "text-chart-3",
|
|
131
|
-
bgColor: "bg-chart-3/10",
|
|
132
|
-
borderColor: "border-chart-3/30",
|
|
133
|
-
icon: "mdi:subdirectory-arrow-right"
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
// src/modules/executions/utils/run-status-labels.ts
|
|
138
|
-
function runStatusLabels(tr) {
|
|
139
|
-
return {
|
|
140
|
-
PENDING: tr("fluidgrids.executions.executionFilters.statusPending", "Pending"),
|
|
141
|
-
RUNNING: tr("fluidgrids.executions.executionFilters.statusRunning", "Running"),
|
|
142
|
-
COMPLETED: tr("fluidgrids.executions.executionFilters.statusCompleted", "Completed"),
|
|
143
|
-
FAILED: tr("fluidgrids.executions.executionFilters.statusFailed", "Failed"),
|
|
144
|
-
CANCELLED: tr("fluidgrids.executions.executionFilters.statusCancelled", "Cancelled"),
|
|
145
|
-
WAITING: tr("fluidgrids.executions.executionFilters.statusWaiting", "Waiting"),
|
|
146
|
-
TERMINATED: tr("fluidgrids.executions.executionFilters.statusTerminated", "Terminated")
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// src/modules/executions/components/ExecutionStatusBadge.tsx
|
|
151
|
-
function ExecutionStatusBadge({ status, size = "md", showIcon = true, showLabel = true, animated = true }) {
|
|
152
|
-
const tr = useTr();
|
|
153
|
-
const v2 = useNavigationV2();
|
|
154
|
-
const config = RUN_STATUS_CONFIG[status] ?? RUN_STATUS_CONFIG.PENDING;
|
|
155
|
-
const labels = runStatusLabels(tr);
|
|
156
|
-
const sizeClasses = {
|
|
157
|
-
sm: "px-1.5 py-0.5 text-xs gap-1",
|
|
158
|
-
md: "px-2 py-1 text-sm gap-1.5",
|
|
159
|
-
lg: "px-3 py-1.5 text-base gap-2"
|
|
160
|
-
};
|
|
161
|
-
const iconSizes = {
|
|
162
|
-
sm: 12,
|
|
163
|
-
md: 14,
|
|
164
|
-
lg: 16
|
|
165
|
-
};
|
|
166
|
-
const isRunning = status === "RUNNING";
|
|
167
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
168
|
-
title: v2 ? status : void 0,
|
|
169
|
-
className: `
|
|
170
|
-
inline-flex items-center rounded-full font-medium
|
|
171
|
-
${config.bgColor} ${config.color} border ${config.borderColor}
|
|
172
|
-
${sizeClasses[size]}
|
|
173
|
-
${animated && isRunning ? "animate-pulse" : ""}
|
|
174
|
-
`,
|
|
175
|
-
children: [showIcon && /* @__PURE__ */ jsx(Icon, {
|
|
176
|
-
icon: config.icon,
|
|
177
|
-
width: iconSizes[size],
|
|
178
|
-
height: iconSizes[size],
|
|
179
|
-
className: animated && isRunning ? "animate-spin" : ""
|
|
180
|
-
}), showLabel && /* @__PURE__ */ jsx("span", { children: labels[status] ?? config.label })]
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
function NodeStatusBadge({ status, size = "md", showIcon = true, showLabel = true, animated = true }) {
|
|
184
|
-
const config = NODE_STATUS_CONFIG[status] ?? NODE_STATUS_CONFIG.PENDING;
|
|
185
|
-
const sizeClasses = {
|
|
186
|
-
sm: "px-1.5 py-0.5 text-xs gap-1",
|
|
187
|
-
md: "px-2 py-1 text-sm gap-1.5",
|
|
188
|
-
lg: "px-3 py-1.5 text-base gap-2"
|
|
189
|
-
};
|
|
190
|
-
const iconSizes = {
|
|
191
|
-
sm: 12,
|
|
192
|
-
md: 14,
|
|
193
|
-
lg: 16
|
|
194
|
-
};
|
|
195
|
-
const isRunning = status === "RUNNING";
|
|
196
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
197
|
-
className: `
|
|
198
|
-
inline-flex items-center rounded-full font-medium
|
|
199
|
-
${config.bgColor} ${config.color} border ${config.borderColor}
|
|
200
|
-
${sizeClasses[size]}
|
|
201
|
-
${animated && isRunning ? "animate-pulse" : ""}
|
|
202
|
-
`,
|
|
203
|
-
children: [showIcon && /* @__PURE__ */ jsx(Icon, {
|
|
204
|
-
icon: config.icon,
|
|
205
|
-
width: iconSizes[size],
|
|
206
|
-
height: iconSizes[size],
|
|
207
|
-
className: animated && isRunning ? "animate-spin" : ""
|
|
208
|
-
}), showLabel && /* @__PURE__ */ jsx("span", { children: config.label })]
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// src/modules/executions/utils/error-advice.ts
|
|
213
|
-
/** The error types the filter offers, in the order it lists them. */
|
|
214
|
-
const ADVICE_ERROR_TYPES = [
|
|
215
|
-
"AUTHORIZATION",
|
|
216
|
-
"TIMEOUT",
|
|
217
|
-
"TRANSIENT",
|
|
218
|
-
"DEPENDENCY",
|
|
219
|
-
"VALIDATION",
|
|
220
|
-
"PERMANENT",
|
|
221
|
-
"UNKNOWN"
|
|
222
|
-
];
|
|
223
|
-
const ADVICE_TEXT = {
|
|
224
|
-
AUTHORIZATION: {
|
|
225
|
-
key: "fluidgrids.executions.errorAdvice.authorization",
|
|
226
|
-
fallback: "A connected account was refused. Reconnect it, then run again."
|
|
227
|
-
},
|
|
228
|
-
TIMEOUT: {
|
|
229
|
-
key: "fluidgrids.executions.errorAdvice.timeout",
|
|
230
|
-
fallback: "A step took too long."
|
|
231
|
-
},
|
|
232
|
-
TRANSIENT: {
|
|
233
|
-
key: "fluidgrids.executions.errorAdvice.transient",
|
|
234
|
-
fallback: "A temporary problem. Running again usually fixes it."
|
|
235
|
-
},
|
|
236
|
-
DEPENDENCY: {
|
|
237
|
-
key: "fluidgrids.executions.errorAdvice.dependency",
|
|
238
|
-
fallback: "A service this workflow uses was unavailable."
|
|
239
|
-
},
|
|
240
|
-
VALIDATION: {
|
|
241
|
-
key: "fluidgrids.executions.errorAdvice.validation",
|
|
242
|
-
fallback: "Some data was missing or in the wrong format."
|
|
243
|
-
},
|
|
244
|
-
PERMANENT: {
|
|
245
|
-
key: "fluidgrids.executions.errorAdvice.permanent",
|
|
246
|
-
fallback: "This will keep failing until the workflow is changed."
|
|
247
|
-
},
|
|
248
|
-
UNKNOWN: {
|
|
249
|
-
key: "fluidgrids.executions.errorAdvice.unknown",
|
|
250
|
-
fallback: "Something went wrong."
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
function isAdviceType(value) {
|
|
254
|
-
return Object.hasOwn(ADVICE_TEXT, value);
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* The advice for an error type. A type this build has no advice for (the API
|
|
258
|
-
* grew one, or the run carries none) gets the generic "Something went wrong."
|
|
259
|
-
*/
|
|
260
|
-
function errorAdvice(tr, errorType) {
|
|
261
|
-
const type = errorType && isAdviceType(errorType) ? errorType : "UNKNOWN";
|
|
262
|
-
const { key, fallback } = ADVICE_TEXT[type];
|
|
263
|
-
return tr(key, fallback);
|
|
264
|
-
}
|
|
265
|
-
/** True for the one error type whose fix is to reconnect an account. */
|
|
266
|
-
function needsReconnect(errorType) {
|
|
267
|
-
return errorType === "AUTHORIZATION";
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// src/modules/executions/components/ConfirmRunDialog.tsx
|
|
271
|
-
/**
|
|
272
|
-
* Confirmation for stopping runs (BOFF-11846): names the run (or how many) and
|
|
273
|
-
* says what happens. Navigation v2 only; replaces nothing when the switch is
|
|
274
|
-
* off, where Cancel acts at once as it always has.
|
|
275
|
-
*/
|
|
276
|
-
function ConfirmStopRunDialog({ open, workflowName, count = 1, busy, onConfirm, onOpenChange }) {
|
|
277
|
-
const tr = useTr();
|
|
278
|
-
return /* @__PURE__ */ jsx(AlertDialog, {
|
|
279
|
-
open,
|
|
280
|
-
onOpenChange,
|
|
281
|
-
children: /* @__PURE__ */ jsxs(AlertDialogContent, {
|
|
282
|
-
"data-testid": "confirm-stop-run",
|
|
283
|
-
children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: workflowName ? tr("fluidgrids.executions.stopDialog.title", "Stop this run of {{workflow}}?", { workflow: workflowName }) : tr("fluidgrids.executions.stopDialog.titleMany", "Stop {{count}} runs?", { count }) }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: tr("fluidgrids.executions.stopDialog.description", "It stops right away and can't be continued. You can run it again afterwards.") })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
|
|
284
|
-
disabled: busy,
|
|
285
|
-
children: tr("fluidgrids.executions.stopDialog.keep", "Keep running")
|
|
286
|
-
}), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
287
|
-
onClick: onConfirm,
|
|
288
|
-
disabled: busy,
|
|
289
|
-
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
290
|
-
"data-testid": "confirm-stop-run-confirm",
|
|
291
|
-
children: tr("fluidgrids.executions.stopDialog.confirm", "Stop run")
|
|
292
|
-
})] })]
|
|
293
|
-
})
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// src/modules/executions/hooks/useDurableParity.ts
|
|
298
|
-
/**
|
|
299
|
-
* Durable-function parity reads and writes of the run page and the Runs list
|
|
300
|
-
* (BOFF-9905, spec code-first 11): the run's workflow id, chain, metadata,
|
|
301
|
-
* callback and versioning; what it is waiting on; the `__metadata` answer;
|
|
302
|
-
* status counts; and the per-run versioning override.
|
|
303
|
-
*
|
|
304
|
-
* Like useDurableRun, every read is a plain network read and nothing is sent
|
|
305
|
-
* while `enabled` is false, which the pages tie to useDurableParityEnabled().
|
|
306
|
-
* A failed read keeps the last good answer, or none, so a gateway or service
|
|
307
|
-
* without the parity release never breaks the page: the parity views simply
|
|
308
|
-
* stay empty.
|
|
309
|
-
*/
|
|
310
|
-
/** Re-read cadence of the pending state while the run is live. */
|
|
311
|
-
const RUN_PENDING_POLL_INTERVAL_MS = 5e3;
|
|
312
|
-
async function fetchDurableParityRunFields(runId) {
|
|
313
|
-
const result = await getFluidGridsClient().query({
|
|
314
|
-
query: DurableParityRunFieldsDocument,
|
|
315
|
-
variables: { id: runId },
|
|
316
|
-
fetchPolicy: "network-only"
|
|
317
|
-
});
|
|
318
|
-
throwIfResultError(result);
|
|
319
|
-
return result.data?.workflowRun ?? null;
|
|
320
|
-
}
|
|
321
|
-
async function fetchRunPending(runId) {
|
|
322
|
-
const result = await getFluidGridsClient().query({
|
|
323
|
-
query: WorkflowRunPendingDocument,
|
|
324
|
-
variables: { id: runId },
|
|
325
|
-
fetchPolicy: "network-only"
|
|
326
|
-
});
|
|
327
|
-
throwIfResultError(result);
|
|
328
|
-
return result.data?.workflowRun?.pending ?? null;
|
|
329
|
-
}
|
|
330
|
-
async function fetchRunMetadata(runId) {
|
|
331
|
-
const result = await getFluidGridsClient().query({
|
|
332
|
-
query: WorkflowRunMetadataDocument,
|
|
333
|
-
variables: { runId },
|
|
334
|
-
fetchPolicy: "network-only"
|
|
335
|
-
});
|
|
336
|
-
throwIfResultError(result);
|
|
337
|
-
return result.data?.workflowRunStackTrace ?? null;
|
|
338
|
-
}
|
|
339
|
-
async function fetchRunStatusCounts(input) {
|
|
340
|
-
const filter = statusCountFilter(input);
|
|
341
|
-
const result = await getFluidGridsClient().query({
|
|
342
|
-
query: WorkflowRunsCountDocument,
|
|
343
|
-
variables: {
|
|
344
|
-
filter,
|
|
345
|
-
groupBy: [...STATUS_COUNT_GROUP_BY]
|
|
346
|
-
},
|
|
347
|
-
fetchPolicy: "network-only"
|
|
348
|
-
});
|
|
349
|
-
throwIfResultError(result);
|
|
350
|
-
const count = result.data?.workflowRunsCount;
|
|
351
|
-
if (!count) throw new Error("The run count returned no result");
|
|
352
|
-
return {
|
|
353
|
-
total: count.total,
|
|
354
|
-
counts: statusCountsOf(count.groups)
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
async function setRunVersioningOverride(input) {
|
|
358
|
-
const reason = input.reason?.trim();
|
|
359
|
-
const result = await getFluidGridsClient().mutate({
|
|
360
|
-
mutation: SetWorkflowRunVersioningOverrideDocument,
|
|
361
|
-
variables: {
|
|
362
|
-
runId: input.runId,
|
|
363
|
-
override: input.override,
|
|
364
|
-
reason: reason || null
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
throwIfResultError(result);
|
|
368
|
-
const data = result.data?.setWorkflowRunVersioningOverride;
|
|
369
|
-
if (!data) throw new Error("The override returned no result");
|
|
370
|
-
return data.versioning ?? null;
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* A read keyed by run id that keeps the last good answer, ignores answers to
|
|
374
|
-
* superseded requests, and re-reads every `intervalMs` while `live`.
|
|
375
|
-
*/
|
|
376
|
-
function useRunRead(runId, enabled, load, { live = false, intervalMs = 0 }) {
|
|
377
|
-
const [data, setData] = useState(null);
|
|
378
|
-
const [loading, setLoading] = useState(false);
|
|
379
|
-
const [error, setError] = useState(null);
|
|
380
|
-
const request = useRef(0);
|
|
381
|
-
const refetch = useCallback(async () => {
|
|
382
|
-
if (!runId || !enabled) return;
|
|
383
|
-
const id = ++request.current;
|
|
384
|
-
setLoading(true);
|
|
385
|
-
try {
|
|
386
|
-
const next = await load(runId);
|
|
387
|
-
if (id !== request.current) return;
|
|
388
|
-
setData(next);
|
|
389
|
-
setError(null);
|
|
390
|
-
} catch (err) {
|
|
391
|
-
if (id !== request.current) return;
|
|
392
|
-
setError(describeOperationError(err));
|
|
393
|
-
} finally {
|
|
394
|
-
if (id === request.current) setLoading(false);
|
|
395
|
-
}
|
|
396
|
-
}, [
|
|
397
|
-
runId,
|
|
398
|
-
enabled,
|
|
399
|
-
load
|
|
400
|
-
]);
|
|
401
|
-
useEffect(() => {
|
|
402
|
-
request.current += 1;
|
|
403
|
-
setData(null);
|
|
404
|
-
setError(null);
|
|
405
|
-
setLoading(false);
|
|
406
|
-
refetch();
|
|
407
|
-
}, [refetch]);
|
|
408
|
-
useEffect(() => {
|
|
409
|
-
if (!live || !enabled || !runId || intervalMs <= 0) return;
|
|
410
|
-
const timer = setInterval(() => {
|
|
411
|
-
refetch();
|
|
412
|
-
}, intervalMs);
|
|
413
|
-
return () => clearInterval(timer);
|
|
414
|
-
}, [
|
|
415
|
-
live,
|
|
416
|
-
enabled,
|
|
417
|
-
runId,
|
|
418
|
-
intervalMs,
|
|
419
|
-
refetch
|
|
420
|
-
]);
|
|
421
|
-
return {
|
|
422
|
-
data: enabled ? data : null,
|
|
423
|
-
loading,
|
|
424
|
-
error,
|
|
425
|
-
refetch
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
/** The parity fields of a run; nothing is read while `enabled` is false. */
|
|
429
|
-
function useDurableParityRunFields(runId, enabled) {
|
|
430
|
-
const { data, error, refetch } = useRunRead(runId, enabled, fetchDurableParityRunFields, {});
|
|
431
|
-
return {
|
|
432
|
-
fields: data,
|
|
433
|
-
error,
|
|
434
|
-
refetch
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
/** What an open run is waiting on, re-read every 5 s while `live`. */
|
|
438
|
-
function useRunPending(runId, { enabled, live }) {
|
|
439
|
-
const { data, loading, error, refetch } = useRunRead(runId, enabled, fetchRunPending, {
|
|
440
|
-
live,
|
|
441
|
-
intervalMs: RUN_PENDING_POLL_INTERVAL_MS
|
|
442
|
-
});
|
|
443
|
-
return {
|
|
444
|
-
pending: data,
|
|
445
|
-
loading,
|
|
446
|
-
error,
|
|
447
|
-
refetch
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* `__stack_trace` with `__metadata` of an open durable run: one replay in the
|
|
452
|
-
* service, so it is read once when shown and on request, never polled.
|
|
453
|
-
*/
|
|
454
|
-
function useRunMetadata(runId, enabled) {
|
|
455
|
-
const { data, loading, error, refetch } = useRunRead(runId, enabled, fetchRunMetadata, {});
|
|
456
|
-
return {
|
|
457
|
-
answer: data,
|
|
458
|
-
loading,
|
|
459
|
-
error,
|
|
460
|
-
refetch
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Per-status counts of the Runs list's current filter. The filter is the
|
|
465
|
-
* list's own request (so the counts match it), and nothing is sent while
|
|
466
|
-
* `enabled` is false.
|
|
467
|
-
*/
|
|
468
|
-
function useRunStatusCounts(input, enabled) {
|
|
469
|
-
const [state, setState] = useState({
|
|
470
|
-
total: null,
|
|
471
|
-
counts: []
|
|
472
|
-
});
|
|
473
|
-
const [error, setError] = useState(null);
|
|
474
|
-
const request = useRef(0);
|
|
475
|
-
const filterKey = JSON.stringify(statusCountFilter(input));
|
|
476
|
-
const refetch = useCallback(async () => {
|
|
477
|
-
if (!enabled) return;
|
|
478
|
-
const id = ++request.current;
|
|
479
|
-
try {
|
|
480
|
-
const next = await fetchRunStatusCounts(JSON.parse(filterKey));
|
|
481
|
-
if (id !== request.current) return;
|
|
482
|
-
setState(next);
|
|
483
|
-
setError(null);
|
|
484
|
-
} catch (err) {
|
|
485
|
-
if (id !== request.current) return;
|
|
486
|
-
setError(describeOperationError(err));
|
|
487
|
-
}
|
|
488
|
-
}, [enabled, filterKey]);
|
|
489
|
-
useEffect(() => {
|
|
490
|
-
refetch();
|
|
491
|
-
}, [refetch]);
|
|
492
|
-
return enabled ? {
|
|
493
|
-
...state,
|
|
494
|
-
error,
|
|
495
|
-
refetch
|
|
496
|
-
} : {
|
|
497
|
-
total: null,
|
|
498
|
-
counts: [],
|
|
499
|
-
error: null,
|
|
500
|
-
refetch
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
export { useRunStatusCounts as a, errorAdvice as c, NodeStatusBadge as d, runStatusLabels as f, useRunPending as i, needsReconnect as l, useDurableParityRunFields as n, ConfirmStopRunDialog as o, RUN_STATUS_CONFIG as p, useRunMetadata as r, ADVICE_ERROR_TYPES as s, setRunVersioningOverride as t, ExecutionStatusBadge as u };
|