@acmekit/dashboard 2.13.35 → 2.13.37
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/{api-key-management-create-U37VC624.mjs → api-key-management-create-4AG76FJV.mjs} +3 -3
- package/dist/{api-key-management-detail-ZYKL4ATI.mjs → api-key-management-detail-T2TB4KST.mjs} +10 -10
- package/dist/{api-key-management-edit-TSZGMIBL.mjs → api-key-management-edit-R44OHS7B.mjs} +3 -3
- package/dist/{api-key-management-list-HCJFJWWB.mjs → api-key-management-list-QK4Q7Y5I.mjs} +3 -3
- package/dist/app.css +0 -31
- package/dist/app.js +1386 -3726
- package/dist/app.mjs +38 -240
- package/dist/{chunk-VEI6HW6L.mjs → chunk-2U3RK3JG.mjs} +5 -3
- package/dist/{chunk-FKTMBR44.mjs → chunk-DN3MIYQH.mjs} +1 -1
- package/dist/{chunk-7F3CWXUH.mjs → chunk-DQCEH3X2.mjs} +1 -1
- package/dist/{chunk-YKIWIMJX.mjs → chunk-DTY37DDZ.mjs} +0 -1
- package/dist/{chunk-PFZQYK7R.mjs → chunk-EFRMWHRX.mjs} +1 -1
- package/dist/{chunk-5IEHCYJO.mjs → chunk-GBFVWROS.mjs} +1 -1
- package/dist/chunk-LKWTBYYC.mjs +35 -0
- package/dist/chunk-RPAL6FHW.mjs +73 -0
- package/dist/{chunk-WLRJXEKL.mjs → chunk-ST2YB7JN.mjs} +1 -1
- package/dist/{chunk-XIP35KXF.mjs → chunk-ULSPL3DR.mjs} +1 -1
- package/dist/{chunk-SYACY6AL.mjs → chunk-XIM7X4FB.mjs} +1 -1
- package/dist/{chunk-HHPPTD3B.mjs → chunk-YRWSG3YM.mjs} +1 -1
- package/dist/en.json +3 -132
- package/dist/{invite-3JSNOA2B.mjs → invite-XGPZZBUP.mjs} +3 -3
- package/dist/{login-BEJ5EFGE.mjs → login-GNP3QIPI.mjs} +9 -9
- package/dist/{profile-detail-QVTJC4JC.mjs → profile-detail-YX27F7N6.mjs} +3 -3
- package/dist/{profile-edit-MIO62TWH.mjs → profile-edit-2VRDU75O.mjs} +3 -3
- package/dist/{reset-password-BN4KAJQL.mjs → reset-password-TWRNZO6Z.mjs} +2 -2
- package/dist/{settings-GH5IWXHE.mjs → settings-3XWLL5LG.mjs} +3 -3
- package/dist/{translation-list-JA22BUKN.mjs → translation-list-CCEQJNED.mjs} +10 -10
- package/dist/{translations-edit-STTMANVT.mjs → translations-edit-E57GVUFV.mjs} +11 -11
- package/dist/{user-detail-WCXBFRGS.mjs → user-detail-KUSRRVNX.mjs} +3 -3
- package/dist/{user-edit-XDVMJOS4.mjs → user-edit-HTN3ZGCL.mjs} +3 -3
- package/dist/{user-invite-73ZDSDFC.mjs → user-invite-E3FAAU3V.mjs} +3 -3
- package/dist/{user-list-MPJXE3CA.mjs → user-list-KNJ5S3IM.mjs} +5 -5
- package/dist/{user-metadata-ADNTL3LT.mjs → user-metadata-5GQK75DT.mjs} +10 -10
- package/dist/workflow-execution-detail-5O5VCXL3.mjs +870 -0
- package/dist/workflow-execution-list-DETG4MRT.mjs +347 -0
- package/package.json +9 -9
- package/src/components/layout/main-layout/main-layout.tsx +1 -28
- package/src/dashboard-app/routes/get-route.map.tsx +0 -71
- package/src/hooks/api/workflow-executions.tsx +1 -145
- package/src/i18n/translations/$schema.json +4 -534
- package/src/i18n/translations/en.json +3 -132
- package/src/routes/workflow-executions/constants.ts +0 -16
- package/src/routes/workflow-executions/utils.ts +14 -170
- package/src/routes/workflow-executions/workflow-execution-detail/breadcrumb.tsx +1 -7
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx +6 -157
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx +6 -122
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +1 -7
- package/src/routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx +1 -46
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx +0 -7
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-filters.tsx +1 -7
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx +2 -4
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx +1 -17
- package/src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx +1 -1
- package/dist/chunk-A7ULKHDE.mjs +0 -126
- package/dist/chunk-GBPAZAJK.mjs +0 -34
- package/dist/chunk-LP6CPB7N.mjs +0 -213
- package/dist/workflow-analytics-4WCI4ODQ.mjs +0 -152
- package/dist/workflow-definition-detail-GI6CFBMG.mjs +0 -94
- package/dist/workflow-definition-list-GF3XAEPS.mjs +0 -142
- package/dist/workflow-execution-complete-step-WSRLO572.mjs +0 -245
- package/dist/workflow-execution-detail-3RH6EQSS.mjs +0 -1411
- package/dist/workflow-execution-list-AQEGAME4.mjs +0 -596
- package/dist/workflow-execution-rerun-WCYLYL3Q.mjs +0 -138
- package/dist/workflow-execution-run-MWN5KWNY.mjs +0 -135
- package/dist/workflow-scheduled-list-ZPXR7CZM.mjs +0 -174
- package/src/hooks/api/workflow-definitions.tsx +0 -79
- package/src/hooks/api/workflow-metrics.tsx +0 -48
- package/src/hooks/use-workflow-sse.tsx +0 -78
- package/src/routes/workflow-analytics/workflow-analytics.tsx +0 -167
- package/src/routes/workflow-definitions/workflow-definition-detail/workflow-definition-detail.tsx +0 -98
- package/src/routes/workflow-definitions/workflow-definition-list/components/workflow-definition-list-table/use-workflow-definition-table-columns.tsx +0 -78
- package/src/routes/workflow-definitions/workflow-definition-list/components/workflow-definition-list-table/workflow-definition-list-table.tsx +0 -65
- package/src/routes/workflow-definitions/workflow-definition-list/workflow-definition-list.tsx +0 -15
- package/src/routes/workflow-executions/workflow-execution-complete-step/workflow-execution-complete-step.tsx +0 -270
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-action-bar/index.ts +0 -1
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-action-bar/workflow-execution-action-bar.tsx +0 -212
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-error-card/index.ts +0 -1
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-error-card/workflow-execution-error-card.tsx +0 -59
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-waiting-banner/index.ts +0 -1
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-waiting-banner/workflow-execution-waiting-banner.tsx +0 -63
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-auto-refresh.tsx +0 -73
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-row-actions.tsx +0 -116
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-saved-views.tsx +0 -84
- package/src/routes/workflow-executions/workflow-execution-rerun/workflow-execution-rerun.tsx +0 -159
- package/src/routes/workflow-executions/workflow-execution-run/workflow-execution-run.tsx +0 -139
- package/src/routes/workflow-scheduled/workflow-scheduled-list.tsx +0 -269
- /package/dist/{chunk-RISX76YT.mjs → chunk-22YYMH6M.mjs} +0 -0
|
@@ -1,140 +1,24 @@
|
|
|
1
1
|
import { HttpTypes } from "@acmekit/types"
|
|
2
|
-
import { Button, Container, Heading, Tabs, toast } from "@acmekit/ui"
|
|
3
|
-
import { useState } from "react"
|
|
4
|
-
import { useTranslation } from "react-i18next"
|
|
5
2
|
import { JsonViewSection } from "../../../../../components/common/json-view-section"
|
|
6
3
|
|
|
7
4
|
type WorkflowExecutionPayloadSectionProps = {
|
|
8
5
|
execution: HttpTypes.AdminWorkflowExecution
|
|
9
6
|
}
|
|
10
7
|
|
|
11
|
-
function downloadJson(data: unknown, filename: string) {
|
|
12
|
-
const blob = new Blob([JSON.stringify(data, null, 2)], {
|
|
13
|
-
type: "application/json",
|
|
14
|
-
})
|
|
15
|
-
const url = URL.createObjectURL(blob)
|
|
16
|
-
const a = document.createElement("a")
|
|
17
|
-
a.href = url
|
|
18
|
-
a.download = filename
|
|
19
|
-
a.click()
|
|
20
|
-
URL.revokeObjectURL(url)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
8
|
export const WorkflowExecutionPayloadSection = ({
|
|
24
9
|
execution,
|
|
25
10
|
}: WorkflowExecutionPayloadSectionProps) => {
|
|
26
|
-
const { t } = useTranslation()
|
|
27
|
-
|
|
28
11
|
let payload = execution.context?.data?.payload
|
|
29
|
-
if (payload && typeof payload !== "object") {
|
|
30
|
-
payload = { input: payload }
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const checkpoint = execution.context || {}
|
|
34
|
-
const errors = (execution as any).context?.errors || []
|
|
35
|
-
|
|
36
|
-
const stepOutputs: Record<string, unknown> = {}
|
|
37
|
-
const steps = execution?.execution?.steps || {}
|
|
38
|
-
for (const [stepId, step] of Object.entries(steps)) {
|
|
39
|
-
if (stepId === "_root") continue
|
|
40
|
-
const output = (step as any)?.invoke?.output
|
|
41
|
-
if (output !== undefined) {
|
|
42
|
-
stepOutputs[stepId] = output
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const hasPayload = !!payload
|
|
47
|
-
const hasStepOutputs = Object.keys(stepOutputs).length > 0
|
|
48
|
-
const hasErrors = errors.length > 0
|
|
49
12
|
|
|
50
|
-
|
|
51
|
-
const [activeTab, setActiveTab] = useState(defaultTab)
|
|
52
|
-
|
|
53
|
-
if (!hasPayload && !hasStepOutputs && !hasErrors) {
|
|
13
|
+
if (!payload) {
|
|
54
14
|
return null
|
|
55
15
|
}
|
|
56
16
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
? checkpoint
|
|
62
|
-
: activeTab === "outputs"
|
|
63
|
-
? stepOutputs
|
|
64
|
-
: errors
|
|
65
|
-
|
|
66
|
-
const handleCopyAll = () => {
|
|
67
|
-
navigator.clipboard.writeText(JSON.stringify(activeData, null, 2))
|
|
68
|
-
toast.success("Copied to clipboard")
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const handleDownload = () => {
|
|
72
|
-
downloadJson(
|
|
73
|
-
activeData,
|
|
74
|
-
`${execution.workflow_id}-${activeTab}.json`
|
|
75
|
-
)
|
|
17
|
+
// payloads may be a primitive, so we need to wrap them in an object
|
|
18
|
+
// to ensure the JsonViewSection component can render them.
|
|
19
|
+
if (typeof payload !== "object") {
|
|
20
|
+
payload = { input: payload }
|
|
76
21
|
}
|
|
77
22
|
|
|
78
|
-
return
|
|
79
|
-
<Container className="divide-y p-0">
|
|
80
|
-
<div className="flex items-center justify-between px-6 py-4">
|
|
81
|
-
<Heading level="h2">
|
|
82
|
-
{t("workflowExecutions.payload.inputPayload")}
|
|
83
|
-
</Heading>
|
|
84
|
-
<div className="flex items-center gap-x-2">
|
|
85
|
-
<Button size="small" variant="transparent" onClick={handleCopyAll}>
|
|
86
|
-
{t("workflowExecutions.payload.copyAll")}
|
|
87
|
-
</Button>
|
|
88
|
-
<Button size="small" variant="transparent" onClick={handleDownload}>
|
|
89
|
-
{t("workflowExecutions.payload.downloadJson")}
|
|
90
|
-
</Button>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
<Tabs
|
|
94
|
-
value={activeTab}
|
|
95
|
-
onValueChange={setActiveTab}
|
|
96
|
-
>
|
|
97
|
-
<div className="border-ui-border-base border-b px-6">
|
|
98
|
-
<Tabs.List>
|
|
99
|
-
{hasPayload && (
|
|
100
|
-
<Tabs.Trigger value="input">
|
|
101
|
-
{t("workflowExecutions.payload.inputPayload")}
|
|
102
|
-
</Tabs.Trigger>
|
|
103
|
-
)}
|
|
104
|
-
<Tabs.Trigger value="checkpoint">
|
|
105
|
-
{t("workflowExecutions.payload.fullCheckpoint")}
|
|
106
|
-
</Tabs.Trigger>
|
|
107
|
-
{hasStepOutputs && (
|
|
108
|
-
<Tabs.Trigger value="outputs">
|
|
109
|
-
{t("workflowExecutions.payload.stepOutputs")}
|
|
110
|
-
</Tabs.Trigger>
|
|
111
|
-
)}
|
|
112
|
-
{hasErrors && (
|
|
113
|
-
<Tabs.Trigger value="errors">
|
|
114
|
-
{t("workflowExecutions.payload.errors")}
|
|
115
|
-
</Tabs.Trigger>
|
|
116
|
-
)}
|
|
117
|
-
</Tabs.List>
|
|
118
|
-
</div>
|
|
119
|
-
{hasPayload && (
|
|
120
|
-
<Tabs.Content value="input" className="p-0">
|
|
121
|
-
<JsonViewSection data={payload as object} />
|
|
122
|
-
</Tabs.Content>
|
|
123
|
-
)}
|
|
124
|
-
<Tabs.Content value="checkpoint" className="p-0">
|
|
125
|
-
<JsonViewSection data={checkpoint as object} />
|
|
126
|
-
</Tabs.Content>
|
|
127
|
-
{hasStepOutputs && (
|
|
128
|
-
<Tabs.Content value="outputs" className="p-0">
|
|
129
|
-
<JsonViewSection data={stepOutputs} />
|
|
130
|
-
</Tabs.Content>
|
|
131
|
-
)}
|
|
132
|
-
{hasErrors && (
|
|
133
|
-
<Tabs.Content value="errors" className="p-0">
|
|
134
|
-
<JsonViewSection data={errors as object} />
|
|
135
|
-
</Tabs.Content>
|
|
136
|
-
)}
|
|
137
|
-
</Tabs>
|
|
138
|
-
</Container>
|
|
139
|
-
)
|
|
23
|
+
return <JsonViewSection data={payload as object} />
|
|
140
24
|
}
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
STEP_OK_STATES,
|
|
19
19
|
STEP_SKIPPED_STATES,
|
|
20
20
|
} from "../../../constants"
|
|
21
|
-
import { TransactionStepState } from "../../../types"
|
|
22
21
|
import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
|
|
23
22
|
|
|
24
23
|
type WorkflowExecutionTimelineSectionProps = {
|
|
@@ -399,8 +398,6 @@ const Node = ({ step }: { step: HttpTypes.AdminWorkflowExecutionStep }) => {
|
|
|
399
398
|
}, 100)
|
|
400
399
|
}
|
|
401
400
|
|
|
402
|
-
const isInvoking = step.invoke.state === TransactionStepState.INVOKING
|
|
403
|
-
|
|
404
401
|
return (
|
|
405
402
|
<Link
|
|
406
403
|
to={`#${stepId}`}
|
|
@@ -408,10 +405,7 @@ const Node = ({ step }: { step: HttpTypes.AdminWorkflowExecutionStep }) => {
|
|
|
408
405
|
className="focus-visible:shadow-borders-focus transition-fg rounded-md outline-none"
|
|
409
406
|
>
|
|
410
407
|
<div
|
|
411
|
-
className=
|
|
412
|
-
"bg-ui-bg-base shadow-borders-base flex min-w-[120px] items-center gap-x-0.5 rounded-md p-0.5",
|
|
413
|
-
{ "animate-pulse": isInvoking }
|
|
414
|
-
)}
|
|
408
|
+
className="bg-ui-bg-base shadow-borders-base flex min-w-[120px] items-center gap-x-0.5 rounded-md p-0.5"
|
|
415
409
|
data-step-id={step.id}
|
|
416
410
|
>
|
|
417
411
|
<div className="flex size-5 items-center justify-center">
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
import { useParams } from "react-router-dom"
|
|
2
|
-
import { useQueryClient } from "@tanstack/react-query"
|
|
3
2
|
|
|
4
3
|
import { SingleColumnPageSkeleton } from "../../../components/common/skeleton"
|
|
5
4
|
import { SingleColumnPage } from "../../../components/layout/pages"
|
|
6
|
-
import {
|
|
7
|
-
useWorkflowExecution,
|
|
8
|
-
workflowExecutionsQueryKeys,
|
|
9
|
-
} from "../../../hooks/api/workflow-executions"
|
|
5
|
+
import { useWorkflowExecution } from "../../../hooks/api/workflow-executions"
|
|
10
6
|
import { useExtension } from "../../../providers/extension-provider"
|
|
11
|
-
import { useWorkflowSSE } from "../../../hooks/use-workflow-sse"
|
|
12
|
-
import { TRANSACTION_ACTIVE_STATES } from "../constants"
|
|
13
|
-
import { TransactionState } from "../types"
|
|
14
|
-
import { isTerminalState, mergeStepEvent } from "../utils"
|
|
15
|
-
import { WorkflowExecutionActionBar } from "./components/workflow-execution-action-bar"
|
|
16
|
-
import { WorkflowExecutionErrorCard } from "./components/workflow-execution-error-card"
|
|
17
|
-
import { WorkflowExecutionWaitingBanner } from "./components/workflow-execution-waiting-banner"
|
|
18
7
|
import { WorkflowExecutionGeneralSection } from "./components/workflow-execution-general-section"
|
|
19
8
|
import { WorkflowExecutionHistorySection } from "./components/workflow-execution-history-section"
|
|
20
9
|
import { WorkflowExecutionPayloadSection } from "./components/workflow-execution-payload-section"
|
|
@@ -22,42 +11,12 @@ import { WorkflowExecutionTimelineSection } from "./components/workflow-executio
|
|
|
22
11
|
|
|
23
12
|
export const ExecutionDetail = () => {
|
|
24
13
|
const { id } = useParams()
|
|
25
|
-
const queryClient = useQueryClient()
|
|
26
14
|
|
|
27
15
|
const { workflow_execution, isLoading, isError, error } =
|
|
28
16
|
useWorkflowExecution(id!)
|
|
29
17
|
|
|
30
18
|
const { getWidgets } = useExtension()
|
|
31
19
|
|
|
32
|
-
const isActive = workflow_execution
|
|
33
|
-
? TRANSACTION_ACTIVE_STATES.includes(
|
|
34
|
-
workflow_execution.state as TransactionState
|
|
35
|
-
)
|
|
36
|
-
: false
|
|
37
|
-
|
|
38
|
-
useWorkflowSSE(workflow_execution?.workflow_id || "", {
|
|
39
|
-
enabled: isActive && !!workflow_execution?.workflow_id,
|
|
40
|
-
onEvent: (event) => {
|
|
41
|
-
queryClient.setQueryData(
|
|
42
|
-
workflowExecutionsQueryKeys.detail(id!),
|
|
43
|
-
(current: any) => {
|
|
44
|
-
if (!current) return current
|
|
45
|
-
return mergeStepEvent(current, event)
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
event.event_type === "onFinish" ||
|
|
51
|
-
(event.response?.state &&
|
|
52
|
-
isTerminalState(event.response.state as TransactionState))
|
|
53
|
-
) {
|
|
54
|
-
queryClient.invalidateQueries({
|
|
55
|
-
queryKey: workflowExecutionsQueryKeys.detail(id!),
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
})
|
|
60
|
-
|
|
61
20
|
if (isLoading || !workflow_execution) {
|
|
62
21
|
return <SingleColumnPageSkeleton sections={4} showJSON />
|
|
63
22
|
}
|
|
@@ -74,11 +33,7 @@ export const ExecutionDetail = () => {
|
|
|
74
33
|
}}
|
|
75
34
|
data={workflow_execution}
|
|
76
35
|
showJSON
|
|
77
|
-
hasOutlet
|
|
78
36
|
>
|
|
79
|
-
<WorkflowExecutionActionBar execution={workflow_execution} />
|
|
80
|
-
<WorkflowExecutionErrorCard execution={workflow_execution} />
|
|
81
|
-
<WorkflowExecutionWaitingBanner execution={workflow_execution} />
|
|
82
37
|
<WorkflowExecutionGeneralSection execution={workflow_execution} />
|
|
83
38
|
<WorkflowExecutionTimelineSection execution={workflow_execution} />
|
|
84
39
|
<WorkflowExecutionPayloadSection execution={workflow_execution} />
|
|
@@ -7,7 +7,6 @@ import { TransactionStepState } from "../../../types"
|
|
|
7
7
|
import { getTransactionState, getTransactionStateColor } from "../../../utils"
|
|
8
8
|
import { HttpTypes } from "@acmekit/types"
|
|
9
9
|
import { DataTableStatusCell } from "../../../../../components/data-table/components/data-table-status-cell/data-table-status-cell"
|
|
10
|
-
import { WorkflowExecutionRowActions } from "./workflow-execution-row-actions"
|
|
11
10
|
|
|
12
11
|
const columnHelper =
|
|
13
12
|
createColumnHelper<
|
|
@@ -187,12 +186,6 @@ export const useWorkflowExecutionTableColumns = (): ColumnDef<
|
|
|
187
186
|
return <DateCell date={date} />
|
|
188
187
|
},
|
|
189
188
|
}),
|
|
190
|
-
columnHelper.display({
|
|
191
|
-
id: "actions",
|
|
192
|
-
cell: ({ row }) => (
|
|
193
|
-
<WorkflowExecutionRowActions execution={row.original} />
|
|
194
|
-
),
|
|
195
|
-
}),
|
|
196
189
|
],
|
|
197
190
|
[t]
|
|
198
191
|
)
|
|
@@ -52,12 +52,6 @@ export const useWorkflowExecutionTableFilters = (): Filter[] => {
|
|
|
52
52
|
{ key: "updated_at", label: t("fields.updatedAt"), type: "date" },
|
|
53
53
|
]
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
key: "workflow_id",
|
|
57
|
-
label: t("workflowExecutions.workflowIdLabel"),
|
|
58
|
-
type: "string",
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return [stateFilter, workflowIdFilter, ...dateFilters]
|
|
55
|
+
return [stateFilter, ...dateFilters]
|
|
62
56
|
}
|
|
63
57
|
|
|
@@ -9,19 +9,17 @@ export const useWorkflowExecutionTableQuery = ({
|
|
|
9
9
|
prefix?: string
|
|
10
10
|
}) => {
|
|
11
11
|
const raw = useQueryParams(
|
|
12
|
-
["q", "offset", "order", "state", "
|
|
12
|
+
["q", "offset", "order", "state", "created_at", "updated_at"],
|
|
13
13
|
prefix
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
const { offset, order, state,
|
|
17
|
-
raw
|
|
16
|
+
const { offset, order, state, created_at, updated_at, ...rest } = raw
|
|
18
17
|
|
|
19
18
|
const searchParams: HttpTypes.AdminGetWorkflowExecutionsParams = {
|
|
20
19
|
limit: pageSize,
|
|
21
20
|
offset: offset ? parseInt(offset) : 0,
|
|
22
21
|
order: order ?? "-created_at",
|
|
23
22
|
state: state ? state.split(",") : undefined,
|
|
24
|
-
workflow_id: workflow_id ? workflow_id.split(",") : undefined,
|
|
25
23
|
created_at: created_at ? JSON.parse(created_at) : undefined,
|
|
26
24
|
updated_at: updated_at ? JSON.parse(updated_at) : undefined,
|
|
27
25
|
...rest,
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button, Container, Heading, Text } from "@acmekit/ui"
|
|
1
|
+
import { Container, Heading, Text } from "@acmekit/ui"
|
|
3
2
|
import { keepPreviousData } from "@tanstack/react-query"
|
|
4
3
|
import { useTranslation } from "react-i18next"
|
|
5
|
-
import { Link } from "react-router-dom"
|
|
6
4
|
import { _DataTable } from "../../../../../components/table/data-table"
|
|
7
5
|
import { useWorkflowExecutions } from "../../../../../hooks/api/workflow-executions"
|
|
8
6
|
import { useDataTable } from "../../../../../hooks/use-data-table"
|
|
9
|
-
import { WorkflowExecutionAutoRefresh } from "./workflow-execution-auto-refresh"
|
|
10
|
-
import { WorkflowExecutionSavedViews } from "./workflow-execution-saved-views"
|
|
11
7
|
import { useWorkflowExecutionTableColumns } from "./use-workflow-execution-table-columns"
|
|
12
8
|
import { useWorkflowExecutionTableFilters } from "./use-workflow-execution-table-filters"
|
|
13
9
|
import { useWorkflowExecutionTableQuery } from "./use-workflow-execution-table-query"
|
|
@@ -56,18 +52,6 @@ export const WorkflowExecutionListTable = () => {
|
|
|
56
52
|
{t(`workflowExecutions.subtitle`)}
|
|
57
53
|
</Text>
|
|
58
54
|
</div>
|
|
59
|
-
<div className="flex items-center gap-x-2">
|
|
60
|
-
<WorkflowExecutionAutoRefresh />
|
|
61
|
-
<Button variant="secondary" size="small" asChild>
|
|
62
|
-
<Link to="run">
|
|
63
|
-
<PlayMiniSolid className="mr-1" />
|
|
64
|
-
{t("workflowExecutions.actions.runWorkflow")}
|
|
65
|
-
</Link>
|
|
66
|
-
</Button>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div className="border-ui-border-base border-b px-6 py-2">
|
|
70
|
-
<WorkflowExecutionSavedViews />
|
|
71
55
|
</div>
|
|
72
56
|
<_DataTable
|
|
73
57
|
table={table}
|
package/dist/chunk-A7ULKHDE.mjs
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryClient
|
|
3
|
-
} from "./chunk-FXYH54JP.mjs";
|
|
4
|
-
import {
|
|
5
|
-
queryKeysFactory
|
|
6
|
-
} from "./chunk-774WSTCC.mjs";
|
|
7
|
-
import {
|
|
8
|
-
sdk
|
|
9
|
-
} from "./chunk-YKIWIMJX.mjs";
|
|
10
|
-
|
|
11
|
-
// src/hooks/api/workflow-executions.tsx
|
|
12
|
-
import {
|
|
13
|
-
useMutation,
|
|
14
|
-
useQuery
|
|
15
|
-
} from "@tanstack/react-query";
|
|
16
|
-
var WORKFLOW_EXECUTIONS_QUERY_KEY = "workflow_executions";
|
|
17
|
-
var workflowExecutionsQueryKeys = queryKeysFactory(
|
|
18
|
-
WORKFLOW_EXECUTIONS_QUERY_KEY
|
|
19
|
-
);
|
|
20
|
-
var useWorkflowExecutions = (query, options) => {
|
|
21
|
-
const { data, ...rest } = useQuery({
|
|
22
|
-
queryFn: () => sdk.admin.workflowExecution.list(query),
|
|
23
|
-
queryKey: workflowExecutionsQueryKeys.list(query),
|
|
24
|
-
...options
|
|
25
|
-
});
|
|
26
|
-
return { ...data, ...rest };
|
|
27
|
-
};
|
|
28
|
-
var useWorkflowExecution = (id, options) => {
|
|
29
|
-
const { data, ...rest } = useQuery({
|
|
30
|
-
queryFn: () => sdk.admin.workflowExecution.retrieve(id),
|
|
31
|
-
queryKey: workflowExecutionsQueryKeys.detail(id),
|
|
32
|
-
...options
|
|
33
|
-
});
|
|
34
|
-
return { ...data, ...rest };
|
|
35
|
-
};
|
|
36
|
-
var useRunWorkflow = (workflowId, options) => {
|
|
37
|
-
return useMutation({
|
|
38
|
-
mutationFn: (payload) => sdk.admin.workflowExecution.run(workflowId, payload),
|
|
39
|
-
onSuccess: (data, variables, context) => {
|
|
40
|
-
queryClient.invalidateQueries({
|
|
41
|
-
queryKey: workflowExecutionsQueryKeys.lists()
|
|
42
|
-
});
|
|
43
|
-
options?.onSuccess?.(data, variables, context);
|
|
44
|
-
},
|
|
45
|
-
...options
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
var useCancelWorkflowExecution = (workflowId, transactionId, options) => {
|
|
49
|
-
return useMutation({
|
|
50
|
-
mutationFn: (payload) => sdk.admin.workflowExecution.cancel(
|
|
51
|
-
workflowId,
|
|
52
|
-
transactionId,
|
|
53
|
-
payload || {}
|
|
54
|
-
),
|
|
55
|
-
onSuccess: (data, variables, context) => {
|
|
56
|
-
queryClient.invalidateQueries({
|
|
57
|
-
queryKey: workflowExecutionsQueryKeys.lists()
|
|
58
|
-
});
|
|
59
|
-
queryClient.invalidateQueries({
|
|
60
|
-
queryKey: workflowExecutionsQueryKeys.details()
|
|
61
|
-
});
|
|
62
|
-
options?.onSuccess?.(data, variables, context);
|
|
63
|
-
},
|
|
64
|
-
...options
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
var useRetryStep = (workflowId, transactionId, options) => {
|
|
68
|
-
return useMutation({
|
|
69
|
-
mutationFn: (payload) => sdk.admin.workflowExecution.retryStep(
|
|
70
|
-
workflowId,
|
|
71
|
-
transactionId,
|
|
72
|
-
payload
|
|
73
|
-
),
|
|
74
|
-
onSuccess: (data, variables, context) => {
|
|
75
|
-
queryClient.invalidateQueries({
|
|
76
|
-
queryKey: workflowExecutionsQueryKeys.lists()
|
|
77
|
-
});
|
|
78
|
-
queryClient.invalidateQueries({
|
|
79
|
-
queryKey: workflowExecutionsQueryKeys.details()
|
|
80
|
-
});
|
|
81
|
-
options?.onSuccess?.(data, variables, context);
|
|
82
|
-
},
|
|
83
|
-
...options
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
var useSetStepSuccess = (workflowId, options) => {
|
|
87
|
-
return useMutation({
|
|
88
|
-
mutationFn: (payload) => sdk.admin.workflowExecution.setStepSuccess(workflowId, payload),
|
|
89
|
-
onSuccess: (data, variables, context) => {
|
|
90
|
-
queryClient.invalidateQueries({
|
|
91
|
-
queryKey: workflowExecutionsQueryKeys.lists()
|
|
92
|
-
});
|
|
93
|
-
queryClient.invalidateQueries({
|
|
94
|
-
queryKey: workflowExecutionsQueryKeys.details()
|
|
95
|
-
});
|
|
96
|
-
options?.onSuccess?.(data, variables, context);
|
|
97
|
-
},
|
|
98
|
-
...options
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
var useSetStepFailure = (workflowId, options) => {
|
|
102
|
-
return useMutation({
|
|
103
|
-
mutationFn: (payload) => sdk.admin.workflowExecution.setStepFailure(workflowId, payload),
|
|
104
|
-
onSuccess: (data, variables, context) => {
|
|
105
|
-
queryClient.invalidateQueries({
|
|
106
|
-
queryKey: workflowExecutionsQueryKeys.lists()
|
|
107
|
-
});
|
|
108
|
-
queryClient.invalidateQueries({
|
|
109
|
-
queryKey: workflowExecutionsQueryKeys.details()
|
|
110
|
-
});
|
|
111
|
-
options?.onSuccess?.(data, variables, context);
|
|
112
|
-
},
|
|
113
|
-
...options
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export {
|
|
118
|
-
workflowExecutionsQueryKeys,
|
|
119
|
-
useWorkflowExecutions,
|
|
120
|
-
useWorkflowExecution,
|
|
121
|
-
useRunWorkflow,
|
|
122
|
-
useCancelWorkflowExecution,
|
|
123
|
-
useRetryStep,
|
|
124
|
-
useSetStepSuccess,
|
|
125
|
-
useSetStepFailure
|
|
126
|
-
};
|
package/dist/chunk-GBPAZAJK.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryKeysFactory
|
|
3
|
-
} from "./chunk-774WSTCC.mjs";
|
|
4
|
-
import {
|
|
5
|
-
sdk
|
|
6
|
-
} from "./chunk-YKIWIMJX.mjs";
|
|
7
|
-
|
|
8
|
-
// src/hooks/api/workflow-definitions.tsx
|
|
9
|
-
import { useQuery } from "@tanstack/react-query";
|
|
10
|
-
var WORKFLOW_DEFINITIONS_QUERY_KEY = "workflow_definitions";
|
|
11
|
-
var workflowDefinitionsQueryKeys = queryKeysFactory(
|
|
12
|
-
WORKFLOW_DEFINITIONS_QUERY_KEY
|
|
13
|
-
);
|
|
14
|
-
var useWorkflowDefinitions = (query, options) => {
|
|
15
|
-
const { data, ...rest } = useQuery({
|
|
16
|
-
queryFn: () => sdk.admin.workflowDefinition.list(query),
|
|
17
|
-
queryKey: workflowDefinitionsQueryKeys.list(query),
|
|
18
|
-
...options
|
|
19
|
-
});
|
|
20
|
-
return { ...data, ...rest };
|
|
21
|
-
};
|
|
22
|
-
var useWorkflowDefinition = (id, options) => {
|
|
23
|
-
const { data, ...rest } = useQuery({
|
|
24
|
-
queryFn: () => sdk.admin.workflowDefinition.retrieve(id),
|
|
25
|
-
queryKey: workflowDefinitionsQueryKeys.detail(id),
|
|
26
|
-
...options
|
|
27
|
-
});
|
|
28
|
-
return { ...data, ...rest };
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
useWorkflowDefinitions,
|
|
33
|
-
useWorkflowDefinition
|
|
34
|
-
};
|