@burdenoff/fluidgrids-fe-sdk 2026.1028.5 → 2026.1028.7
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/ExecutionDetailPage-A4JQGL34.js +20 -0
- package/dist/{ExecutionsListPage-XQ5FQJ4M.js → ExecutionsListPage-BT3ADBXP.js} +8 -8
- package/dist/WorkflowBuilder-SQQI4VSF.js +23 -0
- package/dist/{WorkflowsList-QBKX733V.js → WorkflowsList-FZ4W64YZ.js} +8 -8
- package/dist/{chunk-CSBKB5EX.js → chunk-27XYEFCK.js} +1 -1
- package/dist/{chunk-SRZITTB2.js → chunk-2YDUYSB3.js} +5 -5
- package/dist/chunk-3ENHRYM5.js +749 -0
- package/dist/{chunk-H7CJXSMI.js → chunk-5YP3U7BU.js} +3 -3
- package/dist/{chunk-JBLYBD2B.js → chunk-6J4RR46J.js} +6 -1
- package/dist/{chunk-5LKZ4PNK.js → chunk-6NUHJPGJ.js} +4 -2
- package/dist/{chunk-Y6YOY33Z.js → chunk-BBORXXGZ.js} +1 -1
- package/dist/{chunk-VUVTOUQ5.js → chunk-DUXOFCPO.js} +1 -1
- package/dist/{chunk-P2NRMJ7Z.js → chunk-HDUCP6EO.js} +1 -1
- package/dist/{chunk-FOEEDKBP.js → chunk-IRKB2GGJ.js} +22 -1
- package/dist/{chunk-SSJIK6WS.js → chunk-JNJDVC7V.js} +2 -2
- package/dist/{chunk-WBH2XEWO.js → chunk-JUUYPCFY.js} +4 -1
- package/dist/chunk-LOZ6XNOX.js +10550 -0
- package/dist/{chunk-QGXA2USP.js → chunk-MKKBEVXO.js} +1 -1
- package/dist/chunk-MUOJVRW7.js +328 -0
- package/dist/{chunk-JAKWVVVQ.js → chunk-NW6H7EN3.js} +15 -3
- package/dist/{chunk-WRMIYMXE.js → chunk-PBX42F4Q.js} +1401 -7
- package/dist/{chunk-63BP6O6E.js → chunk-PYCKEQ4W.js} +2 -2
- package/dist/{chunk-S4VYW4BR.js → chunk-QMBXEECD.js} +120 -6
- package/dist/{chunk-AYFKS4MM.js → chunk-QW24ZBSR.js} +1 -1
- package/dist/{chunk-UKTLRE7N.js → chunk-RJ3YK6O7.js} +5 -5
- package/dist/{chunk-UUUDSVC7.js → chunk-RKMTSOYH.js} +2 -2
- package/dist/{chunk-LWF5J43N.js → chunk-T7TRJBCG.js} +1 -1
- package/dist/{chunk-DB23N7KO.js → chunk-U7WLROQT.js} +3 -3
- package/dist/{chunk-JH6YDVT5.js → chunk-XYZKIFXY.js} +426 -10667
- package/dist/{chunk-ZF55RVJ3.js → chunk-ZB4BNTWR.js} +4 -4
- package/dist/executions.js +13 -11
- package/dist/global-operations-D2USVOPM.js +2 -0
- package/dist/history.js +5 -5
- package/dist/index.d.ts +357 -76
- package/dist/index.js +36 -33
- package/dist/nodes.js +2 -2
- package/dist/observability.js +7 -5
- package/dist/settings.js +7 -6
- package/dist/templates.js +11 -9
- package/dist/{workflow-builder-C7qKY7LD.d.ts → workflow-builder-BxyapBo5.d.ts} +18 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +13 -11
- package/dist/workflows-list.js +8 -8
- package/package.json +1 -1
- package/dist/ExecutionDetailPage-UFB7VMGE.js +0 -18
- package/dist/WorkflowBuilder-2UHPYNQI.js +0 -21
- package/dist/global-operations-ZWQZ7DNT.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-
|
|
1
|
+
import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-6J4RR46J.js';
|
|
2
2
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
3
3
|
import { useState, useCallback, useEffect } from 'react';
|
|
4
4
|
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { throwIfResultError } from './chunk-6NUHJPGJ.js';
|
|
2
|
+
import { RunFailureClustersDocument, DismissRunFailureClusterDocument, RunFailureTriageSettingsDocument, SetRunFailureTriageEnabledDocument, FgTriageFailedRunsDocument } from './chunk-6J4RR46J.js';
|
|
3
|
+
import { useTr } from './chunk-UULVIT25.js';
|
|
4
|
+
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
5
|
+
import { useState, useCallback, useEffect } from 'react';
|
|
6
|
+
import { Icon } from '@iconify/react';
|
|
7
|
+
import { Button } from '@burdenoff/fe-libs/ui';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var OPEN_STATUSES = [
|
|
11
|
+
"OPEN" /* Open */,
|
|
12
|
+
"PROPOSED" /* Proposed */
|
|
13
|
+
];
|
|
14
|
+
function messageOf(error) {
|
|
15
|
+
return error instanceof Error ? error.message : String(error);
|
|
16
|
+
}
|
|
17
|
+
async function fetchRunFailureClusters(variables) {
|
|
18
|
+
const result = throwIfResultError(
|
|
19
|
+
await getFluidGridsClient().query({
|
|
20
|
+
query: RunFailureClustersDocument,
|
|
21
|
+
variables,
|
|
22
|
+
fetchPolicy: "network-only"
|
|
23
|
+
})
|
|
24
|
+
);
|
|
25
|
+
return result.data?.runFailureClusters.items ?? [];
|
|
26
|
+
}
|
|
27
|
+
async function dismissRunFailureCluster(id) {
|
|
28
|
+
throwIfResultError(
|
|
29
|
+
await getFluidGridsClient().mutate({ mutation: DismissRunFailureClusterDocument, variables: { id } })
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function useFailureTriage() {
|
|
33
|
+
const [settings, setSettings] = useState(
|
|
34
|
+
null
|
|
35
|
+
);
|
|
36
|
+
const [clusters, setClusters] = useState([]);
|
|
37
|
+
const [loading, setLoading] = useState(true);
|
|
38
|
+
const [busy, setBusy] = useState(false);
|
|
39
|
+
const [error, setError] = useState(null);
|
|
40
|
+
const [lastRun, setLastRun] = useState(null);
|
|
41
|
+
const refetch = useCallback(async () => {
|
|
42
|
+
setLoading(true);
|
|
43
|
+
setError(null);
|
|
44
|
+
try {
|
|
45
|
+
const [settingsResult, items] = await Promise.all([
|
|
46
|
+
getFluidGridsClient().query({
|
|
47
|
+
query: RunFailureTriageSettingsDocument,
|
|
48
|
+
fetchPolicy: "network-only"
|
|
49
|
+
}),
|
|
50
|
+
fetchRunFailureClusters({
|
|
51
|
+
filter: { status: OPEN_STATUSES },
|
|
52
|
+
limit: 20
|
|
53
|
+
})
|
|
54
|
+
]);
|
|
55
|
+
setSettings(
|
|
56
|
+
throwIfResultError(settingsResult).data?.runFailureTriageSettings ?? null
|
|
57
|
+
);
|
|
58
|
+
setClusters(items);
|
|
59
|
+
} catch (loadError) {
|
|
60
|
+
setError(messageOf(loadError));
|
|
61
|
+
} finally {
|
|
62
|
+
setLoading(false);
|
|
63
|
+
}
|
|
64
|
+
}, []);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
void refetch();
|
|
67
|
+
}, [refetch]);
|
|
68
|
+
const setEnabled = useCallback(async (enabled) => {
|
|
69
|
+
setBusy(true);
|
|
70
|
+
setError(null);
|
|
71
|
+
try {
|
|
72
|
+
const result = throwIfResultError(
|
|
73
|
+
await getFluidGridsClient().mutate({
|
|
74
|
+
mutation: SetRunFailureTriageEnabledDocument,
|
|
75
|
+
variables: { enabled }
|
|
76
|
+
})
|
|
77
|
+
);
|
|
78
|
+
setSettings(result.data?.setRunFailureTriageEnabled ?? null);
|
|
79
|
+
} catch (toggleError) {
|
|
80
|
+
setError(messageOf(toggleError));
|
|
81
|
+
} finally {
|
|
82
|
+
setBusy(false);
|
|
83
|
+
}
|
|
84
|
+
}, []);
|
|
85
|
+
const runNow = useCallback(async () => {
|
|
86
|
+
setBusy(true);
|
|
87
|
+
setError(null);
|
|
88
|
+
try {
|
|
89
|
+
const result = throwIfResultError(
|
|
90
|
+
await getFluidGridsClient().mutate({ mutation: FgTriageFailedRunsDocument, variables: {} })
|
|
91
|
+
);
|
|
92
|
+
setLastRun(result.data?.fgTriageFailedRuns ?? null);
|
|
93
|
+
setClusters(
|
|
94
|
+
await fetchRunFailureClusters({
|
|
95
|
+
filter: { status: OPEN_STATUSES },
|
|
96
|
+
limit: 20
|
|
97
|
+
})
|
|
98
|
+
);
|
|
99
|
+
} catch (runError) {
|
|
100
|
+
setError(messageOf(runError));
|
|
101
|
+
} finally {
|
|
102
|
+
setBusy(false);
|
|
103
|
+
}
|
|
104
|
+
}, []);
|
|
105
|
+
const dismiss = useCallback(async (id) => {
|
|
106
|
+
setError(null);
|
|
107
|
+
try {
|
|
108
|
+
await dismissRunFailureCluster(id);
|
|
109
|
+
setClusters((current) => current.filter((cluster) => cluster.id !== id));
|
|
110
|
+
} catch (dismissError) {
|
|
111
|
+
setError(messageOf(dismissError));
|
|
112
|
+
}
|
|
113
|
+
}, []);
|
|
114
|
+
return {
|
|
115
|
+
settings,
|
|
116
|
+
clusters,
|
|
117
|
+
loading,
|
|
118
|
+
busy,
|
|
119
|
+
error,
|
|
120
|
+
lastRun,
|
|
121
|
+
refetch,
|
|
122
|
+
setEnabled,
|
|
123
|
+
runNow,
|
|
124
|
+
dismiss
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
var BUCKET_LABELS = {
|
|
128
|
+
EXPIRED_CONNECTION: {
|
|
129
|
+
label: "Expired connection",
|
|
130
|
+
icon: "mdi:key-alert-outline"
|
|
131
|
+
},
|
|
132
|
+
CONNECTOR_CONTRACT_CHANGE: {
|
|
133
|
+
label: "Connector change",
|
|
134
|
+
icon: "mdi:swap-horizontal"
|
|
135
|
+
},
|
|
136
|
+
BAD_NODE_CONFIG: { label: "Node configuration", icon: "mdi:cog-outline" },
|
|
137
|
+
UPSTREAM_TRANSIENT: { label: "Transient", icon: "mdi:weather-cloudy-alert" },
|
|
138
|
+
UNKNOWN: { label: "Unclassified", icon: "mdi:help-circle-outline" }
|
|
139
|
+
};
|
|
140
|
+
function ClusterRow({
|
|
141
|
+
cluster,
|
|
142
|
+
canRetry,
|
|
143
|
+
onOpenRun,
|
|
144
|
+
onRetry,
|
|
145
|
+
onDismiss
|
|
146
|
+
}) {
|
|
147
|
+
const tr = useTr();
|
|
148
|
+
const bucket = BUCKET_LABELS[String(cluster.bucket)] ?? {
|
|
149
|
+
label: String(cluster.bucket),
|
|
150
|
+
icon: "mdi:alert-outline"
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ jsx(
|
|
153
|
+
"li",
|
|
154
|
+
{
|
|
155
|
+
className: "rounded-lg border border-border-secondary bg-background-primary p-3",
|
|
156
|
+
"data-testid": "failure-cluster",
|
|
157
|
+
"data-bucket": String(cluster.bucket),
|
|
158
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
159
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
160
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
|
|
161
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-background-secondary px-2 py-0.5 text-xs text-text-secondary", children: [
|
|
162
|
+
/* @__PURE__ */ jsx(Icon, { icon: bucket.icon, width: 14 }),
|
|
163
|
+
tr(
|
|
164
|
+
`fluidgrids.triage.bucket.${String(cluster.bucket)}`,
|
|
165
|
+
bucket.label
|
|
166
|
+
)
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-text-primary", children: cluster.workflowName || cluster.workflowKey }),
|
|
169
|
+
/* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: tr("fluidgrids.triage.atNode", "at {{node}}", {
|
|
170
|
+
node: cluster.nodeId
|
|
171
|
+
}) })
|
|
172
|
+
] }),
|
|
173
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-sm text-text-secondary", children: cluster.signature }),
|
|
174
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-text-secondary", children: [
|
|
175
|
+
tr(
|
|
176
|
+
"fluidgrids.triage.runCount",
|
|
177
|
+
"{{count}} failed run(s), last {{when}}",
|
|
178
|
+
{
|
|
179
|
+
count: cluster.runCount,
|
|
180
|
+
when: new Date(String(cluster.lastSeenAt)).toLocaleString()
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
cluster.proposalId ? ` \xB7 ${tr("fluidgrids.triage.proposalReady", "Fix proposal ready to review")}` : ""
|
|
184
|
+
] }),
|
|
185
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-text-primary", children: cluster.advice })
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-wrap gap-2", children: [
|
|
188
|
+
/* @__PURE__ */ jsx(
|
|
189
|
+
Button,
|
|
190
|
+
{
|
|
191
|
+
size: "sm",
|
|
192
|
+
variant: "outline",
|
|
193
|
+
onClick: () => onOpenRun(cluster.lastRunId),
|
|
194
|
+
"data-testid": "failure-cluster-open",
|
|
195
|
+
children: cluster.proposalId ? tr("fluidgrids.triage.reviewFix", "Review fix") : tr("fluidgrids.triage.openRun", "Open run")
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
canRetry && /* @__PURE__ */ jsx(
|
|
199
|
+
Button,
|
|
200
|
+
{
|
|
201
|
+
size: "sm",
|
|
202
|
+
variant: "outline",
|
|
203
|
+
onClick: () => onRetry([cluster.lastRunId]),
|
|
204
|
+
children: tr("fluidgrids.triage.retry", "Retry")
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ jsx(
|
|
208
|
+
Button,
|
|
209
|
+
{
|
|
210
|
+
size: "sm",
|
|
211
|
+
variant: "ghost",
|
|
212
|
+
onClick: () => onDismiss(cluster.id),
|
|
213
|
+
"data-testid": "failure-cluster-dismiss",
|
|
214
|
+
children: tr("fluidgrids.triage.dismiss", "Dismiss")
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] })
|
|
218
|
+
] })
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
function FailureTriagePanel({
|
|
223
|
+
canManage,
|
|
224
|
+
canRetry,
|
|
225
|
+
onOpenRun,
|
|
226
|
+
onRetry
|
|
227
|
+
}) {
|
|
228
|
+
const tr = useTr();
|
|
229
|
+
const triage = useFailureTriage();
|
|
230
|
+
const enabled = triage.settings?.enabled ?? false;
|
|
231
|
+
return /* @__PURE__ */ jsxs(
|
|
232
|
+
"section",
|
|
233
|
+
{
|
|
234
|
+
className: "mb-6 rounded-xl border border-border-secondary bg-background-secondary p-4",
|
|
235
|
+
"data-testid": "failure-triage-panel",
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
238
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
239
|
+
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-base font-semibold text-text-primary", children: [
|
|
240
|
+
/* @__PURE__ */ jsx(Icon, { icon: "mdi:stethoscope", width: 18 }),
|
|
241
|
+
tr("fluidgrids.triage.title", "Failure triage")
|
|
242
|
+
] }),
|
|
243
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 max-w-2xl text-sm text-text-secondary", children: tr(
|
|
244
|
+
"fluidgrids.triage.description",
|
|
245
|
+
"Every hour, groups failed production runs, leaves temporary failures to the retry and prepares a fix proposal for you to review. It never changes a workflow on its own."
|
|
246
|
+
) }),
|
|
247
|
+
/* @__PURE__ */ jsxs(
|
|
248
|
+
"p",
|
|
249
|
+
{
|
|
250
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
251
|
+
"data-testid": "failure-triage-status",
|
|
252
|
+
children: [
|
|
253
|
+
enabled ? tr("fluidgrids.triage.on", "On") : tr("fluidgrids.triage.off", "Off"),
|
|
254
|
+
triage.settings?.lastTickAt ? ` \xB7 ${tr("fluidgrids.triage.lastRun", "last run {{when}}", {
|
|
255
|
+
when: new Date(
|
|
256
|
+
String(triage.settings.lastTickAt)
|
|
257
|
+
).toLocaleString()
|
|
258
|
+
})}` : "",
|
|
259
|
+
triage.settings && !triage.settings.killSwitchOn ? ` \xB7 ${tr("fluidgrids.triage.paused", "paused for this workspace")}` : ""
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
] }),
|
|
264
|
+
canManage && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-wrap gap-2", children: [
|
|
265
|
+
enabled && /* @__PURE__ */ jsx(
|
|
266
|
+
Button,
|
|
267
|
+
{
|
|
268
|
+
size: "sm",
|
|
269
|
+
variant: "outline",
|
|
270
|
+
onClick: () => void triage.runNow(),
|
|
271
|
+
disabled: triage.busy,
|
|
272
|
+
"data-testid": "failure-triage-run-now",
|
|
273
|
+
children: tr("fluidgrids.triage.runNow", "Run now")
|
|
274
|
+
}
|
|
275
|
+
),
|
|
276
|
+
/* @__PURE__ */ jsx(
|
|
277
|
+
Button,
|
|
278
|
+
{
|
|
279
|
+
size: "sm",
|
|
280
|
+
variant: enabled ? "outline" : "default",
|
|
281
|
+
onClick: () => void triage.setEnabled(!enabled),
|
|
282
|
+
disabled: triage.busy || triage.loading,
|
|
283
|
+
"data-testid": "failure-triage-toggle",
|
|
284
|
+
children: enabled ? tr("fluidgrids.triage.turnOff", "Turn off") : tr("fluidgrids.triage.turnOn", "Turn on")
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
] })
|
|
288
|
+
] }),
|
|
289
|
+
triage.error && /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-status-error-text", children: triage.error }),
|
|
290
|
+
triage.lastRun && !triage.lastRun.skipped && /* @__PURE__ */ jsx("p", { className: "mt-3 text-xs text-text-secondary", children: tr(
|
|
291
|
+
"fluidgrids.triage.lastRunSummary",
|
|
292
|
+
"Checked {{scanned}} failed run(s): {{created}} new cluster(s), {{suppressed}} left to the retry.",
|
|
293
|
+
{
|
|
294
|
+
scanned: triage.lastRun.scannedRuns,
|
|
295
|
+
created: triage.lastRun.newClusterCount,
|
|
296
|
+
suppressed: triage.lastRun.suppressedTransient
|
|
297
|
+
}
|
|
298
|
+
) }),
|
|
299
|
+
triage.clusters.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "mt-4 space-y-2", "data-testid": "failure-cluster-list", children: triage.clusters.map((cluster) => /* @__PURE__ */ jsx(
|
|
300
|
+
ClusterRow,
|
|
301
|
+
{
|
|
302
|
+
cluster,
|
|
303
|
+
canRetry,
|
|
304
|
+
onOpenRun,
|
|
305
|
+
onRetry,
|
|
306
|
+
onDismiss: (id) => void triage.dismiss(id)
|
|
307
|
+
},
|
|
308
|
+
cluster.id
|
|
309
|
+
)) }) : !triage.loading && /* @__PURE__ */ jsx(
|
|
310
|
+
"p",
|
|
311
|
+
{
|
|
312
|
+
className: "mt-4 text-sm text-text-secondary",
|
|
313
|
+
"data-testid": "failure-triage-empty",
|
|
314
|
+
children: enabled ? tr(
|
|
315
|
+
"fluidgrids.triage.empty",
|
|
316
|
+
"No repeated failures need attention."
|
|
317
|
+
) : tr(
|
|
318
|
+
"fluidgrids.triage.emptyOff",
|
|
319
|
+
"Turn failure triage on to have repeated failures grouped and explained here."
|
|
320
|
+
)
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export { BUCKET_LABELS, FailureTriagePanel, OPEN_STATUSES, dismissRunFailureCluster, fetchRunFailureClusters };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-
|
|
2
|
-
import { throwIfResultError } from './chunk-
|
|
1
|
+
import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-MKKBEVXO.js';
|
|
2
|
+
import { throwIfResultError } from './chunk-6NUHJPGJ.js';
|
|
3
3
|
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
4
|
-
import { WorkflowProposalDocument, ProposeRunFixDocument, ProposeWorkflowChangeDocument, ApplyWorkflowProposalDocument, RejectWorkflowProposalDocument, CancelWorkflowProposalDocument } from './chunk-
|
|
4
|
+
import { WorkflowProposalDocument, ProposeRunFixDocument, ProposeWorkflowChangeDocument, ApplyWorkflowProposalDocument, RejectWorkflowProposalDocument, CancelWorkflowProposalDocument } from './chunk-6J4RR46J.js';
|
|
5
5
|
import { useTr } from './chunk-UULVIT25.js';
|
|
6
6
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
7
7
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
@@ -257,6 +257,17 @@ function useWorkflowProposal() {
|
|
|
257
257
|
},
|
|
258
258
|
[clearTimer, poll]
|
|
259
259
|
);
|
|
260
|
+
const open = useCallback(
|
|
261
|
+
async (id) => {
|
|
262
|
+
const run = ++runRef.current;
|
|
263
|
+
clearTimer();
|
|
264
|
+
setError(null);
|
|
265
|
+
setTimedOut(false);
|
|
266
|
+
setIsWorking(true);
|
|
267
|
+
await poll(run, id, Date.now());
|
|
268
|
+
},
|
|
269
|
+
[clearTimer, poll]
|
|
270
|
+
);
|
|
260
271
|
const decide = useCallback(
|
|
261
272
|
async (action) => {
|
|
262
273
|
const id = proposal?.id;
|
|
@@ -310,6 +321,7 @@ function useWorkflowProposal() {
|
|
|
310
321
|
error,
|
|
311
322
|
timedOut,
|
|
312
323
|
start,
|
|
324
|
+
open,
|
|
313
325
|
apply,
|
|
314
326
|
reject,
|
|
315
327
|
cancel,
|