@burdenoff/fluidgrids-fe-sdk 2026.1022.7 → 2026.1022.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-JQHHPJZI.js → ExecutionDetailPage-ZPM3HVVX.js} +7 -5
- package/dist/ExecutionsListPage-FP7ZPWP7.js +13 -0
- package/dist/{WorkflowBuilder-HEKTGFM7.js → WorkflowBuilder-EKS6EW6L.js} +8 -6
- package/dist/{WorkflowsList-RWJKR5QF.js → WorkflowsList-PAQNMBRO.js} +5 -5
- package/dist/{chunk-RQ6TDVVL.js → chunk-3JN4ZUXR.js} +3 -3
- package/dist/{chunk-36RTRUCM.js → chunk-4UQ4ML7J.js} +8 -253
- package/dist/{chunk-BQAD4IRV.js → chunk-54G7TO3H.js} +27 -3
- package/dist/{chunk-QMZGUJI3.js → chunk-6TBLBRKJ.js} +4 -4
- package/dist/{chunk-5TW5JP5R.js → chunk-AVJIWVHL.js} +1 -1
- package/dist/{chunk-UZG3ZIQM.js → chunk-CY6KX4RG.js} +6 -1
- package/dist/{chunk-VGIH3SOT.js → chunk-EZF3VWUB.js} +5 -2
- package/dist/{chunk-WFZD44CK.js → chunk-G7RP3WRM.js} +17 -5
- package/dist/chunk-GO4UTLV4.js +129 -0
- package/dist/{chunk-HP3A6BPK.js → chunk-JVMZ3YU3.js} +2 -2
- package/dist/{chunk-K6LSRFMX.js → chunk-MY3T465I.js} +1 -1
- package/dist/{chunk-SAZVBFMO.js → chunk-QEPYK454.js} +2 -1
- package/dist/{chunk-IYWT6OV3.js → chunk-RKST2IRQ.js} +2 -2
- package/dist/{chunk-MANNJ7P3.js → chunk-SIF2EXIF.js} +2 -2
- package/dist/chunk-SOPYCZCR.js +179 -0
- package/dist/{chunk-QN4HHTQP.js → chunk-TAN27J2F.js} +2 -2
- package/dist/{chunk-OHUNYBJ6.js → chunk-VM2BTPX3.js} +2 -2
- package/dist/{chunk-CV56O5R4.js → chunk-ZKCLX2VR.js} +47 -4
- package/dist/{config-AOSNG5I7.js → config-5GKXWEIZ.js} +1 -1
- package/dist/executions.js +9 -7
- package/dist/history.js +4 -4
- package/dist/index.d.ts +404 -30
- package/dist/index.js +107 -34
- package/dist/nodes.js +3 -3
- package/dist/settings.js +2 -2
- package/dist/templates.js +8 -6
- package/dist/workflow-builder.js +9 -7
- package/dist/workflows-list.js +5 -5
- package/package.json +1 -1
- package/dist/ExecutionsListPage-3NC3WARO.js +0 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS } from './chunk-QBFAJNUC.js';
|
|
2
|
-
import { useExecutionsStore } from './chunk-
|
|
3
|
-
import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-
|
|
2
|
+
import { useExecutionsStore } from './chunk-CY6KX4RG.js';
|
|
3
|
+
import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-QEPYK454.js';
|
|
4
4
|
import { throwIfResultError, openRunQuotaUpgradePrompt } from './chunk-4UAWCWS7.js';
|
|
5
5
|
import { useTr } from './chunk-UULVIT25.js';
|
|
6
6
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
@@ -453,6 +453,9 @@ function useExecutionsWithStore() {
|
|
|
453
453
|
if (filter.nodeId.trim()) {
|
|
454
454
|
baseInput.nodeId = filter.nodeId.trim();
|
|
455
455
|
}
|
|
456
|
+
if (filter.tagId) {
|
|
457
|
+
baseInput.tagIds = [filter.tagId];
|
|
458
|
+
}
|
|
456
459
|
return baseInput;
|
|
457
460
|
}, [filter, debouncedSearch, pagination.page, pagination.pageSize]);
|
|
458
461
|
const result = useExecutions(input);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { buildNodeDisplayMap, ExecutionStatusBadge, formatRunVersion, NodeTimeline, RunLogViewer } from './chunk-
|
|
2
|
-
import { useExecution, useExecutionActions, useAutoRefresh } from './chunk-
|
|
1
|
+
import { buildNodeDisplayMap, ExecutionStatusBadge, formatRunVersion, NodeTimeline, RunLogViewer } from './chunk-ZKCLX2VR.js';
|
|
2
|
+
import { useExecution, useExecutionActions, useAutoRefresh } from './chunk-EZF3VWUB.js';
|
|
3
|
+
import { EntityTagPicker } from './chunk-GO4UTLV4.js';
|
|
3
4
|
import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS } from './chunk-ONVGFVNH.js';
|
|
4
|
-
import { getFluidGridsConfig } from './chunk-
|
|
5
|
-
import { RunLogsDocument, RunLogAppendedDocument } from './chunk-
|
|
5
|
+
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
6
|
+
import { RunLogsDocument, RunLogAppendedDocument } from './chunk-QEPYK454.js';
|
|
6
7
|
import { throwIfResultError } from './chunk-4UAWCWS7.js';
|
|
7
8
|
import { useTr } from './chunk-UULVIT25.js';
|
|
8
9
|
import { getFluidGridsClient, getFluidGridsClientSafe } from './chunk-NTWG3CJX.js';
|
|
@@ -733,6 +734,9 @@ function ExecutionDetailPage() {
|
|
|
733
734
|
const { allowed: canControlRuns } = useFluidGridsPermission(
|
|
734
735
|
FLUIDGRIDS_PERMISSIONS.WORKFLOW_RUN_EXECUTE
|
|
735
736
|
);
|
|
737
|
+
const { allowed: canTagRun } = useFluidGridsPermission(
|
|
738
|
+
FLUIDGRIDS_PERMISSIONS.WORKFLOW_UPDATE
|
|
739
|
+
);
|
|
736
740
|
const [minLogLevel, setMinLogLevel] = useState(null);
|
|
737
741
|
const { execution, loading, error, refetch } = useExecution(runId);
|
|
738
742
|
const runCanChange = execution?.status === "RUNNING" || execution?.status === "PENDING" || execution?.status === "WAITING";
|
|
@@ -1062,7 +1066,15 @@ function ExecutionDetailPage() {
|
|
|
1062
1066
|
/* @__PURE__ */ jsx(Icon, { icon: "mdi:clock-outline", width: 16 }),
|
|
1063
1067
|
formatDateTime(execution.startedAt || execution.createdAt)
|
|
1064
1068
|
] })
|
|
1065
|
-
] })
|
|
1069
|
+
] }),
|
|
1070
|
+
/* @__PURE__ */ jsx("div", { className: "mt-3", "data-testid": "run-tags", children: /* @__PURE__ */ jsx(
|
|
1071
|
+
EntityTagPicker,
|
|
1072
|
+
{
|
|
1073
|
+
entityType: "FLUIDGRIDS_RUN",
|
|
1074
|
+
entityId: execution.id,
|
|
1075
|
+
readOnly: !canTagRun
|
|
1076
|
+
}
|
|
1077
|
+
) })
|
|
1066
1078
|
] }),
|
|
1067
1079
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1068
1080
|
isActive && /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm text-text-secondary mr-4", children: [
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-SOPYCZCR.js';
|
|
2
|
+
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
3
|
+
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
|
+
import { TagBadge, TagsWidget } from '@burdenoff/fe-libs/tag';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function toTagItem(assignment) {
|
|
8
|
+
return {
|
|
9
|
+
id: assignment.tagId,
|
|
10
|
+
key: assignment.tagInfo?.key ?? assignment.tagId,
|
|
11
|
+
label: assignment.tagInfo?.label ?? assignment.tagInfo?.key ?? "Tag",
|
|
12
|
+
color: assignment.tagInfo?.color ?? null
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function EntityTagPicker({
|
|
16
|
+
entityType,
|
|
17
|
+
entityId,
|
|
18
|
+
onDraftChange,
|
|
19
|
+
readOnly = false,
|
|
20
|
+
onChange,
|
|
21
|
+
className
|
|
22
|
+
}) {
|
|
23
|
+
const draftMode = !entityId;
|
|
24
|
+
const { workspaceId } = getFluidGridsConfig();
|
|
25
|
+
const { tags: assignments, refetch } = useEntityTags(entityType, entityId);
|
|
26
|
+
const tagEntity = useTagEntity();
|
|
27
|
+
const untagEntity = useUntagEntity();
|
|
28
|
+
const [current, setCurrent] = useState([]);
|
|
29
|
+
const currentRef = useRef([]);
|
|
30
|
+
const assignmentKey = assignments.map((a) => a.tagId).join("|");
|
|
31
|
+
const syncedKey = useRef(null);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (draftMode || syncedKey.current === assignmentKey) return;
|
|
34
|
+
syncedKey.current = assignmentKey;
|
|
35
|
+
const synced = assignments.map(toTagItem);
|
|
36
|
+
currentRef.current = synced;
|
|
37
|
+
setCurrent(synced);
|
|
38
|
+
}, [assignmentKey, assignments, draftMode]);
|
|
39
|
+
const handleAdd = useCallback(
|
|
40
|
+
async (tag) => {
|
|
41
|
+
if (currentRef.current.some((t) => t.id === tag.id)) return;
|
|
42
|
+
const next = [...currentRef.current, tag];
|
|
43
|
+
currentRef.current = next;
|
|
44
|
+
setCurrent(next);
|
|
45
|
+
if (draftMode) {
|
|
46
|
+
onDraftChange?.(next.map((t) => t.id));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
await tagEntity(entityType, entityId, tag.id);
|
|
51
|
+
await refetch();
|
|
52
|
+
onChange?.();
|
|
53
|
+
} catch {
|
|
54
|
+
const rolledBack = currentRef.current.filter((t) => t.id !== tag.id);
|
|
55
|
+
currentRef.current = rolledBack;
|
|
56
|
+
setCurrent(rolledBack);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
[
|
|
60
|
+
draftMode,
|
|
61
|
+
entityId,
|
|
62
|
+
entityType,
|
|
63
|
+
onChange,
|
|
64
|
+
onDraftChange,
|
|
65
|
+
refetch,
|
|
66
|
+
tagEntity
|
|
67
|
+
]
|
|
68
|
+
);
|
|
69
|
+
const handleRemove = useCallback(
|
|
70
|
+
async (tagId) => {
|
|
71
|
+
const removed = currentRef.current.find((t) => t.id === tagId);
|
|
72
|
+
const next = currentRef.current.filter((t) => t.id !== tagId);
|
|
73
|
+
currentRef.current = next;
|
|
74
|
+
setCurrent(next);
|
|
75
|
+
if (draftMode) {
|
|
76
|
+
onDraftChange?.(next.map((t) => t.id));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
await untagEntity(entityType, entityId, tagId);
|
|
81
|
+
await refetch();
|
|
82
|
+
onChange?.();
|
|
83
|
+
} catch {
|
|
84
|
+
if (removed) {
|
|
85
|
+
const rolledBack = [...currentRef.current, removed];
|
|
86
|
+
currentRef.current = rolledBack;
|
|
87
|
+
setCurrent(rolledBack);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
[
|
|
92
|
+
draftMode,
|
|
93
|
+
entityId,
|
|
94
|
+
entityType,
|
|
95
|
+
onChange,
|
|
96
|
+
onDraftChange,
|
|
97
|
+
refetch,
|
|
98
|
+
untagEntity
|
|
99
|
+
]
|
|
100
|
+
);
|
|
101
|
+
if (readOnly) {
|
|
102
|
+
if (current.length === 0) return null;
|
|
103
|
+
return /* @__PURE__ */ jsx("div", { className: `flex flex-wrap items-center gap-1 ${className ?? ""}`, children: current.map((tag) => /* @__PURE__ */ jsx(
|
|
104
|
+
TagBadge,
|
|
105
|
+
{
|
|
106
|
+
id: tag.id,
|
|
107
|
+
label: tag.label,
|
|
108
|
+
color: tag.color ?? void 0,
|
|
109
|
+
size: "sm"
|
|
110
|
+
},
|
|
111
|
+
tag.id
|
|
112
|
+
)) });
|
|
113
|
+
}
|
|
114
|
+
return /* @__PURE__ */ jsx(
|
|
115
|
+
TagsWidget,
|
|
116
|
+
{
|
|
117
|
+
entityType,
|
|
118
|
+
entityId: entityId ?? "",
|
|
119
|
+
workspaceId: workspaceId || void 0,
|
|
120
|
+
tags: current,
|
|
121
|
+
onAdd: handleAdd,
|
|
122
|
+
onRemove: handleRemove,
|
|
123
|
+
syncGraphNotifications: !draftMode,
|
|
124
|
+
className
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { EntityTagPicker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getFluidGridsConfig } from './chunk-
|
|
2
|
-
import { WorkflowDefinitionsDocument, WorkflowDefinitionDocument, WorkflowVersionsDocument, CreateWorkflowDefinitionDocument, ImportWorkflowDocument, UpdateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, RestoreWorkflowVersionDocument, TriggerWorkflowDocument, WorkflowRunsDocument, WorkflowRunDocument, DashboardSummaryDocument, ActivateWorkflowDefinitionDocument, DeactivateWorkflowDefinitionDocument } from './chunk-
|
|
1
|
+
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
2
|
+
import { WorkflowDefinitionsDocument, WorkflowDefinitionDocument, WorkflowVersionsDocument, CreateWorkflowDefinitionDocument, ImportWorkflowDocument, UpdateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, RestoreWorkflowVersionDocument, TriggerWorkflowDocument, WorkflowRunsDocument, WorkflowRunDocument, DashboardSummaryDocument, ActivateWorkflowDefinitionDocument, DeactivateWorkflowDefinitionDocument } from './chunk-QEPYK454.js';
|
|
3
3
|
import { throwIfResultError, openRunQuotaUpgradePrompt } from './chunk-4UAWCWS7.js';
|
|
4
4
|
import { useTr } from './chunk-UULVIT25.js';
|
|
5
5
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useFluidGridsFlag, FLUIDGRIDS_FLAGS, LogStreamingTab } from './chunk-KNFGMDDU.js';
|
|
2
2
|
import { useFlowStore } from './chunk-VI2RFS65.js';
|
|
3
|
-
import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-
|
|
3
|
+
import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-QEPYK454.js';
|
|
4
4
|
import { useTr } from './chunk-UULVIT25.js';
|
|
5
5
|
import { useState, useMemo, useEffect, useCallback } from 'react';
|
|
6
6
|
import { useNavigate, useParams } from 'react-router';
|
|
@@ -61,6 +61,7 @@ var UntagFluidgridsEntityDocument = { "kind": "Document", "definitions": [{ "kin
|
|
|
61
61
|
var ReplaceFluidgridsEntityTagsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "ReplaceFluidgridsEntityTags" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ReplaceFluidgridsEntityTagsInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "replaceFluidgridsEntityTags" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FluidgridsTagAssignmentFields" }, "directives": [] }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FluidgridsTagAssignmentFields" }, "variableDefinitions": [], "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FluidgridsTagAssignment" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "entityType" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "entityId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "source" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "assignedAt" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagInfo" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "key" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "label" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "color" }, "arguments": [], "directives": [] }] } }] } }], "loc": { "start": 0, "end": 360 } };
|
|
62
62
|
var CreateFluidgridsTagDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateFluidgridsTag" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateFluidgridsTagInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createFluidgridsTag" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FluidgridsAvailableTagFields" }, "directives": [] }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FluidgridsAvailableTagFields" }, "variableDefinitions": [], "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FluidgridsAvailableTag" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "key" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "label" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "color" }, "arguments": [], "directives": [] }] } }], "loc": { "start": 0, "end": 250 } };
|
|
63
63
|
var WorkflowDefinitionsTagsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "WorkflowDefinitionsTags" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ListWorkflowDefinitionsInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "workflowDefinitions" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "workflowKey" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagAssignments" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FluidgridsTagAssignmentFields" }, "directives": [] }] } }] } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FluidgridsTagAssignmentFields" }, "variableDefinitions": [], "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FluidgridsTagAssignment" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "entityType" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "entityId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "source" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "assignedAt" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagInfo" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "key" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "label" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "color" }, "arguments": [], "directives": [] }] } }] } }], "loc": { "start": 0, "end": 421 } };
|
|
64
|
+
var DataTablesTagsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "DataTablesTags" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "dataTables" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "tables" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagAssignments" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "FluidgridsTagAssignmentFields" }, "directives": [] }] } }] } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "FluidgridsTagAssignmentFields" }, "variableDefinitions": [], "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FluidgridsTagAssignment" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "entityType" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "entityId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "source" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "assignedAt" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tagInfo" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "key" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "label" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "color" }, "arguments": [], "directives": [] }] } }] } }], "loc": { "start": 0, "end": 360 } };
|
|
64
65
|
function useCancelExecutionMutation(baseOptions) {
|
|
65
66
|
return useMutation(CancelExecutionDocument, baseOptions);
|
|
66
67
|
}
|
|
@@ -377,4 +378,4 @@ function useWorkflowDefinitionsTagsSuspenseQuery(baseOptions) {
|
|
|
377
378
|
return useSuspenseQuery(WorkflowDefinitionsTagsDocument, baseOptions);
|
|
378
379
|
}
|
|
379
380
|
|
|
380
|
-
export { ActivateWorkflowDefinitionDocument, ActiveExecutionsDocument, AvailableFluidgridsTagsDocument, CancelExecutionDocument, CreateFluidgridsTagDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DashboardSummaryDocument, DeactivateWorkflowDefinitionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, EventRegistrationsDocument, ExecuteStepDocument, ExecutionDetailDocument, ExecutionLogsDocument, ExecutionStatsDocument, ExecutionsListDocument, FluidgridsAvailableTagFieldsFragmentDoc, FluidgridsEntityTagsDocument, FluidgridsTagAssignmentFieldsFragmentDoc, ImportWorkflowDocument, ImportWorkflowTemplateDocument, ListenForWebhookTestEventDocument, NodeEndpointConfigDocument, NodeEndpointConfigsDocument, NodeManifestDocument, NodeSchemaIntrospectionDocument, NodeStatesDocument, NodeUsageStatusDocument, PauseExecutionDocument, PinNodeDataDocument, RegisterNodeDocument, RemoveNodeFromWorkflowsDocument, ReplaceFluidgridsEntityTagsDocument, RestoreWorkflowVersionDocument, ResumeExecutionDocument, RetryNodeDocument, RunFromNodeDocument, RunFromNodeEligibilityDocument, RunLogAppendedDocument, RunLogLineFieldsFragmentDoc, RunLogsDocument, SearchFluidgridsTagsDocument, StopWebhookTestListenerDocument, TagFluidgridsEntityDocument, TerminateExecutionDocument, TriggerWorkflowDocument, UnpinNodeDataDocument, UntagFluidgridsEntityDocument, UpdateWorkflowDefinitionDocument, UsageTimeSeriesDocument, WebhookTestListenerDocument, WorkflowDefinitionDocument, WorkflowDefinitionsDocument, WorkflowDefinitionsTagsDocument, WorkflowPinnedDataDocument, WorkflowRunDocument, WorkflowRunsDocument, WorkflowVersionsDocument, WorkspaceRunsQuotaDocument, useActivateWorkflowDefinitionMutation, useActiveExecutionsLazyQuery, useActiveExecutionsQuery, useActiveExecutionsSuspenseQuery, useAvailableFluidgridsTagsLazyQuery, useAvailableFluidgridsTagsQuery, useAvailableFluidgridsTagsSuspenseQuery, useCancelExecutionMutation, useCreateFluidgridsTagMutation, useCreateWorkflowDefinitionMutation, useCreateWorkflowVersionMutation, useDashboardSummaryLazyQuery, useDashboardSummaryQuery, useDashboardSummarySuspenseQuery, useDeactivateWorkflowDefinitionMutation, useDeleteWorkflowDefinitionMutation, useDuplicateWorkflowMutation, useEventRegistrationsLazyQuery, useEventRegistrationsQuery, useEventRegistrationsSuspenseQuery, useExecuteStepMutation, useExecutionDetailLazyQuery, useExecutionDetailQuery, useExecutionDetailSuspenseQuery, useExecutionLogsLazyQuery, useExecutionLogsQuery, useExecutionLogsSuspenseQuery, useExecutionStatsLazyQuery, useExecutionStatsQuery, useExecutionStatsSuspenseQuery, useExecutionsListLazyQuery, useExecutionsListQuery, useExecutionsListSuspenseQuery, useFluidgridsEntityTagsLazyQuery, useFluidgridsEntityTagsQuery, useFluidgridsEntityTagsSuspenseQuery, useImportWorkflowMutation, useImportWorkflowTemplateMutation, useNodeEndpointConfigLazyQuery, useNodeEndpointConfigQuery, useNodeEndpointConfigSuspenseQuery, useNodeEndpointConfigsLazyQuery, useNodeEndpointConfigsQuery, useNodeEndpointConfigsSuspenseQuery, useNodeManifestLazyQuery, useNodeManifestQuery, useNodeManifestSuspenseQuery, useNodeSchemaIntrospectionLazyQuery, useNodeSchemaIntrospectionQuery, useNodeSchemaIntrospectionSuspenseQuery, useNodeStatesLazyQuery, useNodeStatesQuery, useNodeStatesSuspenseQuery, useNodeUsageStatusLazyQuery, useNodeUsageStatusQuery, useNodeUsageStatusSuspenseQuery, usePauseExecutionMutation, usePinNodeDataMutation, useRegisterNodeMutation, useRemoveNodeFromWorkflowsMutation, useReplaceFluidgridsEntityTagsMutation, useRestoreWorkflowVersionMutation, useResumeExecutionMutation, useRetryNodeMutation, useRunFromNodeEligibilityLazyQuery, useRunFromNodeEligibilityQuery, useRunFromNodeEligibilitySuspenseQuery, useRunFromNodeMutation, useRunLogAppendedSubscription, useRunLogsLazyQuery, useRunLogsQuery, useRunLogsSuspenseQuery, useSearchFluidgridsTagsLazyQuery, useSearchFluidgridsTagsQuery, useSearchFluidgridsTagsSuspenseQuery, useTagFluidgridsEntityMutation, useTerminateExecutionMutation, useTriggerWorkflowMutation, useUnpinNodeDataMutation, useUntagFluidgridsEntityMutation, useUpdateWorkflowDefinitionMutation, useUsageTimeSeriesLazyQuery, useUsageTimeSeriesQuery, useUsageTimeSeriesSuspenseQuery, useWorkflowDefinitionLazyQuery, useWorkflowDefinitionQuery, useWorkflowDefinitionSuspenseQuery, useWorkflowDefinitionsLazyQuery, useWorkflowDefinitionsQuery, useWorkflowDefinitionsSuspenseQuery, useWorkflowDefinitionsTagsLazyQuery, useWorkflowDefinitionsTagsQuery, useWorkflowDefinitionsTagsSuspenseQuery, useWorkflowPinnedDataLazyQuery, useWorkflowPinnedDataQuery, useWorkflowPinnedDataSuspenseQuery, useWorkflowRunLazyQuery, useWorkflowRunQuery, useWorkflowRunSuspenseQuery, useWorkflowRunsLazyQuery, useWorkflowRunsQuery, useWorkflowRunsSuspenseQuery, useWorkflowVersionsLazyQuery, useWorkflowVersionsQuery, useWorkflowVersionsSuspenseQuery };
|
|
381
|
+
export { ActivateWorkflowDefinitionDocument, ActiveExecutionsDocument, AvailableFluidgridsTagsDocument, CancelExecutionDocument, CreateFluidgridsTagDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DashboardSummaryDocument, DataTablesTagsDocument, DeactivateWorkflowDefinitionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, EventRegistrationsDocument, ExecuteStepDocument, ExecutionDetailDocument, ExecutionLogsDocument, ExecutionStatsDocument, ExecutionsListDocument, FluidgridsAvailableTagFieldsFragmentDoc, FluidgridsEntityTagsDocument, FluidgridsTagAssignmentFieldsFragmentDoc, ImportWorkflowDocument, ImportWorkflowTemplateDocument, ListenForWebhookTestEventDocument, NodeEndpointConfigDocument, NodeEndpointConfigsDocument, NodeManifestDocument, NodeSchemaIntrospectionDocument, NodeStatesDocument, NodeUsageStatusDocument, PauseExecutionDocument, PinNodeDataDocument, RegisterNodeDocument, RemoveNodeFromWorkflowsDocument, ReplaceFluidgridsEntityTagsDocument, RestoreWorkflowVersionDocument, ResumeExecutionDocument, RetryNodeDocument, RunFromNodeDocument, RunFromNodeEligibilityDocument, RunLogAppendedDocument, RunLogLineFieldsFragmentDoc, RunLogsDocument, SearchFluidgridsTagsDocument, StopWebhookTestListenerDocument, TagFluidgridsEntityDocument, TerminateExecutionDocument, TriggerWorkflowDocument, UnpinNodeDataDocument, UntagFluidgridsEntityDocument, UpdateWorkflowDefinitionDocument, UsageTimeSeriesDocument, WebhookTestListenerDocument, WorkflowDefinitionDocument, WorkflowDefinitionsDocument, WorkflowDefinitionsTagsDocument, WorkflowPinnedDataDocument, WorkflowRunDocument, WorkflowRunsDocument, WorkflowVersionsDocument, WorkspaceRunsQuotaDocument, useActivateWorkflowDefinitionMutation, useActiveExecutionsLazyQuery, useActiveExecutionsQuery, useActiveExecutionsSuspenseQuery, useAvailableFluidgridsTagsLazyQuery, useAvailableFluidgridsTagsQuery, useAvailableFluidgridsTagsSuspenseQuery, useCancelExecutionMutation, useCreateFluidgridsTagMutation, useCreateWorkflowDefinitionMutation, useCreateWorkflowVersionMutation, useDashboardSummaryLazyQuery, useDashboardSummaryQuery, useDashboardSummarySuspenseQuery, useDeactivateWorkflowDefinitionMutation, useDeleteWorkflowDefinitionMutation, useDuplicateWorkflowMutation, useEventRegistrationsLazyQuery, useEventRegistrationsQuery, useEventRegistrationsSuspenseQuery, useExecuteStepMutation, useExecutionDetailLazyQuery, useExecutionDetailQuery, useExecutionDetailSuspenseQuery, useExecutionLogsLazyQuery, useExecutionLogsQuery, useExecutionLogsSuspenseQuery, useExecutionStatsLazyQuery, useExecutionStatsQuery, useExecutionStatsSuspenseQuery, useExecutionsListLazyQuery, useExecutionsListQuery, useExecutionsListSuspenseQuery, useFluidgridsEntityTagsLazyQuery, useFluidgridsEntityTagsQuery, useFluidgridsEntityTagsSuspenseQuery, useImportWorkflowMutation, useImportWorkflowTemplateMutation, useNodeEndpointConfigLazyQuery, useNodeEndpointConfigQuery, useNodeEndpointConfigSuspenseQuery, useNodeEndpointConfigsLazyQuery, useNodeEndpointConfigsQuery, useNodeEndpointConfigsSuspenseQuery, useNodeManifestLazyQuery, useNodeManifestQuery, useNodeManifestSuspenseQuery, useNodeSchemaIntrospectionLazyQuery, useNodeSchemaIntrospectionQuery, useNodeSchemaIntrospectionSuspenseQuery, useNodeStatesLazyQuery, useNodeStatesQuery, useNodeStatesSuspenseQuery, useNodeUsageStatusLazyQuery, useNodeUsageStatusQuery, useNodeUsageStatusSuspenseQuery, usePauseExecutionMutation, usePinNodeDataMutation, useRegisterNodeMutation, useRemoveNodeFromWorkflowsMutation, useReplaceFluidgridsEntityTagsMutation, useRestoreWorkflowVersionMutation, useResumeExecutionMutation, useRetryNodeMutation, useRunFromNodeEligibilityLazyQuery, useRunFromNodeEligibilityQuery, useRunFromNodeEligibilitySuspenseQuery, useRunFromNodeMutation, useRunLogAppendedSubscription, useRunLogsLazyQuery, useRunLogsQuery, useRunLogsSuspenseQuery, useSearchFluidgridsTagsLazyQuery, useSearchFluidgridsTagsQuery, useSearchFluidgridsTagsSuspenseQuery, useTagFluidgridsEntityMutation, useTerminateExecutionMutation, useTriggerWorkflowMutation, useUnpinNodeDataMutation, useUntagFluidgridsEntityMutation, useUpdateWorkflowDefinitionMutation, useUsageTimeSeriesLazyQuery, useUsageTimeSeriesQuery, useUsageTimeSeriesSuspenseQuery, useWorkflowDefinitionLazyQuery, useWorkflowDefinitionQuery, useWorkflowDefinitionSuspenseQuery, useWorkflowDefinitionsLazyQuery, useWorkflowDefinitionsQuery, useWorkflowDefinitionsSuspenseQuery, useWorkflowDefinitionsTagsLazyQuery, useWorkflowDefinitionsTagsQuery, useWorkflowDefinitionsTagsSuspenseQuery, useWorkflowPinnedDataLazyQuery, useWorkflowPinnedDataQuery, useWorkflowPinnedDataSuspenseQuery, useWorkflowRunLazyQuery, useWorkflowRunQuery, useWorkflowRunSuspenseQuery, useWorkflowRunsLazyQuery, useWorkflowRunsQuery, useWorkflowRunsSuspenseQuery, useWorkflowVersionsLazyQuery, useWorkflowVersionsQuery, useWorkflowVersionsSuspenseQuery };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useWorkflowDefinitions } from './chunk-
|
|
1
|
+
import { useWorkflowDefinitions } from './chunk-JVMZ3YU3.js';
|
|
2
2
|
import { historyControls } from './chunk-D3UWK7GY.js';
|
|
3
|
-
import { getFluidGridsConfig } from './chunk-
|
|
3
|
+
import { getFluidGridsConfig } from './chunk-CY6KX4RG.js';
|
|
4
4
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
5
5
|
import { useTr } from './chunk-UULVIT25.js';
|
|
6
6
|
import { useState, useMemo, useCallback } from 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FluidGridsProvider, Card, FluidGridsMark } from './chunk-
|
|
1
|
+
import { FluidGridsProvider, Card, FluidGridsMark } from './chunk-4UQ4ML7J.js';
|
|
2
2
|
import { Input } from './chunk-IEVSFCFS.js';
|
|
3
3
|
import { Button } from './chunk-BQXVT32O.js';
|
|
4
4
|
import { cn } from './chunk-JL7CASN5.js';
|
|
5
|
-
import { useWorkflowDefinition } from './chunk-
|
|
5
|
+
import { useWorkflowDefinition } from './chunk-JVMZ3YU3.js';
|
|
6
6
|
import { useFlowStore } from './chunk-VI2RFS65.js';
|
|
7
7
|
import { useTr } from './chunk-UULVIT25.js';
|
|
8
8
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-QEPYK454.js';
|
|
2
|
+
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
3
|
+
import { useState, useCallback, useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
var FLUIDGRIDS_ENTITY_TYPES = [
|
|
6
|
+
"FLUIDGRIDS_WORKFLOW",
|
|
7
|
+
"FLUIDGRIDS_RUN",
|
|
8
|
+
"FLUIDGRIDS_DATA_TABLE",
|
|
9
|
+
"FLUIDGRIDS_TRIGGER",
|
|
10
|
+
"FLUIDGRIDS_SCHEDULE"
|
|
11
|
+
];
|
|
12
|
+
function tagLabel(assignment) {
|
|
13
|
+
return assignment.tagInfo?.label ?? assignment.tagInfo?.key ?? assignment.tagId.slice(0, 8);
|
|
14
|
+
}
|
|
15
|
+
function useEntityTags(entityType, entityId) {
|
|
16
|
+
const [tags, setTags] = useState([]);
|
|
17
|
+
const [loading, setLoading] = useState(false);
|
|
18
|
+
const [error, setError] = useState(null);
|
|
19
|
+
const refetch = useCallback(async () => {
|
|
20
|
+
if (!entityId) {
|
|
21
|
+
setTags([]);
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
setLoading(true);
|
|
25
|
+
setError(null);
|
|
26
|
+
try {
|
|
27
|
+
const { data } = await getFluidGridsClient().query({
|
|
28
|
+
query: FluidgridsEntityTagsDocument,
|
|
29
|
+
variables: { input: { entityType, entityId } },
|
|
30
|
+
fetchPolicy: "network-only"
|
|
31
|
+
});
|
|
32
|
+
const next = data?.fluidgridsEntityTags ?? [];
|
|
33
|
+
setTags(next);
|
|
34
|
+
return next;
|
|
35
|
+
} catch (err) {
|
|
36
|
+
setError(err);
|
|
37
|
+
return [];
|
|
38
|
+
} finally {
|
|
39
|
+
setLoading(false);
|
|
40
|
+
}
|
|
41
|
+
}, [entityType, entityId]);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
void refetch();
|
|
44
|
+
}, [refetch]);
|
|
45
|
+
return { tags, loading, error, refetch };
|
|
46
|
+
}
|
|
47
|
+
function useAvailableTags(limit = 50, options = {}) {
|
|
48
|
+
const [availableTags, setAvailableTags] = useState([]);
|
|
49
|
+
const [loading, setLoading] = useState(false);
|
|
50
|
+
const skip = options.skip ?? false;
|
|
51
|
+
const fetchTags = useCallback(async () => {
|
|
52
|
+
if (skip) return;
|
|
53
|
+
setLoading(true);
|
|
54
|
+
try {
|
|
55
|
+
const { data } = await getFluidGridsClient().query({
|
|
56
|
+
query: AvailableFluidgridsTagsDocument,
|
|
57
|
+
variables: { limit },
|
|
58
|
+
fetchPolicy: "network-only"
|
|
59
|
+
});
|
|
60
|
+
setAvailableTags(data?.availableFluidgridsTags ?? []);
|
|
61
|
+
} catch {
|
|
62
|
+
setAvailableTags([]);
|
|
63
|
+
} finally {
|
|
64
|
+
setLoading(false);
|
|
65
|
+
}
|
|
66
|
+
}, [limit, skip]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
void fetchTags();
|
|
69
|
+
}, [fetchTags]);
|
|
70
|
+
return { availableTags, loading, refetch: fetchTags };
|
|
71
|
+
}
|
|
72
|
+
function useSearchTags() {
|
|
73
|
+
return useCallback(
|
|
74
|
+
async (query, limit = 20) => {
|
|
75
|
+
if (!query.trim()) return [];
|
|
76
|
+
try {
|
|
77
|
+
const { data } = await getFluidGridsClient().query({
|
|
78
|
+
query: SearchFluidgridsTagsDocument,
|
|
79
|
+
variables: { query, limit },
|
|
80
|
+
fetchPolicy: "network-only"
|
|
81
|
+
});
|
|
82
|
+
return data?.searchFluidgridsTags ?? [];
|
|
83
|
+
} catch {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
[]
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function useTagEntity() {
|
|
91
|
+
return useCallback(
|
|
92
|
+
async (entityType, entityId, tagId) => {
|
|
93
|
+
const { data } = await getFluidGridsClient().mutate({
|
|
94
|
+
mutation: TagFluidgridsEntityDocument,
|
|
95
|
+
variables: { input: { entityType, entityId, tagId, source: "MANUAL" } }
|
|
96
|
+
});
|
|
97
|
+
return Boolean(data?.tagFluidgridsEntity);
|
|
98
|
+
},
|
|
99
|
+
[]
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function useUntagEntity() {
|
|
103
|
+
return useCallback(
|
|
104
|
+
async (entityType, entityId, tagId) => {
|
|
105
|
+
const { data } = await getFluidGridsClient().mutate({
|
|
106
|
+
mutation: UntagFluidgridsEntityDocument,
|
|
107
|
+
variables: { input: { entityType, entityId, tagId } }
|
|
108
|
+
});
|
|
109
|
+
return Boolean(data?.untagFluidgridsEntity);
|
|
110
|
+
},
|
|
111
|
+
[]
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
function useReplaceEntityTags() {
|
|
115
|
+
return useCallback(
|
|
116
|
+
async (entityType, entityId, tagIds) => {
|
|
117
|
+
const { data } = await getFluidGridsClient().mutate({
|
|
118
|
+
mutation: ReplaceFluidgridsEntityTagsDocument,
|
|
119
|
+
variables: { input: { entityType, entityId, tagIds } }
|
|
120
|
+
});
|
|
121
|
+
return data?.replaceFluidgridsEntityTags ?? [];
|
|
122
|
+
},
|
|
123
|
+
[]
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
function useCreateTag() {
|
|
127
|
+
return useCallback(
|
|
128
|
+
async (label, color) => {
|
|
129
|
+
const { data } = await getFluidGridsClient().mutate({
|
|
130
|
+
mutation: CreateFluidgridsTagDocument,
|
|
131
|
+
variables: { input: { label, color } }
|
|
132
|
+
});
|
|
133
|
+
return data?.createFluidgridsTag ?? null;
|
|
134
|
+
},
|
|
135
|
+
[]
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function useDraftEntityTags(entityType) {
|
|
139
|
+
const [draftTagIds, setDraftTagIds] = useState([]);
|
|
140
|
+
const tagEntity = useTagEntity();
|
|
141
|
+
const flushTags = useCallback(
|
|
142
|
+
async (entityId) => {
|
|
143
|
+
if (!entityId || draftTagIds.length === 0) return;
|
|
144
|
+
await Promise.all(
|
|
145
|
+
draftTagIds.map(
|
|
146
|
+
(tagId) => tagEntity(entityType, entityId, tagId).catch(() => false)
|
|
147
|
+
)
|
|
148
|
+
);
|
|
149
|
+
},
|
|
150
|
+
[draftTagIds, entityType, tagEntity]
|
|
151
|
+
);
|
|
152
|
+
return { draftTagIds, setDraftTagIds, flushTags };
|
|
153
|
+
}
|
|
154
|
+
function useDataTableTagOverlay(limit = 200) {
|
|
155
|
+
const [tagsById, setTagsById] = useState({});
|
|
156
|
+
const fetchOverlay = useCallback(async () => {
|
|
157
|
+
try {
|
|
158
|
+
const { data } = await getFluidGridsClient().query({
|
|
159
|
+
query: DataTablesTagsDocument,
|
|
160
|
+
variables: { limit },
|
|
161
|
+
fetchPolicy: "network-only"
|
|
162
|
+
});
|
|
163
|
+
const next = {};
|
|
164
|
+
for (const table of data?.dataTables?.tables ?? []) {
|
|
165
|
+
const assignments = table.tagAssignments ?? [];
|
|
166
|
+
if (assignments.length > 0) next[table.id] = assignments;
|
|
167
|
+
}
|
|
168
|
+
setTagsById(next);
|
|
169
|
+
} catch {
|
|
170
|
+
setTagsById({});
|
|
171
|
+
}
|
|
172
|
+
}, [limit]);
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
void fetchOverlay();
|
|
175
|
+
}, [fetchOverlay]);
|
|
176
|
+
return { tagsById, refetch: fetchOverlay };
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { FLUIDGRIDS_ENTITY_TYPES, tagLabel, useAvailableTags, useCreateTag, useDataTableTagOverlay, useDraftEntityTags, useEntityTags, useReplaceEntityTags, useSearchTags, useTagEntity, useUntagEntity };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NEW_WORKFLOW_NAV, firstWorkflowProgress, builderPathFor, GUIDED_FIRST_WORKFLOW_NAV } from './chunk-YGBDZ424.js';
|
|
2
|
-
import { useExecutions } from './chunk-
|
|
2
|
+
import { useExecutions } from './chunk-EZF3VWUB.js';
|
|
3
3
|
import { QuotaExhaustedDialog } from './chunk-SYVLFHWV.js';
|
|
4
4
|
import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton, SdkPermissionGate } from './chunk-ONVGFVNH.js';
|
|
5
|
-
import { useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-
|
|
5
|
+
import { useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-JVMZ3YU3.js';
|
|
6
6
|
import { workflowsListControls } from './chunk-D3UWK7GY.js';
|
|
7
7
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
8
8
|
import { useFlowStore } from './chunk-VI2RFS65.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { fetchAllNodeEndpointConfigs } from './chunk-
|
|
2
|
-
import { NodeEndpointConfigsDocument, NodeEndpointConfigDocument, NodeManifestDocument } from './chunk-
|
|
1
|
+
import { fetchAllNodeEndpointConfigs } from './chunk-AVJIWVHL.js';
|
|
2
|
+
import { NodeEndpointConfigsDocument, NodeEndpointConfigDocument, NodeManifestDocument } from './chunk-QEPYK454.js';
|
|
3
3
|
import { useTr } from './chunk-UULVIT25.js';
|
|
4
4
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
5
5
|
import { useMemo, useState, useCallback, useEffect } from 'react';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { validateDateRange } from './chunk-
|
|
1
|
+
import { validateDateRange } from './chunk-EZF3VWUB.js';
|
|
2
|
+
import { useAvailableTags } from './chunk-SOPYCZCR.js';
|
|
2
3
|
import { executionsControls } from './chunk-D3UWK7GY.js';
|
|
3
|
-
import { useExecutionsStore } from './chunk-
|
|
4
|
+
import { useExecutionsStore } from './chunk-CY6KX4RG.js';
|
|
4
5
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
5
6
|
import { useTr } from './chunk-UULVIT25.js';
|
|
6
7
|
import { Icon } from '@iconify/react';
|
|
@@ -248,6 +249,38 @@ function NodeStatusBadge({
|
|
|
248
249
|
}
|
|
249
250
|
);
|
|
250
251
|
}
|
|
252
|
+
function TagFilterSelect({
|
|
253
|
+
value,
|
|
254
|
+
onChange,
|
|
255
|
+
className
|
|
256
|
+
}) {
|
|
257
|
+
const tr = useTr();
|
|
258
|
+
const { availableTags } = useAvailableTags(200);
|
|
259
|
+
if (availableTags.length === 0 && !value) return null;
|
|
260
|
+
const label = tr("fluidgrids.tags.filterLabel", "Filter by tag");
|
|
261
|
+
return /* @__PURE__ */ jsxs(
|
|
262
|
+
"select",
|
|
263
|
+
{
|
|
264
|
+
"aria-label": label,
|
|
265
|
+
title: label,
|
|
266
|
+
value,
|
|
267
|
+
onChange: (event) => onChange(event.target.value),
|
|
268
|
+
className: `px-3 py-2 bg-bg-surface border border-border-default rounded-lg text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg scheme-normal dark:scheme-dark ${className ?? ""}`,
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ jsx("option", { value: "", className: "bg-bg-surface text-text-primary", children: tr("fluidgrids.tags.filterAll", "All tags") }),
|
|
271
|
+
availableTags.map((tag) => /* @__PURE__ */ jsx(
|
|
272
|
+
"option",
|
|
273
|
+
{
|
|
274
|
+
value: tag.id,
|
|
275
|
+
className: "bg-bg-surface text-text-primary",
|
|
276
|
+
children: tag.label || tag.key
|
|
277
|
+
},
|
|
278
|
+
tag.id
|
|
279
|
+
))
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
}
|
|
251
284
|
function ExecutionFilters({
|
|
252
285
|
workflows = [],
|
|
253
286
|
onRefresh
|
|
@@ -423,6 +456,7 @@ function ExecutionFilters({
|
|
|
423
456
|
setDurationFilter,
|
|
424
457
|
setErrorTypeFilter,
|
|
425
458
|
setNodeFilter,
|
|
459
|
+
setTagFilter,
|
|
426
460
|
resetFilters,
|
|
427
461
|
autoRefresh,
|
|
428
462
|
setAutoRefresh
|
|
@@ -479,7 +513,8 @@ function ExecutionFilters({
|
|
|
479
513
|
filter.durationMinSeconds !== null,
|
|
480
514
|
filter.durationMaxSeconds !== null,
|
|
481
515
|
filter.errorType !== "all",
|
|
482
|
-
filter.nodeId !== ""
|
|
516
|
+
filter.nodeId !== "",
|
|
517
|
+
filter.tagId !== ""
|
|
483
518
|
].filter(Boolean).length;
|
|
484
519
|
const assistantControls = useMemo(
|
|
485
520
|
() => executionsControls({
|
|
@@ -594,6 +629,14 @@ function ExecutionFilters({
|
|
|
594
629
|
]
|
|
595
630
|
}
|
|
596
631
|
),
|
|
632
|
+
/* @__PURE__ */ jsx(
|
|
633
|
+
TagFilterSelect,
|
|
634
|
+
{
|
|
635
|
+
value: filter.tagId,
|
|
636
|
+
onChange: setTagFilter,
|
|
637
|
+
className: "max-w-[200px]"
|
|
638
|
+
}
|
|
639
|
+
),
|
|
597
640
|
/* @__PURE__ */ jsx(
|
|
598
641
|
"select",
|
|
599
642
|
{
|
|
@@ -2677,4 +2720,4 @@ function Pagination({
|
|
|
2677
2720
|
] });
|
|
2678
2721
|
}
|
|
2679
2722
|
|
|
2680
|
-
export { ExecutionCards, ExecutionFilters, ExecutionStats, ExecutionStatusBadge, ExecutionTable, ExecutionTimeline, NodeTimeline, Pagination, RunLogViewer, buildNodeDisplayMap, formatRunVersion };
|
|
2723
|
+
export { ExecutionCards, ExecutionFilters, ExecutionStats, ExecutionStatusBadge, ExecutionTable, ExecutionTimeline, NodeTimeline, Pagination, RunLogViewer, TagFilterSelect, buildNodeDisplayMap, formatRunVersion };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { config, getFluidGridsConfig, getGraphQLEndpoint, resetFluidGridsConfig, resetFluidGridsExecutionState, setFluidGridsConfig, validateTrustedOrigin } from './chunk-
|
|
1
|
+
export { config, getFluidGridsConfig, getGraphQLEndpoint, resetFluidGridsConfig, resetFluidGridsExecutionState, setFluidGridsConfig, validateTrustedOrigin } from './chunk-CY6KX4RG.js';
|
package/dist/executions.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import './chunk-AD3BXTJS.js';
|
|
2
|
-
export { ExecutionsListPage } from './chunk-
|
|
3
|
-
export { ExecutionDetailPage } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
2
|
+
export { ExecutionsListPage } from './chunk-6TBLBRKJ.js';
|
|
3
|
+
export { ExecutionDetailPage } from './chunk-G7RP3WRM.js';
|
|
4
|
+
import './chunk-ZKCLX2VR.js';
|
|
5
|
+
import './chunk-EZF3VWUB.js';
|
|
6
6
|
import './chunk-QBFAJNUC.js';
|
|
7
|
+
import './chunk-GO4UTLV4.js';
|
|
7
8
|
import './chunk-ONVGFVNH.js';
|
|
8
9
|
import './chunk-JL7CASN5.js';
|
|
9
|
-
import './chunk-
|
|
10
|
+
import './chunk-SOPYCZCR.js';
|
|
11
|
+
import './chunk-JVMZ3YU3.js';
|
|
10
12
|
import './chunk-D3UWK7GY.js';
|
|
11
|
-
import './chunk-
|
|
13
|
+
import './chunk-CY6KX4RG.js';
|
|
12
14
|
import './chunk-PJAWNFJV.js';
|
|
13
|
-
import './chunk-
|
|
15
|
+
import './chunk-QEPYK454.js';
|
|
14
16
|
import './chunk-4UAWCWS7.js';
|
|
15
17
|
import './chunk-UULVIT25.js';
|
|
16
18
|
import './chunk-NTWG3CJX.js';
|
package/dist/history.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { HistoryPage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { HistoryPage } from './chunk-RKST2IRQ.js';
|
|
2
|
+
import './chunk-JVMZ3YU3.js';
|
|
3
3
|
import './chunk-D3UWK7GY.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-CY6KX4RG.js';
|
|
5
5
|
import './chunk-PJAWNFJV.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-QEPYK454.js';
|
|
7
7
|
import './chunk-4UAWCWS7.js';
|
|
8
8
|
import './chunk-UULVIT25.js';
|
|
9
9
|
import './chunk-NTWG3CJX.js';
|