@burdenoff/fluidgrids-fe-sdk 2026.1114.3 → 2026.1114.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ExecutionDetailPage-BbwEqykw.js → ExecutionDetailPage-BbvY2bcb.js} +6 -71
- package/dist/{ExecutionsListPage-DCfsvBKv.js → ExecutionsListPage-Ky3TAL9U.js} +240 -19
- package/dist/executions.js +2 -2
- package/dist/index.js +5 -5
- package/dist/{useDurableParity-CuijtLSf.js → useDurableParity-gigqyXDq.js} +87 -2
- package/dist/workflow-pages.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as activityOptionsFrom, d as errorAdvice, f as needsReconnect, i as useRunPending, l as ConfirmStopRunDialog, m as NodeStatusBadge, n as useDurableParityRunFields, o as ActivityOptionsFields, p as ExecutionStatusBadge, r as useRunMetadata, s as EMPTY_ACTIVITY_OPTIONS_FORM, t as setRunVersioningOverride } from "./useDurableParity-gigqyXDq.js";
|
|
4
4
|
import { n as formatRunVersion, r as nodeDisplayTitle, t as buildNodeDisplayMap } from "./run-display-UjLAoYqQ.js";
|
|
5
5
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
6
6
|
import { c as RunLogAppendedDocument, l as RunLogsDocument, s as isAgentNodeType } from "./agent-form-D0uLvzx4.js";
|
|
@@ -5500,42 +5500,6 @@ function RunActivitiesCard({ runId, activities, pauseStates, pauseRules, canCont
|
|
|
5500
5500
|
]
|
|
5501
5501
|
});
|
|
5502
5502
|
}
|
|
5503
|
-
/** Milliseconds from a seconds field ("" leaves the option unchanged). */
|
|
5504
|
-
function optionalMs(text) {
|
|
5505
|
-
const value = text.trim();
|
|
5506
|
-
if (!value) return void 0;
|
|
5507
|
-
const seconds = Number(value);
|
|
5508
|
-
return Number.isFinite(seconds) && seconds > 0 ? Math.round(seconds * 1e3) : null;
|
|
5509
|
-
}
|
|
5510
|
-
function optionalInt(text) {
|
|
5511
|
-
const value = text.trim();
|
|
5512
|
-
if (!value) return void 0;
|
|
5513
|
-
return /^\d+$/.test(value) ? Number(value) : null;
|
|
5514
|
-
}
|
|
5515
|
-
/** The options input from the form; null when a field does not parse. */
|
|
5516
|
-
function activityOptionsFrom(form) {
|
|
5517
|
-
const maxRetries = optionalInt(form.maxRetries);
|
|
5518
|
-
const retryDelay = optionalMs(form.retryDelaySeconds);
|
|
5519
|
-
const startToClose = optionalMs(form.startToCloseSeconds);
|
|
5520
|
-
const scheduleToClose = optionalMs(form.scheduleToCloseSeconds);
|
|
5521
|
-
const heartbeat = optionalMs(form.heartbeatSeconds);
|
|
5522
|
-
if ([
|
|
5523
|
-
maxRetries,
|
|
5524
|
-
retryDelay,
|
|
5525
|
-
startToClose,
|
|
5526
|
-
scheduleToClose,
|
|
5527
|
-
heartbeat
|
|
5528
|
-
].includes(null)) return null;
|
|
5529
|
-
const options = {};
|
|
5530
|
-
const retry = {};
|
|
5531
|
-
if (maxRetries !== void 0) retry.maxRetries = maxRetries;
|
|
5532
|
-
if (retryDelay !== void 0) retry.retryDelay = retryDelay;
|
|
5533
|
-
if (Object.keys(retry).length > 0) options.retry = retry;
|
|
5534
|
-
if (startToClose !== void 0) options.startToCloseTimeoutMs = startToClose;
|
|
5535
|
-
if (scheduleToClose !== void 0) options.scheduleToCloseTimeoutMs = scheduleToClose;
|
|
5536
|
-
if (heartbeat !== void 0) options.heartbeatTimeoutMs = heartbeat;
|
|
5537
|
-
return Object.keys(options).length > 0 ? options : null;
|
|
5538
|
-
}
|
|
5539
5503
|
function ActivityActionDialog({ runId, action, activity, onClose, onDone }) {
|
|
5540
5504
|
const tr = useTr();
|
|
5541
5505
|
const [reason, setReason] = useState("");
|
|
@@ -5544,13 +5508,7 @@ function ActivityActionDialog({ runId, action, activity, onClose, onDone }) {
|
|
|
5544
5508
|
const [result, setResult] = useState("");
|
|
5545
5509
|
const [failureMessage, setFailureMessage] = useState("");
|
|
5546
5510
|
const [nonRetryable, setNonRetryable] = useState(false);
|
|
5547
|
-
const [options, setOptions] = useState({
|
|
5548
|
-
maxRetries: "",
|
|
5549
|
-
retryDelaySeconds: "",
|
|
5550
|
-
startToCloseSeconds: "",
|
|
5551
|
-
scheduleToCloseSeconds: "",
|
|
5552
|
-
heartbeatSeconds: ""
|
|
5553
|
-
});
|
|
5511
|
+
const [options, setOptions] = useState({ ...EMPTY_ACTIVITY_OPTIONS_FORM });
|
|
5554
5512
|
const [busy, setBusy] = useState(false);
|
|
5555
5513
|
const [error, setError] = useState(null);
|
|
5556
5514
|
const selector = activity ? { activityId: activity.activityId } : { all: true };
|
|
@@ -5650,33 +5608,10 @@ function ActivityActionDialog({ runId, action, activity, onClose, onDone }) {
|
|
|
5650
5608
|
onCheckedChange: setResetHeartbeat
|
|
5651
5609
|
})]
|
|
5652
5610
|
}),
|
|
5653
|
-
action === "options" && /* @__PURE__ */
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
["retryDelaySeconds", tr("fluidgrids.runControl.activities.retryDelay", "First retry delay (s)")],
|
|
5658
|
-
["startToCloseSeconds", tr("fluidgrids.runControl.activities.startToClose", "Start-to-close timeout (s)")],
|
|
5659
|
-
["scheduleToCloseSeconds", tr("fluidgrids.runControl.activities.scheduleToClose", "Schedule-to-close timeout (s)")],
|
|
5660
|
-
["heartbeatSeconds", tr("fluidgrids.runControl.activities.heartbeat", "Heartbeat timeout (s)")]
|
|
5661
|
-
].map(([field, label]) => /* @__PURE__ */ jsxs("div", {
|
|
5662
|
-
className: "space-y-1.5",
|
|
5663
|
-
children: [/* @__PURE__ */ jsx(Label, {
|
|
5664
|
-
htmlFor: `activity-option-${field}`,
|
|
5665
|
-
children: label
|
|
5666
|
-
}), /* @__PURE__ */ jsx(Input, {
|
|
5667
|
-
id: `activity-option-${field}`,
|
|
5668
|
-
inputMode: "decimal",
|
|
5669
|
-
value: options[field],
|
|
5670
|
-
onChange: (event) => setOptions((current) => ({
|
|
5671
|
-
...current,
|
|
5672
|
-
[field]: event.target.value
|
|
5673
|
-
})),
|
|
5674
|
-
"data-testid": `activity-option-${field}`
|
|
5675
|
-
})]
|
|
5676
|
-
}, field)), /* @__PURE__ */ jsx("p", {
|
|
5677
|
-
className: "text-xs text-text-secondary sm:col-span-2",
|
|
5678
|
-
children: tr("fluidgrids.runControl.activities.optionsHint", "Empty fields stay as they are. The change applies from the next attempt.")
|
|
5679
|
-
})]
|
|
5611
|
+
action === "options" && /* @__PURE__ */ jsx(ActivityOptionsFields, {
|
|
5612
|
+
idPrefix: "activity-option",
|
|
5613
|
+
value: options,
|
|
5614
|
+
onChange: setOptions
|
|
5680
5615
|
}),
|
|
5681
5616
|
action === "complete" && /* @__PURE__ */ jsx(JsonField, {
|
|
5682
5617
|
id: "activity-complete-result",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
3
3
|
import { g as useExecutionsStore, h as DEFAULT_EXECUTIONS_FILTER } from "./config-X97zrIvn.js";
|
|
4
|
-
import { b as validateDateRange, c as EMPTY_SEARCH_FILTER, d as searchFilterConflicts, i as useExecutionStats, l as OPERATORS_BY_TYPE, o as useExecutionsWithStore, r as useExecutionActions, t as useAutoRefresh, u as buildSearchAttributeFilter } from "./useExecutions-wka2Z5w3.js";
|
|
4
|
+
import { b as validateDateRange, c as EMPTY_SEARCH_FILTER, d as searchFilterConflicts, i as useExecutionStats, l as OPERATORS_BY_TYPE, m as overrideRequestOf, o as useExecutionsWithStore, r as useExecutionActions, t as useAutoRefresh, u as buildSearchAttributeFilter } from "./useExecutions-wka2Z5w3.js";
|
|
5
5
|
import { m as usePhaseCFlags, u as useDurableParityEnabled } from "./feature-flags-B_b8PJ6Z.js";
|
|
6
6
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
7
7
|
import { n as useFluidGridsPageControls } from "./pageControlsBridge-0pX9s-3k.js";
|
|
8
8
|
import { t as executionsControls } from "./pageControlSpecs-DZJ9K37m.js";
|
|
9
9
|
import { t as TagFilterSelect } from "./TagFilterSelect-CAShgvbS.js";
|
|
10
10
|
import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
|
|
11
|
-
import { a as useRunStatusCounts, c as errorAdvice,
|
|
11
|
+
import { a as useRunStatusCounts, c as activityOptionsFrom, d as errorAdvice, g as RUN_STATUS_CONFIG, h as runStatusLabels, l as ConfirmStopRunDialog, o as ActivityOptionsFields, p as ExecutionStatusBadge, s as EMPTY_ACTIVITY_OPTIONS_FORM, u as ADVICE_ERROR_TYPES } from "./useDurableParity-gigqyXDq.js";
|
|
12
12
|
import { t as Disclosure } from "./Disclosure-CsxDspR7.js";
|
|
13
13
|
import { n as formatRunVersion } from "./run-display-UjLAoYqQ.js";
|
|
14
14
|
import { r as runSuggestAnchorProps } from "./entities-I_0kio3q.js";
|
|
@@ -17,7 +17,7 @@ import { r as useRunHumanRequests } from "./useHumanRequests-DwG2tQ3f.js";
|
|
|
17
17
|
import { n as runListLinkKey, t as runListFilterFromSearch } from "./run-list-links-CH-V4Li5.js";
|
|
18
18
|
import { t as TechnicalDetails } from "./TechnicalDetails-r5JXr1jZ.js";
|
|
19
19
|
import { t as RunActionsMenu } from "./RunActionsMenu-BZY4NreS.js";
|
|
20
|
-
import { h as useWorkflowDefinitions } from "./useWorkflows-BrqrVT8h.js";
|
|
20
|
+
import { h as useWorkflowDefinitions, v as useWorkflowVersions } from "./useWorkflows-BrqrVT8h.js";
|
|
21
21
|
import { t as FluidGridsDocsLink } from "./FluidGridsDocsLink-JxkBpOeb.js";
|
|
22
22
|
import { s as useFluidGridsPermission, t as FLUIDGRIDS_PERMISSIONS } from "./constants-65QV61nQ.js";
|
|
23
23
|
import { C as jsonArg, F as startBatchOperation, I as startBatchTerminate, P as startBatchExport, m as fetchBatchOperations, n as cancelBatchOperation, p as fetchBatchOperation, x as fetchSearchAttributes } from "./api-CEnNq15C.js";
|
|
@@ -2531,7 +2531,10 @@ function SearchAttributeFilterBar({ applied, onApply, conflicts, className }) {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
|
|
2533
2533
|
// src/modules/run-control/utils/batch.ts
|
|
2534
|
-
/**
|
|
2534
|
+
/**
|
|
2535
|
+
* The operations the batch menu offers, in menu order: every batch type the
|
|
2536
|
+
* service runs (spec code-first 11 §2.19).
|
|
2537
|
+
*/
|
|
2535
2538
|
const BATCH_MENU_OPERATIONS = [
|
|
2536
2539
|
"SIGNAL",
|
|
2537
2540
|
"CANCEL",
|
|
@@ -2540,24 +2543,34 @@ const BATCH_MENU_OPERATIONS = [
|
|
|
2540
2543
|
"PAUSE_ACTIVITY",
|
|
2541
2544
|
"UNPAUSE_ACTIVITY",
|
|
2542
2545
|
"RESET_ACTIVITY",
|
|
2546
|
+
"UPDATE_ACTIVITY_OPTIONS",
|
|
2547
|
+
"UPDATE_RUN_OPTIONS",
|
|
2543
2548
|
"EXPORT"
|
|
2544
2549
|
];
|
|
2545
2550
|
/**
|
|
2546
2551
|
* Operations on durable work only. A copy of the service's
|
|
2547
|
-
* `DURABLE_BATCH_TYPES
|
|
2548
|
-
*
|
|
2549
|
-
* control.
|
|
2552
|
+
* `DURABLE_BATCH_TYPES`: the service refuses them with FEATURE_DISABLED unless
|
|
2553
|
+
* durable functions are on besides run control.
|
|
2550
2554
|
*/
|
|
2551
2555
|
const DURABLE_BATCH_OPERATIONS = /* @__PURE__ */ new Set([
|
|
2552
2556
|
"RESET",
|
|
2553
2557
|
"PAUSE_ACTIVITY",
|
|
2554
2558
|
"UNPAUSE_ACTIVITY",
|
|
2555
|
-
"RESET_ACTIVITY"
|
|
2559
|
+
"RESET_ACTIVITY",
|
|
2560
|
+
"UPDATE_ACTIVITY_OPTIONS",
|
|
2561
|
+
"UPDATE_RUN_OPTIONS"
|
|
2556
2562
|
]);
|
|
2557
2563
|
/**
|
|
2564
|
+
* Operations that also need durable parity (`fluidgrids.durable-parity`): the
|
|
2565
|
+
* service's startBatchOperation calls requireDurableParity for them, as the
|
|
2566
|
+
* single-run setWorkflowRunVersioningOverride does.
|
|
2567
|
+
*/
|
|
2568
|
+
const PARITY_BATCH_OPERATIONS = /* @__PURE__ */ new Set(["UPDATE_RUN_OPTIONS"]);
|
|
2569
|
+
/**
|
|
2558
2570
|
* The operations the batch menu offers: nothing without run control; the
|
|
2559
|
-
* durable-only ones need run control with durable functions
|
|
2560
|
-
* workflow-run delete permission, EXPORT
|
|
2571
|
+
* durable-only ones need run control with durable functions, and run options
|
|
2572
|
+
* durable parity as well; TERMINATE the workflow-run delete permission, EXPORT
|
|
2573
|
+
* run archival, the rest execute.
|
|
2561
2574
|
*/
|
|
2562
2575
|
function allowedBatchOperations(gates, permissions) {
|
|
2563
2576
|
const allowed = /* @__PURE__ */ new Set();
|
|
@@ -2565,6 +2578,7 @@ function allowedBatchOperations(gates, permissions) {
|
|
|
2565
2578
|
if (permissions.canExecute) for (const type of BATCH_MENU_OPERATIONS) {
|
|
2566
2579
|
if (type === "TERMINATE" || type === "EXPORT") continue;
|
|
2567
2580
|
if (DURABLE_BATCH_OPERATIONS.has(type) && !gates.runControlDurable) continue;
|
|
2581
|
+
if (PARITY_BATCH_OPERATIONS.has(type) && gates.durableParity !== true) continue;
|
|
2568
2582
|
allowed.add(type);
|
|
2569
2583
|
}
|
|
2570
2584
|
if (permissions.canDelete) allowed.add("TERMINATE");
|
|
@@ -2597,7 +2611,59 @@ function batchSelection(input, selection) {
|
|
|
2597
2611
|
}
|
|
2598
2612
|
/** Whether the operation needs the activity selector. */
|
|
2599
2613
|
function needsActivitySelector(type) {
|
|
2600
|
-
return type === "PAUSE_ACTIVITY" || type === "UNPAUSE_ACTIVITY" || type === "RESET_ACTIVITY";
|
|
2614
|
+
return type === "PAUSE_ACTIVITY" || type === "UNPAUSE_ACTIVITY" || type === "RESET_ACTIVITY" || type === "UPDATE_ACTIVITY_OPTIONS";
|
|
2615
|
+
}
|
|
2616
|
+
/**
|
|
2617
|
+
* The `selector` of an activity operation; null when a type is chosen but not
|
|
2618
|
+
* named. The service takes exactly one of activityId, activityType or all;
|
|
2619
|
+
* an activity id names one run's activity, so a batch never sends it.
|
|
2620
|
+
*/
|
|
2621
|
+
function batchActivitySelector(scope) {
|
|
2622
|
+
if (scope.kind === "all") return { all: true };
|
|
2623
|
+
const activityType = scope.activityType.trim();
|
|
2624
|
+
return activityType ? { activityType } : null;
|
|
2625
|
+
}
|
|
2626
|
+
/**
|
|
2627
|
+
* The payload of an UPDATE_ACTIVITY_OPTIONS job; null until the selector is
|
|
2628
|
+
* complete and at least one option is set (the service refuses a job without
|
|
2629
|
+
* `activityOptions`, and an empty one would change nothing).
|
|
2630
|
+
*/
|
|
2631
|
+
function updateActivityOptionsPayload(scope, options) {
|
|
2632
|
+
const selector = batchActivitySelector(scope);
|
|
2633
|
+
if (!selector || !options) return null;
|
|
2634
|
+
return {
|
|
2635
|
+
selector,
|
|
2636
|
+
activityOptions: options
|
|
2637
|
+
};
|
|
2638
|
+
}
|
|
2639
|
+
/**
|
|
2640
|
+
* The payload of an UPDATE_RUN_OPTIONS job: the versioning override to set on
|
|
2641
|
+
* each run, or `clearVersioningOverride` to remove it. Null for a pin with no
|
|
2642
|
+
* version chosen.
|
|
2643
|
+
*/
|
|
2644
|
+
function updateRunOptionsPayload(choice, version) {
|
|
2645
|
+
const request = overrideRequestOf(choice, version);
|
|
2646
|
+
if (!request.ok) return null;
|
|
2647
|
+
return request.override ? { versioningOverride: request.override } : { clearVersioningOverride: true };
|
|
2648
|
+
}
|
|
2649
|
+
/**
|
|
2650
|
+
* The one workflow a job covers, or null when it may cover several. A pinned
|
|
2651
|
+
* version belongs to one workflow, so the batch dialog offers "Pin to a
|
|
2652
|
+
* version" only when this is known: "select all matching" takes the list's
|
|
2653
|
+
* workflow filter; selected ids count only when every one of them is on the
|
|
2654
|
+
* current page and they share one workflow.
|
|
2655
|
+
*/
|
|
2656
|
+
function batchWorkflowKey(input, selection, rows) {
|
|
2657
|
+
if (selection.allMatching) return input.workflowKey?.trim() || null;
|
|
2658
|
+
if (selection.runIds.length === 0) return null;
|
|
2659
|
+
const keyOf = new Map(rows.map((row) => [row.id, row.workflowKey]));
|
|
2660
|
+
const keys = /* @__PURE__ */ new Set();
|
|
2661
|
+
for (const id of selection.runIds) {
|
|
2662
|
+
const key = keyOf.get(id);
|
|
2663
|
+
if (!key) return null;
|
|
2664
|
+
keys.add(key);
|
|
2665
|
+
}
|
|
2666
|
+
return keys.size === 1 ? [...keys][0] : null;
|
|
2601
2667
|
}
|
|
2602
2668
|
/** Progress of a job: succeeded, failed and skipped runs out of its total. */
|
|
2603
2669
|
function batchProgress(job) {
|
|
@@ -2619,7 +2685,10 @@ function batchProgress(job) {
|
|
|
2619
2685
|
* filter), the dialog that dry-runs and starts a job, and the progress drawer
|
|
2620
2686
|
* that follows it. TERMINATE goes through startBatchTerminate (the workflow-run
|
|
2621
2687
|
* delete pair) and EXPORT through startBatchExport (the read pair); the rest
|
|
2622
|
-
* through startBatchOperation.
|
|
2688
|
+
* through startBatchOperation. UPDATE_ACTIVITY_OPTIONS changes the retry
|
|
2689
|
+
* policy and timeouts of every open activity (or every activity of one type)
|
|
2690
|
+
* of each run; UPDATE_RUN_OPTIONS sets or removes each run's versioning
|
|
2691
|
+
* override, pinning only when the job covers one workflow.
|
|
2623
2692
|
*/
|
|
2624
2693
|
/** The drawer re-reads a running job this often (besides the subscription). */
|
|
2625
2694
|
const BATCH_POLL_INTERVAL_MS = 3e3;
|
|
@@ -2631,6 +2700,8 @@ const OPERATION_TYPES = {
|
|
|
2631
2700
|
PAUSE_ACTIVITY: "PAUSE_ACTIVITY",
|
|
2632
2701
|
UNPAUSE_ACTIVITY: "UNPAUSE_ACTIVITY",
|
|
2633
2702
|
RESET_ACTIVITY: "RESET_ACTIVITY",
|
|
2703
|
+
UPDATE_ACTIVITY_OPTIONS: "UPDATE_ACTIVITY_OPTIONS",
|
|
2704
|
+
UPDATE_RUN_OPTIONS: "UPDATE_RUN_OPTIONS",
|
|
2634
2705
|
EXPORT: "EXPORT"
|
|
2635
2706
|
};
|
|
2636
2707
|
function useBatchOperationLabels() {
|
|
@@ -2643,6 +2714,8 @@ function useBatchOperationLabels() {
|
|
|
2643
2714
|
PAUSE_ACTIVITY: tr("fluidgrids.runControl.batch.op.pauseActivity", "Pause activities"),
|
|
2644
2715
|
UNPAUSE_ACTIVITY: tr("fluidgrids.runControl.batch.op.unpauseActivity", "Unpause activities"),
|
|
2645
2716
|
RESET_ACTIVITY: tr("fluidgrids.runControl.batch.op.resetActivity", "Reset activity attempts"),
|
|
2717
|
+
UPDATE_ACTIVITY_OPTIONS: tr("fluidgrids.runControl.batch.op.updateActivityOptions", "Change activity options"),
|
|
2718
|
+
UPDATE_RUN_OPTIONS: tr("fluidgrids.runControl.batch.op.updateRunOptions", "Change run versioning"),
|
|
2646
2719
|
EXPORT: tr("fluidgrids.runControl.batch.op.export", "Export to archive")
|
|
2647
2720
|
};
|
|
2648
2721
|
}
|
|
@@ -2689,6 +2762,126 @@ function BatchMenu({ allowed, onPick, onShowJobs }) {
|
|
|
2689
2762
|
})]
|
|
2690
2763
|
});
|
|
2691
2764
|
}
|
|
2765
|
+
/** The pin version picker, mounted only while a pin is chosen. */
|
|
2766
|
+
function BatchPinVersionSelect({ workflowKey, value, onChange }) {
|
|
2767
|
+
const tr = useTr();
|
|
2768
|
+
const { versions } = useWorkflowVersions(workflowKey);
|
|
2769
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
2770
|
+
className: "block text-sm text-text-secondary",
|
|
2771
|
+
children: [tr("fluidgrids.executions.override.version", "Version"), /* @__PURE__ */ jsxs("select", {
|
|
2772
|
+
value,
|
|
2773
|
+
onChange: (event) => onChange(event.target.value),
|
|
2774
|
+
className: "mt-1 h-9 w-full rounded-md border border-border-default bg-surface-canvas px-2 text-sm text-text-primary",
|
|
2775
|
+
"data-testid": "batch-run-options-version",
|
|
2776
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
2777
|
+
value: "",
|
|
2778
|
+
children: tr("fluidgrids.executions.override.chooseVersion", "Choose a version")
|
|
2779
|
+
}), versions.map((definition) => /* @__PURE__ */ jsx("option", {
|
|
2780
|
+
value: definition.version,
|
|
2781
|
+
children: definition.version
|
|
2782
|
+
}, definition.version))]
|
|
2783
|
+
})]
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2786
|
+
/** Which activities of each run an activity operation acts on. */
|
|
2787
|
+
function BatchActivityScopeFields({ value, onChange }) {
|
|
2788
|
+
const tr = useTr();
|
|
2789
|
+
return /* @__PURE__ */ jsxs("fieldset", {
|
|
2790
|
+
className: "space-y-2",
|
|
2791
|
+
"data-testid": "batch-activity-scope",
|
|
2792
|
+
children: [
|
|
2793
|
+
/* @__PURE__ */ jsxs("label", {
|
|
2794
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
2795
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
2796
|
+
type: "radio",
|
|
2797
|
+
name: "batch-activity-scope",
|
|
2798
|
+
checked: value.kind === "all",
|
|
2799
|
+
onChange: () => onChange({ kind: "all" }),
|
|
2800
|
+
"data-testid": "batch-activity-scope-all"
|
|
2801
|
+
}), tr("fluidgrids.runControl.batch.allActivities", "Applies to every open activity of each run.")]
|
|
2802
|
+
}),
|
|
2803
|
+
/* @__PURE__ */ jsxs("label", {
|
|
2804
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
2805
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
2806
|
+
type: "radio",
|
|
2807
|
+
name: "batch-activity-scope",
|
|
2808
|
+
checked: value.kind === "type",
|
|
2809
|
+
onChange: () => onChange({
|
|
2810
|
+
kind: "type",
|
|
2811
|
+
activityType: ""
|
|
2812
|
+
}),
|
|
2813
|
+
"data-testid": "batch-activity-scope-type"
|
|
2814
|
+
}), tr("fluidgrids.runControl.batch.activityTypeScope", "Only activities of one type")]
|
|
2815
|
+
}),
|
|
2816
|
+
value.kind === "type" && /* @__PURE__ */ jsxs("div", {
|
|
2817
|
+
className: "space-y-1.5",
|
|
2818
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
2819
|
+
htmlFor: "batch-activity-type",
|
|
2820
|
+
children: tr("fluidgrids.runControl.batch.activityType", "Activity type")
|
|
2821
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
2822
|
+
id: "batch-activity-type",
|
|
2823
|
+
value: value.activityType,
|
|
2824
|
+
placeholder: "chargeCard",
|
|
2825
|
+
onChange: (event) => onChange({
|
|
2826
|
+
kind: "type",
|
|
2827
|
+
activityType: event.target.value
|
|
2828
|
+
}),
|
|
2829
|
+
"data-testid": "batch-activity-type"
|
|
2830
|
+
})]
|
|
2831
|
+
})
|
|
2832
|
+
]
|
|
2833
|
+
});
|
|
2834
|
+
}
|
|
2835
|
+
/**
|
|
2836
|
+
* The versioning override an UPDATE_RUN_OPTIONS job sets. Pinning is offered
|
|
2837
|
+
* only when the job covers one workflow, whose versions the picker lists.
|
|
2838
|
+
*/
|
|
2839
|
+
function BatchRunOptionsFields({ choice, onChoiceChange, pinVersion, onPinVersionChange, workflowKey }) {
|
|
2840
|
+
const tr = useTr();
|
|
2841
|
+
return /* @__PURE__ */ jsxs("fieldset", {
|
|
2842
|
+
className: "space-y-2",
|
|
2843
|
+
"data-testid": "batch-run-options",
|
|
2844
|
+
children: [[
|
|
2845
|
+
[
|
|
2846
|
+
"autoUpgrade",
|
|
2847
|
+
tr("fluidgrids.executions.override.autoUpgrade", "Auto-upgrade"),
|
|
2848
|
+
tr("fluidgrids.executions.override.autoUpgradeHint", "Each new workflow task uses the active version's bundle, after a replay check.")
|
|
2849
|
+
],
|
|
2850
|
+
[
|
|
2851
|
+
"remove",
|
|
2852
|
+
tr("fluidgrids.executions.override.remove", "Remove override"),
|
|
2853
|
+
tr("fluidgrids.executions.override.removeHint", "The run follows the behaviour it started with. A pinned run keeps its bundle.")
|
|
2854
|
+
],
|
|
2855
|
+
[
|
|
2856
|
+
"pin",
|
|
2857
|
+
tr("fluidgrids.executions.override.pin", "Pin to a version"),
|
|
2858
|
+
workflowKey ? tr("fluidgrids.executions.override.pinHint", "The run keeps that version's bundle. A different bundle is replay-checked first.") : tr("fluidgrids.runControl.batch.pinNeedsOneWorkflow", "Filter the list to one workflow, or select runs of one workflow, to pin them to a version.")
|
|
2859
|
+
]
|
|
2860
|
+
].map(([id, label, hint]) => /* @__PURE__ */ jsxs("label", {
|
|
2861
|
+
className: "flex cursor-pointer gap-2 rounded-md border border-border-default p-2",
|
|
2862
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
2863
|
+
type: "radio",
|
|
2864
|
+
name: "batch-run-options",
|
|
2865
|
+
value: id,
|
|
2866
|
+
checked: choice === id,
|
|
2867
|
+
disabled: id === "pin" && !workflowKey,
|
|
2868
|
+
onChange: () => onChoiceChange(id),
|
|
2869
|
+
"data-testid": `batch-run-options-${id}`,
|
|
2870
|
+
className: "mt-1"
|
|
2871
|
+
}), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
|
|
2872
|
+
className: "block text-sm font-medium text-text-primary",
|
|
2873
|
+
children: label
|
|
2874
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2875
|
+
className: "block text-xs text-text-secondary",
|
|
2876
|
+
children: hint
|
|
2877
|
+
})] })]
|
|
2878
|
+
}, id)), choice === "pin" && workflowKey && /* @__PURE__ */ jsx(BatchPinVersionSelect, {
|
|
2879
|
+
workflowKey,
|
|
2880
|
+
value: pinVersion,
|
|
2881
|
+
onChange: onPinVersionChange
|
|
2882
|
+
})]
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2692
2885
|
async function startJob(type, selection, common, payload) {
|
|
2693
2886
|
const mutation = batchMutationOf(type);
|
|
2694
2887
|
if (mutation === "terminate") return startBatchTerminate({
|
|
@@ -2706,7 +2899,7 @@ async function startJob(type, selection, common, payload) {
|
|
|
2706
2899
|
payload
|
|
2707
2900
|
});
|
|
2708
2901
|
}
|
|
2709
|
-
function BatchOperationDialog({ type, input, selection, onClose, onStarted }) {
|
|
2902
|
+
function BatchOperationDialog({ type, input, selection, workflowKey = null, onClose, onStarted }) {
|
|
2710
2903
|
const tr = useTr();
|
|
2711
2904
|
const labels = useBatchOperationLabels();
|
|
2712
2905
|
const [reason, setReason] = useState("");
|
|
@@ -2714,6 +2907,10 @@ function BatchOperationDialog({ type, input, selection, onClose, onStarted }) {
|
|
|
2714
2907
|
const [signalName, setSignalName] = useState("");
|
|
2715
2908
|
const [signalPayload, setSignalPayload] = useState("");
|
|
2716
2909
|
const [pauseReason, setPauseReason] = useState("");
|
|
2910
|
+
const [activityScope, setActivityScope] = useState({ kind: "all" });
|
|
2911
|
+
const [activityOptions, setActivityOptions] = useState({ ...EMPTY_ACTIVITY_OPTIONS_FORM });
|
|
2912
|
+
const [overrideChoice, setOverrideChoice] = useState("autoUpgrade");
|
|
2913
|
+
const [pinVersion, setPinVersion] = useState("");
|
|
2717
2914
|
const [dryRun, setDryRun] = useState(null);
|
|
2718
2915
|
const [busy, setBusy] = useState(null);
|
|
2719
2916
|
const [error, setError] = useState(null);
|
|
@@ -2725,10 +2922,16 @@ function BatchOperationDialog({ type, input, selection, onClose, onStarted }) {
|
|
|
2725
2922
|
signalPayload: parsedPayload.ok ? jsonArg(parsedPayload.value) : null
|
|
2726
2923
|
};
|
|
2727
2924
|
if (type === "RESET") return { resetTo: { type: "LAST_TASK" } };
|
|
2728
|
-
if (
|
|
2925
|
+
if (type === "UPDATE_ACTIVITY_OPTIONS") return updateActivityOptionsPayload(activityScope, activityOptionsFrom(activityOptions));
|
|
2926
|
+
if (type === "UPDATE_RUN_OPTIONS") return updateRunOptionsPayload(overrideChoice, pinVersion);
|
|
2927
|
+
if (needsActivitySelector(type)) {
|
|
2928
|
+
const selector = batchActivitySelector(activityScope);
|
|
2929
|
+
return selector ? { selector } : null;
|
|
2930
|
+
}
|
|
2729
2931
|
return null;
|
|
2730
2932
|
};
|
|
2731
|
-
const
|
|
2933
|
+
const payloadComplete = !(needsActivitySelector(type) || type === "UPDATE_RUN_OPTIONS") || payload() !== null;
|
|
2934
|
+
const valid = reason.trim().length > 0 && Number.isFinite(Number(rate)) && payloadComplete && (type !== "SIGNAL" || signalName.trim().length > 0 && parsedPayload.ok) && (type !== "PAUSE_ACTIVITY" || pauseReason.trim().length > 0);
|
|
2732
2935
|
const jobReason = type === "PAUSE_ACTIVITY" && pauseReason.trim() ? pauseReason.trim() : reason.trim();
|
|
2733
2936
|
const run = async (asDryRun) => {
|
|
2734
2937
|
if (!valid) return;
|
|
@@ -2791,9 +2994,21 @@ function BatchOperationDialog({ type, input, selection, onClose, onStarted }) {
|
|
|
2791
2994
|
"data-testid": "batch-pause-reason"
|
|
2792
2995
|
})]
|
|
2793
2996
|
}),
|
|
2794
|
-
needsActivitySelector(type) && /* @__PURE__ */ jsx(
|
|
2795
|
-
|
|
2796
|
-
|
|
2997
|
+
needsActivitySelector(type) && /* @__PURE__ */ jsx(BatchActivityScopeFields, {
|
|
2998
|
+
value: activityScope,
|
|
2999
|
+
onChange: setActivityScope
|
|
3000
|
+
}),
|
|
3001
|
+
type === "UPDATE_ACTIVITY_OPTIONS" && /* @__PURE__ */ jsx(ActivityOptionsFields, {
|
|
3002
|
+
idPrefix: "batch-activity-option",
|
|
3003
|
+
value: activityOptions,
|
|
3004
|
+
onChange: setActivityOptions
|
|
3005
|
+
}),
|
|
3006
|
+
type === "UPDATE_RUN_OPTIONS" && /* @__PURE__ */ jsx(BatchRunOptionsFields, {
|
|
3007
|
+
choice: overrideChoice,
|
|
3008
|
+
onChoiceChange: setOverrideChoice,
|
|
3009
|
+
pinVersion,
|
|
3010
|
+
onPinVersionChange: setPinVersion,
|
|
3011
|
+
workflowKey
|
|
2797
3012
|
}),
|
|
2798
3013
|
/* @__PURE__ */ jsxs("div", {
|
|
2799
3014
|
className: "space-y-1.5",
|
|
@@ -3194,7 +3409,8 @@ function ExecutionsListPage() {
|
|
|
3194
3409
|
const batchOperations = useMemo(() => allowedBatchOperations({
|
|
3195
3410
|
runControl: phaseC.runControl,
|
|
3196
3411
|
runControlDurable: phaseC.runControlDurable,
|
|
3197
|
-
runArchival: phaseC.runArchival
|
|
3412
|
+
runArchival: phaseC.runArchival,
|
|
3413
|
+
durableParity: parityEnabled
|
|
3198
3414
|
}, {
|
|
3199
3415
|
canExecute: canExecuteRuns,
|
|
3200
3416
|
canDelete: canDeleteRuns
|
|
@@ -3202,6 +3418,7 @@ function ExecutionsListPage() {
|
|
|
3202
3418
|
phaseC.runControl,
|
|
3203
3419
|
phaseC.runControlDurable,
|
|
3204
3420
|
phaseC.runArchival,
|
|
3421
|
+
parityEnabled,
|
|
3205
3422
|
canExecuteRuns,
|
|
3206
3423
|
canDeleteRuns
|
|
3207
3424
|
]);
|
|
@@ -3716,6 +3933,10 @@ function ExecutionsListPage() {
|
|
|
3716
3933
|
runIds: selection.runIds,
|
|
3717
3934
|
allMatching
|
|
3718
3935
|
},
|
|
3936
|
+
workflowKey: batchWorkflowKey(input, {
|
|
3937
|
+
runIds: selection.runIds,
|
|
3938
|
+
allMatching
|
|
3939
|
+
}, executions),
|
|
3719
3940
|
onClose: () => setBatchType(null),
|
|
3720
3941
|
onStarted: (job) => {
|
|
3721
3942
|
setBatchType(null);
|
package/dist/executions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as ExecutionsListPage } from "./ExecutionsListPage-
|
|
3
|
-
import { t as ExecutionDetailPage } from "./ExecutionDetailPage-
|
|
2
|
+
import { t as ExecutionsListPage } from "./ExecutionsListPage-Ky3TAL9U.js";
|
|
3
|
+
import { t as ExecutionDetailPage } from "./ExecutionDetailPage-BbvY2bcb.js";
|
|
4
4
|
|
|
5
5
|
export { ExecutionDetailPage, ExecutionsListPage };
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ import { a as isDurableFunctionNodeType, i as filterPaletteNodes, n as RUN_CONTR
|
|
|
11
11
|
import { A as SetWorkflowRolloutDocument, B as ApproveWorkflowPromotionDocument, C as WorkflowGenerationTemplatesDocument, D as UpdateWorkflowEnvironmentPolicyDocument, E as WorkflowAuthoringDocument, F as PushWorkflowToGitDocument, H as AcquireWorkflowEditLeaseDocument, I as LinkWorkflowGitRepositoryDocument, L as DeployWorkflowVersionToDevDocument, M as RequestWorkflowPromotionDocument, N as ReleaseWorkflowEditLeaseDocument, O as UnlinkWorkflowGitRepositoryDocument, P as RejectWorkflowPromotionDocument, R as DeleteWorkflowRolloutDocument, S as WorkflowGitCommitsDocument, T as WorkflowEditLeaseDocument, V as ActivateWorkflowVersionCheckedDocument, _ as WorkflowProposalCodeDocument, b as WorkflowGitPushesDocument, c as RunsUsageMeter, g as WorkflowVersionDrainageDocument, h as WorkflowVersioningDocument, j as RestoreWorkflowFromGitDocument, k as TakeOverWorkflowEditLeaseDocument, l as RunsUsageMeterView, m as FluidGridsMark, o as BUILDER_FULLSCREEN_ATTRIBUTE, s as BUILDER_FULLSCREEN_EVENT, t as FlowBuilderPage, u as useRunsQuota, v as WorkflowPromotionRequestsDocument, w as WorkflowEnvironmentsDocument, x as WorkflowGitDiffDocument, y as WorkflowGitRepositoryDocument, z as CancelWorkflowPromotionDocument } from "./flow-builder-CIV6u8y-.js";
|
|
12
12
|
import { $ as UpdateCodecServerSettingsDocument, Ct as UpdateActivityOptionsDocument, Et as PauseActivityDocument, G as CodecServerSettingsDocument, H as WorkflowScheduleDescribeDocument, J as UnpauseWorkflowScheduleDocument, K as WorkflowSearchAttributesDocument, Q as UpdateArchiveSettingsDocument, St as CompleteActivityByIdDocument, Tt as UnpauseActivityDocument, U as WorkflowCodeBundleSdkDocument, W as ArchiveSettingsDocument, X as BackfillWorkflowScheduleDocument, Y as PauseWorkflowScheduleDocument, Z as TriggerWorkflowScheduleDocument, _t as CancelBatchOperationDocument, at as WorkflowRunUpdateDocument, bt as StartBatchOperationDocument, ct as WorkflowBatchOperationsDocument, dt as UpsertWorkflowRunSearchAttributesDocument, et as DeleteWorkflowSearchAttributeDocument, ft as UpdateWorkflowRunDocument, gt as ResetWorkflowRunDocument, ht as ResetWorkflowRunToLastCleanTaskDocument, it as WorkflowSignalTokensDocument, lt as RunControlFieldsDocument, mt as CreateWorkflowSignalTokenDocument, nt as DeleteActivityPauseRuleDocument, ot as WorkflowRunHistoryArchiveDocument, pt as RevokeWorkflowSignalTokenDocument, q as WorkflowActivityPauseRulesDocument, rt as CreateActivityPauseRuleDocument, st as WorkflowBatchOperationDocument, tt as CreateWorkflowSearchAttributeDocument, ut as QueryWorkflowRunDocument, vt as StartBatchExportDocument, wt as ResetActivityDocument, xt as FailActivityByIdDocument, yt as StartBatchTerminateDocument } from "./api-CEnNq15C.js";
|
|
13
13
|
import { a as PauseExecutionDocument, i as ResumeExecutionDocument, n as TerminateExecutionDocument, o as CancelExecutionDocument, r as RetryNodeDocument, t as ExecutionStatsDocument } from "./ExecutionStatsDocument-6ixNZnBV.js";
|
|
14
|
-
import { _ as
|
|
14
|
+
import { _ as WorkflowRunsCountDocument, b as DurableParityRunFieldsDocument, v as WorkflowRunPendingDocument, x as SetWorkflowRunVersioningOverrideDocument, y as WorkflowRunMetadataDocument } from "./useDurableParity-gigqyXDq.js";
|
|
15
15
|
import { c as RunEventAppendedDocument, d as WorkflowRunDeterminismStatusDocument, f as DurableRunFieldsDocument, l as WorkflowRunStackTraceDocument, m as SignalWorkflowRunDocument, p as TerminateWorkflowRunDocument, u as WorkflowRunHistoryDocument } from "./useRunHistory-Be-GggNA.js";
|
|
16
16
|
import { a as getGraphQLEndpoint, c as setFluidGridsConfig, d as applyFluidGridsTheme, f as sanitizeThemeValue, m as themeToCssVariables, o as resetFluidGridsConfig, p as themeKey, r as getFluidGridsConfig, s as resetFluidGridsExecutionState, t as config, u as FLUIDGRIDS_THEME_TOKEN_MAP } from "./config-X97zrIvn.js";
|
|
17
|
-
import { r as WorkflowBatchOperationUpdatedDocument, t as ExecutionsListPage } from "./ExecutionsListPage-
|
|
18
|
-
import { a as AgentStepUpdatedDocument, c as AgentTraceDocument, i as ExplainRunDocument, o as WorkflowRunHierarchyDocument, r as RunHumanRequests, s as RunAiUsageDocument, t as ExecutionDetailPage } from "./ExecutionDetailPage-
|
|
17
|
+
import { r as WorkflowBatchOperationUpdatedDocument, t as ExecutionsListPage } from "./ExecutionsListPage-Ky3TAL9U.js";
|
|
18
|
+
import { a as AgentStepUpdatedDocument, c as AgentTraceDocument, i as ExplainRunDocument, o as WorkflowRunHierarchyDocument, r as RunHumanRequests, s as RunAiUsageDocument, t as ExecutionDetailPage } from "./ExecutionDetailPage-BbvY2bcb.js";
|
|
19
19
|
import { i as FileDownloadUrlDocument, n as WorkflowCodeSourceDocument, r as BuildWorkflowCodeDocument, t as WorkflowEditLeaseStatusDocument } from "./WorkflowEditLeaseStatusDocument-Dp62med3.js";
|
|
20
20
|
import { c as RunLogAppendedDocument, l as RunLogsDocument } from "./agent-form-D0uLvzx4.js";
|
|
21
21
|
import { C as CreateWorkflowTestCaseFromRunDocument, D as AgentTokenDeltaDocument, E as CreateWorkflowTestCaseDocument, S as RunWorkflowTestsDocument, T as UpdateWorkflowTestCaseDocument, b as WorkflowTestRunDocument, w as DeleteWorkflowTestCaseDocument, x as WorkflowTestCasesDocument, y as WorkflowTestRunsDocument } from "./use-workflow-tests-Dkij09vJ.js";
|
|
@@ -5253,8 +5253,8 @@ const FluidgridsAvailableTagFieldsFragmentDoc = {
|
|
|
5253
5253
|
// src/components/FluidGridsRoot.tsx
|
|
5254
5254
|
const WorkflowsList$1 = lazy(() => import("./WorkflowsList-4VADoiz_.js").then((n) => n.n).then((m) => ({ default: m.WorkflowsList })));
|
|
5255
5255
|
const WorkflowBuilder$2 = lazy(() => import("./WorkflowBuilder-DkzzbrNn.js").then((n) => n.n).then((m) => ({ default: m.WorkflowBuilder })));
|
|
5256
|
-
const ExecutionsListPage$1 = lazy(() => import("./ExecutionsListPage-
|
|
5257
|
-
const ExecutionDetailPage$1 = lazy(() => import("./ExecutionDetailPage-
|
|
5256
|
+
const ExecutionsListPage$1 = lazy(() => import("./ExecutionsListPage-Ky3TAL9U.js").then((n) => n.n).then((m) => ({ default: m.ExecutionsListPage })));
|
|
5257
|
+
const ExecutionDetailPage$1 = lazy(() => import("./ExecutionDetailPage-BbvY2bcb.js").then((n) => n.n).then((m) => ({ default: m.ExecutionDetailPage })));
|
|
5258
5258
|
const PageLoader = () => /* @__PURE__ */ jsx("div", {
|
|
5259
5259
|
className: "flex items-center justify-center h-64",
|
|
5260
5260
|
children: /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" })
|
|
@@ -7,7 +7,7 @@ import { n as useNavigationV2 } from "./useNavigationV2-C2WeqN7d.js";
|
|
|
7
7
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
8
|
import { Icon } from "@iconify/react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, Input, Label } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
|
|
12
12
|
// src/generated/documents/wspace/SetWorkflowRunVersioningOverrideDocument.ts
|
|
13
13
|
const SetWorkflowRunVersioningOverrideDocument = {
|
|
@@ -1878,6 +1878,91 @@ function ConfirmStopRunDialog({ open, workflowName, count = 1, busy, onConfirm,
|
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
1880
|
|
|
1881
|
+
// src/modules/run-control/utils/activity-options.ts
|
|
1882
|
+
const EMPTY_ACTIVITY_OPTIONS_FORM = Object.freeze({
|
|
1883
|
+
maxRetries: "",
|
|
1884
|
+
retryDelaySeconds: "",
|
|
1885
|
+
startToCloseSeconds: "",
|
|
1886
|
+
scheduleToCloseSeconds: "",
|
|
1887
|
+
heartbeatSeconds: ""
|
|
1888
|
+
});
|
|
1889
|
+
/** Milliseconds from a seconds field ("" leaves the option unchanged). */
|
|
1890
|
+
function optionalMs(text) {
|
|
1891
|
+
const value = text.trim();
|
|
1892
|
+
if (!value) return void 0;
|
|
1893
|
+
const seconds = Number(value);
|
|
1894
|
+
return Number.isFinite(seconds) && seconds > 0 ? Math.round(seconds * 1e3) : null;
|
|
1895
|
+
}
|
|
1896
|
+
function optionalInt(text) {
|
|
1897
|
+
const value = text.trim();
|
|
1898
|
+
if (!value) return void 0;
|
|
1899
|
+
return /^\d+$/.test(value) ? Number(value) : null;
|
|
1900
|
+
}
|
|
1901
|
+
/** The options input from the form; null when a field does not parse or all are empty. */
|
|
1902
|
+
function activityOptionsFrom(form) {
|
|
1903
|
+
const maxRetries = optionalInt(form.maxRetries);
|
|
1904
|
+
const retryDelay = optionalMs(form.retryDelaySeconds);
|
|
1905
|
+
const startToClose = optionalMs(form.startToCloseSeconds);
|
|
1906
|
+
const scheduleToClose = optionalMs(form.scheduleToCloseSeconds);
|
|
1907
|
+
const heartbeat = optionalMs(form.heartbeatSeconds);
|
|
1908
|
+
if ([
|
|
1909
|
+
maxRetries,
|
|
1910
|
+
retryDelay,
|
|
1911
|
+
startToClose,
|
|
1912
|
+
scheduleToClose,
|
|
1913
|
+
heartbeat
|
|
1914
|
+
].includes(null)) return null;
|
|
1915
|
+
const options = {};
|
|
1916
|
+
const retry = {};
|
|
1917
|
+
if (maxRetries !== void 0) retry.maxRetries = maxRetries;
|
|
1918
|
+
if (retryDelay !== void 0) retry.retryDelay = retryDelay;
|
|
1919
|
+
if (Object.keys(retry).length > 0) options.retry = retry;
|
|
1920
|
+
if (startToClose !== void 0) options.startToCloseTimeoutMs = startToClose;
|
|
1921
|
+
if (scheduleToClose !== void 0) options.scheduleToCloseTimeoutMs = scheduleToClose;
|
|
1922
|
+
if (heartbeat !== void 0) options.heartbeatTimeoutMs = heartbeat;
|
|
1923
|
+
return Object.keys(options).length > 0 ? options : null;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
// src/modules/run-control/components/ActivityOptionsFields.tsx
|
|
1927
|
+
/**
|
|
1928
|
+
* The activity options fields (spec code-first 11 §2.28): retry count, first
|
|
1929
|
+
* retry delay and the three timeouts, in seconds. Shared by the run page's
|
|
1930
|
+
* "Change options" dialog and the Runs list's UPDATE_ACTIVITY_OPTIONS batch
|
|
1931
|
+
* job (§2.19). Each input's id and test id is `${idPrefix}-${field}`.
|
|
1932
|
+
*/
|
|
1933
|
+
function ActivityOptionsFields({ idPrefix, value, onChange }) {
|
|
1934
|
+
const tr = useTr();
|
|
1935
|
+
const fields = [
|
|
1936
|
+
["maxRetries", tr("fluidgrids.runControl.activities.maxRetries", "Max retries")],
|
|
1937
|
+
["retryDelaySeconds", tr("fluidgrids.runControl.activities.retryDelay", "First retry delay (s)")],
|
|
1938
|
+
["startToCloseSeconds", tr("fluidgrids.runControl.activities.startToClose", "Start-to-close timeout (s)")],
|
|
1939
|
+
["scheduleToCloseSeconds", tr("fluidgrids.runControl.activities.scheduleToClose", "Schedule-to-close timeout (s)")],
|
|
1940
|
+
["heartbeatSeconds", tr("fluidgrids.runControl.activities.heartbeat", "Heartbeat timeout (s)")]
|
|
1941
|
+
];
|
|
1942
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1943
|
+
className: "grid gap-3 sm:grid-cols-2",
|
|
1944
|
+
children: [fields.map(([field, label]) => /* @__PURE__ */ jsxs("div", {
|
|
1945
|
+
className: "space-y-1.5",
|
|
1946
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
1947
|
+
htmlFor: `${idPrefix}-${field}`,
|
|
1948
|
+
children: label
|
|
1949
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
1950
|
+
id: `${idPrefix}-${field}`,
|
|
1951
|
+
inputMode: "decimal",
|
|
1952
|
+
value: value[field],
|
|
1953
|
+
onChange: (event) => onChange({
|
|
1954
|
+
...value,
|
|
1955
|
+
[field]: event.target.value
|
|
1956
|
+
}),
|
|
1957
|
+
"data-testid": `${idPrefix}-${field}`
|
|
1958
|
+
})]
|
|
1959
|
+
}, field)), /* @__PURE__ */ jsx("p", {
|
|
1960
|
+
className: "text-xs text-text-secondary sm:col-span-2",
|
|
1961
|
+
children: tr("fluidgrids.runControl.activities.optionsHint", "Empty fields stay as they are. The change applies from the next attempt.")
|
|
1962
|
+
})]
|
|
1963
|
+
});
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1881
1966
|
// src/modules/executions/hooks/useDurableParity.ts
|
|
1882
1967
|
/**
|
|
1883
1968
|
* Durable-function parity reads and writes of the run page and the Runs list
|
|
@@ -2085,4 +2170,4 @@ function useRunStatusCounts(input, enabled) {
|
|
|
2085
2170
|
};
|
|
2086
2171
|
}
|
|
2087
2172
|
|
|
2088
|
-
export {
|
|
2173
|
+
export { WorkflowRunsCountDocument as _, useRunStatusCounts as a, DurableParityRunFieldsDocument as b, activityOptionsFrom as c, errorAdvice as d, needsReconnect as f, RUN_STATUS_CONFIG as g, runStatusLabels as h, useRunPending as i, ConfirmStopRunDialog as l, NodeStatusBadge as m, useDurableParityRunFields as n, ActivityOptionsFields as o, ExecutionStatusBadge as p, useRunMetadata as r, EMPTY_ACTIVITY_OPTIONS_FORM as s, setRunVersioningOverride as t, ADVICE_ERROR_TYPES as u, WorkflowRunPendingDocument as v, SetWorkflowRunVersioningOverrideDocument as x, WorkflowRunMetadataDocument as y };
|
package/dist/workflow-pages.js
CHANGED
|
@@ -59,8 +59,8 @@ const pages = createWorkflowPages({
|
|
|
59
59
|
WorkflowSearchRedirect: () => import("./WorkflowSearchRedirect-0MLrCjDn.js").then((n) => n.n),
|
|
60
60
|
TemplatePreview: () => import("./TemplatePreview-DwdGa8bH.js").then((n) => n.n),
|
|
61
61
|
AiStudioPage: () => import("./AiStudioPage-C2SBRqab.js").then((n) => n.n),
|
|
62
|
-
ExecutionsListPage: () => import("./ExecutionsListPage-
|
|
63
|
-
ExecutionDetailPage: () => import("./ExecutionDetailPage-
|
|
62
|
+
ExecutionsListPage: () => import("./ExecutionsListPage-Ky3TAL9U.js").then((n) => n.n),
|
|
63
|
+
ExecutionDetailPage: () => import("./ExecutionDetailPage-BbvY2bcb.js").then((n) => n.n),
|
|
64
64
|
HistoryPage: () => import("./HistoryPage-D4rkw4zu.js").then((n) => n.n),
|
|
65
65
|
TemplatesPage: () => import("./TemplatesPage-DF5PK7CB.js").then((n) => n.n),
|
|
66
66
|
NodesPage: () => import("./NodesPage-C3sh0aL9.js").then((n) => n.n),
|