@burdenoff/fluidgrids-fe-sdk 2026.1029.6 → 2026.1029.8
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-H6R3ZIXN.js +22 -0
- package/dist/{WorkflowsList-VA2HRYFG.js → ExecutionsListPage-TLD2E442.js} +9 -9
- package/dist/{WorkflowBuilder-PORH3H6P.js → WorkflowBuilder-XVHY7XWJ.js} +12 -12
- package/dist/{ExecutionsListPage-SCPWUXUL.js → WorkflowsList-3GXXXURR.js} +9 -8
- package/dist/{chunk-MNY2UNQH.js → chunk-2NG5VZWI.js} +1 -1
- package/dist/{chunk-CY6KX4RG.js → chunk-6AMNEX2Y.js} +6 -1
- package/dist/{chunk-LPGQTSI2.js → chunk-6CKDGT2N.js} +3 -3
- package/dist/{chunk-U6KI4AKI.js → chunk-6TMLIQHB.js} +199 -1
- package/dist/{chunk-LTVAUZ3M.js → chunk-G3KZOX52.js} +3 -3
- package/dist/{chunk-7PP6CRXS.js → chunk-GQTEHWWY.js} +26 -8
- package/dist/{chunk-LB62TAF7.js → chunk-H4AZBUWM.js} +1 -1
- package/dist/{chunk-57RS7DXZ.js → chunk-HWEKWYXQ.js} +117 -8
- package/dist/{chunk-7B2GRTUL.js → chunk-LJGC7RAL.js} +164 -101
- package/dist/{chunk-4TGUNOQQ.js → chunk-NAYPOEYM.js} +391 -112
- package/dist/{chunk-BWAUFSHC.js → chunk-NNPXN4DI.js} +5 -5
- package/dist/{chunk-QZM6EDGK.js → chunk-NUBPALBK.js} +1 -1
- package/dist/{chunk-YSUSSIWU.js → chunk-R7VHURPQ.js} +1 -1
- package/dist/{chunk-7SSZUX6E.js → chunk-S4JYBJ4X.js} +2 -2
- package/dist/{chunk-WTGBHE3J.js → chunk-T22LICGX.js} +118 -96
- package/dist/{chunk-63ZMEHZ4.js → chunk-TJ6RUV4R.js} +937 -26
- package/dist/{chunk-H364USFF.js → chunk-UIDJT3YK.js} +1 -1
- package/dist/{chunk-4XAPSIHY.js → chunk-UWNCFMHV.js} +183 -26
- package/dist/{chunk-MDPBO52Q.js → chunk-V5PA5KGV.js} +2 -2
- package/dist/{chunk-MQI7NH4Z.js → chunk-VEZ7G2FE.js} +145 -8
- package/dist/{chunk-YHTRCQ5M.js → chunk-WEXO3KAY.js} +4 -4
- package/dist/{chunk-7LFAWWVF.js → chunk-WTP343PG.js} +2 -2
- package/dist/{chunk-Z6EWB5ZG.js → chunk-X2J4ZXKD.js} +1492 -98
- package/dist/{chunk-6XZCYLAQ.js → chunk-XJBCRDWZ.js} +3 -3
- package/dist/{chunk-AVMI3XLM.js → chunk-XMKYZP6Q.js} +282 -18
- package/dist/{chunk-5GD6OXYW.js → chunk-Z6I6A47T.js} +1 -1
- package/dist/{config-T7BQ7AO2.js → config-VM7FTHMZ.js} +1 -1
- package/dist/executions.js +13 -13
- package/dist/history.js +5 -5
- package/dist/index.d.ts +2588 -26
- package/dist/index.js +36 -36
- package/dist/nodes.js +2 -2
- package/dist/observability.js +7 -7
- package/dist/settings.js +7 -7
- package/dist/templates.js +11 -11
- package/dist/{workflow-builder-CZFczcE7.d.ts → workflow-builder-BMGVSwpy.d.ts} +7 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +13 -13
- package/dist/workflows-list.js +9 -9
- package/package.json +1 -1
- package/dist/ExecutionDetailPage-M6JAWY4Q.js +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { throwIfResultError, describeOperationError } from './chunk-
|
|
1
|
+
import { throwIfResultError, describeOperationError } from './chunk-NAYPOEYM.js';
|
|
2
2
|
import { useTr } from './chunk-UULVIT25.js';
|
|
3
3
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
4
4
|
import { useState, useCallback, useEffect, useMemo } from 'react';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { validateDateRange } from './chunk-
|
|
2
|
-
import { useAvailableTags } from './chunk-
|
|
1
|
+
import { validateDateRange, statusCountFilter, STATUS_COUNT_GROUP_BY, statusCountsOf } from './chunk-HWEKWYXQ.js';
|
|
2
|
+
import { useAvailableTags } from './chunk-Z6I6A47T.js';
|
|
3
3
|
import { executionsControls } from './chunk-D3UWK7GY.js';
|
|
4
4
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useDurableParityEnabled, throwIfResultError, describeOperationError } from './chunk-NAYPOEYM.js';
|
|
6
|
+
import { useExecutionsStore } from './chunk-6AMNEX2Y.js';
|
|
7
|
+
import { SetWorkflowRunVersioningOverrideDocument, WorkflowRunsCountDocument, DurableParityRunFieldsDocument, WorkflowRunPendingDocument, WorkflowRunMetadataDocument } from './chunk-GQTEHWWY.js';
|
|
6
8
|
import { useTr } from './chunk-UULVIT25.js';
|
|
9
|
+
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
7
10
|
import { Icon } from '@iconify/react';
|
|
8
11
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
12
|
import { useMemo, useState, useCallback, useRef, useEffect } from 'react';
|
|
@@ -135,16 +138,10 @@ var NODE_STATUS_CONFIG = {
|
|
|
135
138
|
icon: "mdi:subdirectory-arrow-right"
|
|
136
139
|
}
|
|
137
140
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
showLabel = true,
|
|
143
|
-
animated = true
|
|
144
|
-
}) {
|
|
145
|
-
const tr = useTr();
|
|
146
|
-
const config = RUN_STATUS_CONFIG[status] ?? RUN_STATUS_CONFIG.PENDING;
|
|
147
|
-
const labels = {
|
|
141
|
+
|
|
142
|
+
// src/modules/executions/utils/run-status-labels.ts
|
|
143
|
+
function runStatusLabels(tr) {
|
|
144
|
+
return {
|
|
148
145
|
PENDING: tr(
|
|
149
146
|
"fluidgrids.executions.executionFilters.statusPending",
|
|
150
147
|
"Pending"
|
|
@@ -171,6 +168,17 @@ function ExecutionStatusBadge({
|
|
|
171
168
|
"Terminated"
|
|
172
169
|
)
|
|
173
170
|
};
|
|
171
|
+
}
|
|
172
|
+
function ExecutionStatusBadge({
|
|
173
|
+
status,
|
|
174
|
+
size = "md",
|
|
175
|
+
showIcon = true,
|
|
176
|
+
showLabel = true,
|
|
177
|
+
animated = true
|
|
178
|
+
}) {
|
|
179
|
+
const tr = useTr();
|
|
180
|
+
const config = RUN_STATUS_CONFIG[status] ?? RUN_STATUS_CONFIG.PENDING;
|
|
181
|
+
const labels = runStatusLabels(tr);
|
|
174
182
|
const sizeClasses = {
|
|
175
183
|
sm: "px-1.5 py-0.5 text-xs gap-1",
|
|
176
184
|
md: "px-2 py-1 text-sm gap-1.5",
|
|
@@ -249,6 +257,23 @@ function NodeStatusBadge({
|
|
|
249
257
|
}
|
|
250
258
|
);
|
|
251
259
|
}
|
|
260
|
+
|
|
261
|
+
// src/modules/executions/utils/active-filters.ts
|
|
262
|
+
function countActiveFilters(filter, parityEnabled) {
|
|
263
|
+
return [
|
|
264
|
+
filter.status !== "all",
|
|
265
|
+
filter.workflowKey !== "",
|
|
266
|
+
filter.dateRange.preset !== "all",
|
|
267
|
+
filter.search !== "",
|
|
268
|
+
filter.triggerType !== "all",
|
|
269
|
+
filter.durationMinSeconds !== null,
|
|
270
|
+
filter.durationMaxSeconds !== null,
|
|
271
|
+
filter.errorType !== "all",
|
|
272
|
+
filter.nodeId !== "",
|
|
273
|
+
filter.tagId !== "",
|
|
274
|
+
parityEnabled && filter.workflowId.trim() !== ""
|
|
275
|
+
].filter(Boolean).length;
|
|
276
|
+
}
|
|
252
277
|
function TagFilterSelect({
|
|
253
278
|
value,
|
|
254
279
|
onChange,
|
|
@@ -504,18 +529,8 @@ function ExecutionFilters({
|
|
|
504
529
|
},
|
|
505
530
|
[setDateRange]
|
|
506
531
|
);
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
filter.workflowKey !== "",
|
|
510
|
-
filter.dateRange.preset !== "all",
|
|
511
|
-
filter.search !== "",
|
|
512
|
-
filter.triggerType !== "all",
|
|
513
|
-
filter.durationMinSeconds !== null,
|
|
514
|
-
filter.durationMaxSeconds !== null,
|
|
515
|
-
filter.errorType !== "all",
|
|
516
|
-
filter.nodeId !== "",
|
|
517
|
-
filter.tagId !== ""
|
|
518
|
-
].filter(Boolean).length;
|
|
532
|
+
const parityEnabled = useDurableParityEnabled();
|
|
533
|
+
const activeFiltersCount = countActiveFilters(filter, parityEnabled);
|
|
519
534
|
const assistantControls = useMemo(
|
|
520
535
|
() => executionsControls({
|
|
521
536
|
page: tr("fluidgrids.executions.executionsList.title", "Executions"),
|
|
@@ -2721,5 +2736,147 @@ function Pagination({
|
|
|
2721
2736
|
] })
|
|
2722
2737
|
] });
|
|
2723
2738
|
}
|
|
2739
|
+
var RUN_PENDING_POLL_INTERVAL_MS = 5e3;
|
|
2740
|
+
async function fetchDurableParityRunFields(runId) {
|
|
2741
|
+
const result = await getFluidGridsClient().query({
|
|
2742
|
+
query: DurableParityRunFieldsDocument,
|
|
2743
|
+
variables: { id: runId },
|
|
2744
|
+
fetchPolicy: "network-only"
|
|
2745
|
+
});
|
|
2746
|
+
throwIfResultError(result);
|
|
2747
|
+
return result.data?.workflowRun ?? null;
|
|
2748
|
+
}
|
|
2749
|
+
async function fetchRunPending(runId) {
|
|
2750
|
+
const result = await getFluidGridsClient().query({
|
|
2751
|
+
query: WorkflowRunPendingDocument,
|
|
2752
|
+
variables: { id: runId },
|
|
2753
|
+
fetchPolicy: "network-only"
|
|
2754
|
+
});
|
|
2755
|
+
throwIfResultError(result);
|
|
2756
|
+
return result.data?.workflowRun?.pending ?? null;
|
|
2757
|
+
}
|
|
2758
|
+
async function fetchRunMetadata(runId) {
|
|
2759
|
+
const result = await getFluidGridsClient().query({
|
|
2760
|
+
query: WorkflowRunMetadataDocument,
|
|
2761
|
+
variables: { runId },
|
|
2762
|
+
fetchPolicy: "network-only"
|
|
2763
|
+
});
|
|
2764
|
+
throwIfResultError(result);
|
|
2765
|
+
return result.data?.workflowRunStackTrace ?? null;
|
|
2766
|
+
}
|
|
2767
|
+
async function fetchRunStatusCounts(input) {
|
|
2768
|
+
const filter = statusCountFilter(input);
|
|
2769
|
+
const result = await getFluidGridsClient().query({
|
|
2770
|
+
query: WorkflowRunsCountDocument,
|
|
2771
|
+
variables: { filter, groupBy: [...STATUS_COUNT_GROUP_BY] },
|
|
2772
|
+
fetchPolicy: "network-only"
|
|
2773
|
+
});
|
|
2774
|
+
throwIfResultError(result);
|
|
2775
|
+
const count = result.data?.workflowRunsCount;
|
|
2776
|
+
if (!count) throw new Error("The run count returned no result");
|
|
2777
|
+
return { total: count.total, counts: statusCountsOf(count.groups) };
|
|
2778
|
+
}
|
|
2779
|
+
async function setRunVersioningOverride(input) {
|
|
2780
|
+
const reason = input.reason?.trim();
|
|
2781
|
+
const result = await getFluidGridsClient().mutate({
|
|
2782
|
+
mutation: SetWorkflowRunVersioningOverrideDocument,
|
|
2783
|
+
variables: {
|
|
2784
|
+
runId: input.runId,
|
|
2785
|
+
override: input.override,
|
|
2786
|
+
reason: reason || null
|
|
2787
|
+
}
|
|
2788
|
+
});
|
|
2789
|
+
throwIfResultError(result);
|
|
2790
|
+
const data = result.data?.setWorkflowRunVersioningOverride;
|
|
2791
|
+
if (!data) throw new Error("The override returned no result");
|
|
2792
|
+
return data.versioning ?? null;
|
|
2793
|
+
}
|
|
2794
|
+
function useRunRead(runId, enabled, load, { live = false, intervalMs = 0 }) {
|
|
2795
|
+
const [data, setData] = useState(null);
|
|
2796
|
+
const [loading, setLoading] = useState(false);
|
|
2797
|
+
const [error, setError] = useState(null);
|
|
2798
|
+
const request = useRef(0);
|
|
2799
|
+
const refetch = useCallback(async () => {
|
|
2800
|
+
if (!runId || !enabled) return;
|
|
2801
|
+
const id = ++request.current;
|
|
2802
|
+
setLoading(true);
|
|
2803
|
+
try {
|
|
2804
|
+
const next = await load(runId);
|
|
2805
|
+
if (id !== request.current) return;
|
|
2806
|
+
setData(next);
|
|
2807
|
+
setError(null);
|
|
2808
|
+
} catch (err) {
|
|
2809
|
+
if (id !== request.current) return;
|
|
2810
|
+
setError(describeOperationError(err));
|
|
2811
|
+
} finally {
|
|
2812
|
+
if (id === request.current) setLoading(false);
|
|
2813
|
+
}
|
|
2814
|
+
}, [runId, enabled, load]);
|
|
2815
|
+
useEffect(() => {
|
|
2816
|
+
request.current += 1;
|
|
2817
|
+
setData(null);
|
|
2818
|
+
setError(null);
|
|
2819
|
+
setLoading(false);
|
|
2820
|
+
void refetch();
|
|
2821
|
+
}, [refetch]);
|
|
2822
|
+
useEffect(() => {
|
|
2823
|
+
if (!live || !enabled || !runId || intervalMs <= 0) return;
|
|
2824
|
+
const timer = setInterval(() => {
|
|
2825
|
+
void refetch();
|
|
2826
|
+
}, intervalMs);
|
|
2827
|
+
return () => clearInterval(timer);
|
|
2828
|
+
}, [live, enabled, runId, intervalMs, refetch]);
|
|
2829
|
+
return { data: enabled ? data : null, loading, error, refetch };
|
|
2830
|
+
}
|
|
2831
|
+
function useDurableParityRunFields(runId, enabled) {
|
|
2832
|
+
const { data, error, refetch } = useRunRead(
|
|
2833
|
+
runId,
|
|
2834
|
+
enabled,
|
|
2835
|
+
fetchDurableParityRunFields,
|
|
2836
|
+
{}
|
|
2837
|
+
);
|
|
2838
|
+
return { fields: data, error, refetch };
|
|
2839
|
+
}
|
|
2840
|
+
function useRunPending(runId, { enabled, live }) {
|
|
2841
|
+
const { data, loading, error, refetch } = useRunRead(
|
|
2842
|
+
runId,
|
|
2843
|
+
enabled,
|
|
2844
|
+
fetchRunPending,
|
|
2845
|
+
{ live, intervalMs: RUN_PENDING_POLL_INTERVAL_MS }
|
|
2846
|
+
);
|
|
2847
|
+
return { pending: data, loading, error, refetch };
|
|
2848
|
+
}
|
|
2849
|
+
function useRunMetadata(runId, enabled) {
|
|
2850
|
+
const { data, loading, error, refetch } = useRunRead(
|
|
2851
|
+
runId,
|
|
2852
|
+
enabled,
|
|
2853
|
+
fetchRunMetadata,
|
|
2854
|
+
{}
|
|
2855
|
+
);
|
|
2856
|
+
return { answer: data, loading, error, refetch };
|
|
2857
|
+
}
|
|
2858
|
+
function useRunStatusCounts(input, enabled) {
|
|
2859
|
+
const [state, setState] = useState({ total: null, counts: [] });
|
|
2860
|
+
const [error, setError] = useState(null);
|
|
2861
|
+
const request = useRef(0);
|
|
2862
|
+
const filterKey = JSON.stringify(statusCountFilter(input));
|
|
2863
|
+
const refetch = useCallback(async () => {
|
|
2864
|
+
if (!enabled) return;
|
|
2865
|
+
const id = ++request.current;
|
|
2866
|
+
try {
|
|
2867
|
+
const next = await fetchRunStatusCounts(JSON.parse(filterKey));
|
|
2868
|
+
if (id !== request.current) return;
|
|
2869
|
+
setState(next);
|
|
2870
|
+
setError(null);
|
|
2871
|
+
} catch (err) {
|
|
2872
|
+
if (id !== request.current) return;
|
|
2873
|
+
setError(describeOperationError(err));
|
|
2874
|
+
}
|
|
2875
|
+
}, [enabled, filterKey]);
|
|
2876
|
+
useEffect(() => {
|
|
2877
|
+
void refetch();
|
|
2878
|
+
}, [refetch]);
|
|
2879
|
+
return enabled ? { ...state, error, refetch } : { total: null, counts: [], error: null, refetch };
|
|
2880
|
+
}
|
|
2724
2881
|
|
|
2725
|
-
export { ExecutionCards, ExecutionFilters, ExecutionStats, ExecutionStatusBadge, ExecutionTable, ExecutionTimeline, NodeTimeline, Pagination, RunLogViewer, TagFilterSelect, buildNodeDisplayMap, formatRunVersion };
|
|
2882
|
+
export { ExecutionCards, ExecutionFilters, ExecutionStats, ExecutionStatusBadge, ExecutionTable, ExecutionTimeline, NodeTimeline, Pagination, RunLogViewer, TagFilterSelect, buildNodeDisplayMap, formatRunVersion, runStatusLabels, setRunVersioningOverride, useDurableParityRunFields, useRunMetadata, useRunPending, useRunStatusCounts };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { throwIfResultError } from './chunk-
|
|
2
|
-
import { RunFailureClustersDocument, DismissRunFailureClusterDocument, RunFailureTriageSettingsDocument, SetRunFailureTriageEnabledDocument, FgTriageFailedRunsDocument } from './chunk-
|
|
1
|
+
import { throwIfResultError } from './chunk-NAYPOEYM.js';
|
|
2
|
+
import { RunFailureClustersDocument, DismissRunFailureClusterDocument, RunFailureTriageSettingsDocument, SetRunFailureTriageEnabledDocument, FgTriageFailedRunsDocument } from './chunk-GQTEHWWY.js';
|
|
3
3
|
import { useTr } from './chunk-UULVIT25.js';
|
|
4
4
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
5
5
|
import { useState, useCallback, useEffect } from 'react';
|
|
@@ -1,16 +1,135 @@
|
|
|
1
|
-
import { ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination } from './chunk-
|
|
2
|
-
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh } from './chunk-
|
|
3
|
-
import { useWorkflowDefinitions } from './chunk-
|
|
1
|
+
import { useRunStatusCounts, ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination, runStatusLabels } from './chunk-UWNCFMHV.js';
|
|
2
|
+
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh, WORKFLOW_ID_MAX_LENGTH } from './chunk-HWEKWYXQ.js';
|
|
3
|
+
import { useWorkflowDefinitions } from './chunk-G3KZOX52.js';
|
|
4
4
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useDurableParityEnabled } from './chunk-NAYPOEYM.js';
|
|
6
|
+
import { useExecutionsStore } from './chunk-6AMNEX2Y.js';
|
|
6
7
|
import { useTr } from './chunk-UULVIT25.js';
|
|
7
|
-
import { useRef, useCallback, useMemo } from 'react';
|
|
8
|
+
import { useRef, useCallback, useMemo, useState, useEffect } from 'react';
|
|
8
9
|
import { useNavigate, useSearchParams } from 'react-router';
|
|
9
10
|
import { Icon } from '@iconify/react';
|
|
10
11
|
import { toast } from 'sonner';
|
|
11
12
|
import { Button } from '@burdenoff/fe-libs/button';
|
|
12
|
-
import {
|
|
13
|
+
import { Input } from '@burdenoff/fe-libs/ui';
|
|
14
|
+
import { cn } from '@burdenoff/fe-libs/utils';
|
|
15
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
13
16
|
|
|
17
|
+
var WORKFLOW_ID_FILTER_DEBOUNCE_MS = 350;
|
|
18
|
+
var RUN_STATUSES = [
|
|
19
|
+
"PENDING",
|
|
20
|
+
"RUNNING",
|
|
21
|
+
"WAITING",
|
|
22
|
+
"COMPLETED",
|
|
23
|
+
"FAILED",
|
|
24
|
+
"CANCELLED",
|
|
25
|
+
"TERMINATED"
|
|
26
|
+
];
|
|
27
|
+
function isRunStatus(value) {
|
|
28
|
+
return RUN_STATUSES.includes(value);
|
|
29
|
+
}
|
|
30
|
+
function RunsParityBar({
|
|
31
|
+
workflowId,
|
|
32
|
+
onWorkflowIdChange,
|
|
33
|
+
total,
|
|
34
|
+
counts,
|
|
35
|
+
countsError,
|
|
36
|
+
selectedStatus,
|
|
37
|
+
onSelectStatus
|
|
38
|
+
}) {
|
|
39
|
+
const tr = useTr();
|
|
40
|
+
const statusLabels = runStatusLabels(tr);
|
|
41
|
+
const [draft, setDraft] = useState(workflowId);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
setDraft(workflowId);
|
|
44
|
+
}, [workflowId]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (draft === workflowId) return;
|
|
47
|
+
const timer = setTimeout(
|
|
48
|
+
() => onWorkflowIdChange(draft),
|
|
49
|
+
WORKFLOW_ID_FILTER_DEBOUNCE_MS
|
|
50
|
+
);
|
|
51
|
+
return () => clearTimeout(timer);
|
|
52
|
+
}, [draft, workflowId, onWorkflowIdChange]);
|
|
53
|
+
return /* @__PURE__ */ jsxs(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
"data-testid": "runs-parity-bar",
|
|
57
|
+
className: "mb-6 flex flex-col gap-3 lg:flex-row lg:items-center",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsxs("label", { className: "flex min-w-0 items-center gap-2 text-sm text-text-secondary lg:w-80", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Icon, { icon: "mdi:key-outline", width: 16, className: "shrink-0" }),
|
|
61
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: tr("fluidgrids.executions.parity.workflowIdFilter", "Workflow ID") }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
Input,
|
|
64
|
+
{
|
|
65
|
+
value: draft,
|
|
66
|
+
maxLength: WORKFLOW_ID_MAX_LENGTH,
|
|
67
|
+
placeholder: tr(
|
|
68
|
+
"fluidgrids.executions.parity.workflowIdPlaceholder",
|
|
69
|
+
"Filter by workflow ID"
|
|
70
|
+
),
|
|
71
|
+
onChange: (event) => setDraft(event.target.value),
|
|
72
|
+
"data-testid": "runs-workflow-id-filter"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: "flex flex-wrap items-center gap-2",
|
|
80
|
+
"data-testid": "runs-status-counts",
|
|
81
|
+
children: countsError ? /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--color-status-error-text)]", children: [
|
|
82
|
+
tr(
|
|
83
|
+
"fluidgrids.executions.parity.countsError",
|
|
84
|
+
"Could not count the runs:"
|
|
85
|
+
),
|
|
86
|
+
" ",
|
|
87
|
+
countsError
|
|
88
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89
|
+
total !== null && /* @__PURE__ */ jsx(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
onClick: () => onSelectStatus("all"),
|
|
94
|
+
className: cn(
|
|
95
|
+
"rounded-full border px-2.5 py-1 text-xs",
|
|
96
|
+
selectedStatus === "all" ? "border-action-primary-bg bg-action-primary-bg text-action-primary-text" : "border-border-secondary text-text-secondary hover:text-text-primary"
|
|
97
|
+
),
|
|
98
|
+
"aria-pressed": selectedStatus === "all",
|
|
99
|
+
"data-testid": "runs-count-all",
|
|
100
|
+
children: tr("fluidgrids.executions.parity.countAll", "All {{count}}", {
|
|
101
|
+
count: total
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
counts.map(
|
|
106
|
+
({ status, count }) => isRunStatus(status) ? /* @__PURE__ */ jsx(
|
|
107
|
+
"button",
|
|
108
|
+
{
|
|
109
|
+
type: "button",
|
|
110
|
+
onClick: () => onSelectStatus(status),
|
|
111
|
+
className: cn(
|
|
112
|
+
"rounded-full border px-2.5 py-1 text-xs",
|
|
113
|
+
selectedStatus === status ? "border-action-primary-bg bg-action-primary-bg text-action-primary-text" : "border-border-secondary text-text-secondary hover:text-text-primary"
|
|
114
|
+
),
|
|
115
|
+
"aria-pressed": selectedStatus === status,
|
|
116
|
+
"data-testid": `runs-count-${status}`,
|
|
117
|
+
children: tr(
|
|
118
|
+
"fluidgrids.executions.parity.countStatus",
|
|
119
|
+
"{{status}} {{count}}",
|
|
120
|
+
{ status: statusLabels[status], count }
|
|
121
|
+
)
|
|
122
|
+
},
|
|
123
|
+
status
|
|
124
|
+
) : null
|
|
125
|
+
)
|
|
126
|
+
] })
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
14
133
|
function ExecutionsListPage() {
|
|
15
134
|
const tr = useTr();
|
|
16
135
|
const navigate = useNavigate();
|
|
@@ -22,6 +141,8 @@ function ExecutionsListPage() {
|
|
|
22
141
|
clearSelection,
|
|
23
142
|
setStatusFilter,
|
|
24
143
|
setWorkflowFilter,
|
|
144
|
+
setWorkflowIdFilter,
|
|
145
|
+
filter,
|
|
25
146
|
autoRefresh,
|
|
26
147
|
autoRefreshInterval
|
|
27
148
|
} = useExecutionsStore();
|
|
@@ -34,7 +155,10 @@ function ExecutionsListPage() {
|
|
|
34
155
|
setWorkflowFilter(workflowKeyParam);
|
|
35
156
|
}
|
|
36
157
|
}
|
|
37
|
-
const
|
|
158
|
+
const parityEnabled = useDurableParityEnabled();
|
|
159
|
+
const { executions, total, loading, error, refetch, input } = useExecutionsWithStore({ durableParity: parityEnabled });
|
|
160
|
+
const statusCounts = useRunStatusCounts(input, parityEnabled);
|
|
161
|
+
const refetchCounts = statusCounts.refetch;
|
|
38
162
|
const {
|
|
39
163
|
stats,
|
|
40
164
|
loading: statsLoading,
|
|
@@ -52,7 +176,8 @@ function ExecutionsListPage() {
|
|
|
52
176
|
useCallback(() => {
|
|
53
177
|
refetch();
|
|
54
178
|
refetchStats();
|
|
55
|
-
|
|
179
|
+
void refetchCounts();
|
|
180
|
+
}, [refetch, refetchStats, refetchCounts]),
|
|
56
181
|
autoRefresh,
|
|
57
182
|
autoRefreshInterval
|
|
58
183
|
);
|
|
@@ -246,6 +371,18 @@ function ExecutionsListPage() {
|
|
|
246
371
|
}
|
|
247
372
|
) }),
|
|
248
373
|
/* @__PURE__ */ jsx("div", { className: "mb-6", "data-tour": "fluidgrids-runs-filters", children: /* @__PURE__ */ jsx(ExecutionFilters, { workflows: workflowOptions, onRefresh: refetch }) }),
|
|
374
|
+
parityEnabled && /* @__PURE__ */ jsx(
|
|
375
|
+
RunsParityBar,
|
|
376
|
+
{
|
|
377
|
+
workflowId: filter.workflowId,
|
|
378
|
+
onWorkflowIdChange: setWorkflowIdFilter,
|
|
379
|
+
total: statusCounts.total,
|
|
380
|
+
counts: statusCounts.counts,
|
|
381
|
+
countsError: statusCounts.error,
|
|
382
|
+
selectedStatus: filter.status,
|
|
383
|
+
onSelectStatus: handleFilterByStatus
|
|
384
|
+
}
|
|
385
|
+
),
|
|
249
386
|
selection.runIds.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4 p-3 bg-action-primary-bg/10 rounded-lg flex flex-wrap items-center gap-3", children: [
|
|
250
387
|
/* @__PURE__ */ jsxs("span", { className: "text-sm text-text-primary", children: [
|
|
251
388
|
selection.runIds.length,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TemplateCard } from './chunk-
|
|
2
|
-
import { QuotaExhaustedDialog } from './chunk-
|
|
3
|
-
import { useWorkflowDefinitions, useDuplicateWorkflow } from './chunk-LTVAUZ3M.js';
|
|
1
|
+
import { useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TemplateCard } from './chunk-X2J4ZXKD.js';
|
|
2
|
+
import { QuotaExhaustedDialog } from './chunk-S4JYBJ4X.js';
|
|
4
3
|
import { templatesControls } from './chunk-D3UWK7GY.js';
|
|
4
|
+
import { useWorkflowDefinitions, useDuplicateWorkflow } from './chunk-G3KZOX52.js';
|
|
5
5
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
6
6
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
7
|
-
import { BILLING_PLANS_PATH, useFluidGridsAnalytics, emitTemplateUsed, isQuotaExhaustedFailure } from './chunk-
|
|
7
|
+
import { BILLING_PLANS_PATH, useFluidGridsAnalytics, emitTemplateUsed, isQuotaExhaustedFailure } from './chunk-NAYPOEYM.js';
|
|
8
8
|
import { useTr } from './chunk-UULVIT25.js';
|
|
9
9
|
import { useState, useEffect, useMemo, useCallback } from 'react';
|
|
10
10
|
import { useParams, useNavigate } from 'react-router';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useWorkflowDefinitions } from './chunk-LTVAUZ3M.js';
|
|
2
1
|
import { historyControls } from './chunk-D3UWK7GY.js';
|
|
2
|
+
import { useWorkflowDefinitions } from './chunk-G3KZOX52.js';
|
|
3
3
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
4
4
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
5
|
-
import { getFluidGridsConfig } from './chunk-
|
|
5
|
+
import { getFluidGridsConfig } from './chunk-6AMNEX2Y.js';
|
|
6
6
|
import { useTr } from './chunk-UULVIT25.js';
|
|
7
7
|
import { useState, useMemo, useCallback } from 'react';
|
|
8
8
|
import { useNavigate } from 'react-router';
|