@evenicanpm/admin-integrate 1.2.0 → 1.3.0
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/documents/ConfigImport/configuration-import.ts +54 -0
- package/documents/CopyProcess/copy.ts +25 -0
- package/documents/Endpoint/fragments.ts +9 -0
- package/documents/Endpoint/list.ts +22 -0
- package/documents/Process/fragments.ts +35 -0
- package/documents/Process/get-process-details.ts +73 -0
- package/documents/Process/list.ts +51 -0
- package/documents/ProcessConfig/fragments.ts +116 -0
- package/documents/ProcessConfig/read.ts +35 -0
- package/documents/ProcessExecution/fragments.ts +12 -0
- package/documents/ProcessExecution/list.ts +30 -1
- package/documents/ProcessExecutionDetails/fragments.ts +96 -0
- package/documents/ProcessExecutionDetails/read.ts +12 -0
- package/documents/ProcessScheduleGroup/read.ts +43 -0
- package/documents/ProcessTask/fragments.ts +285 -0
- package/documents/ProcessTask/read.ts +12 -0
- package/documents/ProcessTemplate/fragments.ts +69 -0
- package/documents/ProcessTemplate/list.ts +67 -0
- package/documents/ProcessTemplate/read.ts +12 -0
- package/documents/RunProcess/run.ts +11 -0
- package/package.json +4 -3
- package/src/api/Integrations/queries/get-process.query.ts +48 -0
- package/src/api/Integrations/queries/get-process.server.ts +14 -0
- package/src/api/Integrations/queries/index.ts +1 -0
- package/src/api/dashboard/queries/get-process-executions.query.ts +6 -3
- package/src/api/dashboard/queries/get-process-executions.server.ts +1 -1
- package/src/api/execution-details/queries/get-process-execution-details.query.ts +46 -0
- package/src/api/execution-details/queries/get-process-execution-details.server.ts +11 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.query.ts +48 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.server.ts +11 -0
- package/src/api/execution-details/queries/index.ts +2 -0
- package/src/api/process/mutations/copy-process.mutation.ts +48 -0
- package/src/api/process/mutations/copy-process.server.ts +14 -0
- package/src/api/process/mutations/index.ts +2 -0
- package/src/api/process/mutations/run-process.mutation.ts +41 -0
- package/src/api/process/mutations/run-process.server.ts +14 -0
- package/src/api/process/queries/get-process-by-id.query.ts +85 -0
- package/src/api/process/queries/get-process-by-id.server.ts +20 -0
- package/src/api/process/queries/index.ts +4 -0
- package/src/api/process-config/mutation/index.ts +2 -0
- package/src/api/process-config/mutation/process-config-import.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-import.server.ts +14 -0
- package/src/api/process-config/mutation/process-config-merge.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-merge.server.ts +14 -0
- package/src/api/process-task/queries/get-process-task-by-id.query.ts +45 -0
- package/src/api/process-task/queries/get-process-task-by-id.server.ts +9 -0
- package/src/api/process-task/queries/index.ts +1 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/mutation/index.ts +2 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.query.ts +48 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.server.ts +11 -0
- package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +3 -3
- package/src/api/scheduler/queries/get-process-schedule.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule.server.ts +3 -3
- package/src/api/scheduler/queries/get-scheduled-processes.query.ts +6 -3
- package/src/api/scheduler/queries/get-scheduled-processes.server.ts +1 -1
- package/src/api/scheduler/queries/index.ts +3 -2
- package/src/api/templates/queries/get-process-template-groups.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-groups.server.ts +11 -0
- package/src/api/templates/queries/get-process-template-records.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-records.server.ts +11 -0
- package/src/api/templates/queries/get-process-template.query.ts +48 -0
- package/src/api/templates/queries/get-process-template.server.ts +9 -0
- package/src/api/templates/queries/get-process-templates.query.ts +45 -0
- package/src/api/templates/queries/get-process-templates.server.ts +9 -0
- package/src/api/templates/queries/index.ts +5 -0
- package/src/api/templates/queries/template-input-search.query.ts +34 -0
- package/src/api/templates/queries/template-input-search.server.ts +35 -0
- package/src/api/templates/queries/types.ts +28 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +32 -5
- package/src/components/button/outlined-icon-button.tsx +2 -2
- package/src/components/core/date-time-popover.tsx +11 -4
- package/src/components/core/drawer-buttons.tsx +52 -0
- package/src/components/core/edited-typography.tsx +1 -1
- package/src/components/core/index.ts +4 -2
- package/src/components/core/loading.tsx +1 -1
- package/src/components/core/status-tag.tsx +97 -0
- package/src/components/core/title-edit.tsx +18 -11
- package/src/components/dashboard-list/dashboard-list-row.tsx +22 -29
- package/src/components/dashboard-list/dashboard-list.tsx +19 -15
- package/src/components/data-table/table-header.tsx +5 -7
- package/src/components/data-table/table-pagination.tsx +1 -1
- package/src/components/data-table/table-row.tsx +1 -1
- package/src/components/data-table/table-skeleton.tsx +9 -4
- package/src/components/execution/execution-filter.ts +1 -1
- package/src/components/execution/execution-status-icon.tsx +7 -7
- package/src/components/execution/execution-tag.tsx +12 -77
- package/src/components/execution/index.ts +1 -1
- package/src/components/execution-history-drawer/execution-history-drawer.tsx +203 -0
- package/src/components/execution-history-drawer/executions-card.tsx +85 -0
- package/src/components/execution-history-drawer/index.ts +1 -0
- package/src/components/footer/footer.tsx +10 -6
- package/src/components/header/dashboard-list-header.tsx +12 -7
- package/src/components/header/execution-details-header.tsx +35 -26
- package/src/components/header/header.tsx +10 -3
- package/src/components/header/index.ts +1 -1
- package/src/components/header/integration-details-header.tsx +104 -45
- package/src/components/integration-list/index.ts +3 -0
- package/src/components/integration-list/integration-filter.ts +21 -0
- package/src/components/integration-list/integration-status-icon.tsx +32 -0
- package/src/components/integration-list/integration-tag.tsx +33 -0
- package/src/components/integration-list/list/index.ts +1 -0
- package/src/components/integration-list/list/integration-list-row.tsx +161 -0
- package/src/components/integration-list/list/integration-list-table.tsx +62 -0
- package/src/components/integration-list/list/integration-list.tsx +258 -0
- package/src/components/integration-view/animated-svg.tsx +31 -0
- package/src/components/integration-view/edges/default-edge.tsx +1 -1
- package/src/components/integration-view/elk-layout-options.ts +2 -2
- package/src/components/integration-view/elk-types.ts +35 -6
- package/src/components/integration-view/flow-types.tsx +10 -0
- package/src/components/integration-view/integration-view.tsx +990 -55
- package/src/components/integration-view/nodes/empty-node.tsx +65 -0
- package/src/components/integration-view/nodes/entry-node.tsx +98 -4
- package/src/components/integration-view/nodes/execution-entry-node.tsx +107 -0
- package/src/components/integration-view/nodes/execution-task-node.tsx +88 -0
- package/src/components/integration-view/nodes/group-node.tsx +19 -13
- package/src/components/integration-view/nodes/row-node.tsx +19 -0
- package/src/components/integration-view/nodes/task-node.tsx +14 -8
- package/src/components/integration-view/task-icon.tsx +193 -0
- package/src/components/integration-view/temp-data/initialElements.tsx +36 -32
- package/src/components/integration-view/types.ts +2 -2
- package/src/components/layouts/main-layout.tsx +2 -3
- package/src/components/layouts/root-container.tsx +3 -6
- package/src/components/link-cards/link-card.tsx +15 -4
- package/src/components/link-cards/styles.ts +1 -1
- package/src/components/list-filter/date-filter.tsx +4 -3
- package/src/components/list-filter/date-range-filter.tsx +11 -5
- package/src/components/list-filter/index.ts +1 -1
- package/src/components/list-filter/list-filter.tsx +31 -26
- package/src/components/list-filter/multi-select-filter.tsx +11 -10
- package/src/components/list-filter/select-filter.tsx +13 -8
- package/src/components/scheduler/day-selector.tsx +29 -15
- package/src/components/scheduler/day-tag.tsx +14 -51
- package/src/components/scheduler/index.ts +2 -1
- package/src/components/scheduler/schedule-drawer/details-reducer.ts +217 -0
- package/src/components/scheduler/schedule-drawer/schedule-details-integrations.tsx +503 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-main.tsx +136 -99
- package/src/components/scheduler/schedule-drawer/schedule-details-name.tsx +94 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-skeleton.tsx +1 -2
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details.tsx +9 -13
- package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +218 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +6 -25
- package/src/components/scheduler/schedule-drawer/schedule-drawer.tsx +116 -0
- package/src/components/scheduler/schedule-drawer/sortable-integration-row.tsx +130 -0
- package/src/components/scheduler/schedule-filter.ts +1 -1
- package/src/components/scheduler/schedule-icon.tsx +5 -6
- package/src/components/scheduler/schedule-integration-icon.tsx +31 -0
- package/src/components/templates/index.ts +1 -0
- package/src/components/templates/inputs/index.tsx +1351 -0
- package/src/components/templates/template-filter.ts +5 -0
- package/src/components/templates/templates-list/index.ts +1 -0
- package/src/components/templates/templates-list/templates-list-row.tsx +55 -0
- package/src/components/templates/templates-list/templates-list-table.tsx +58 -0
- package/src/components/templates/templates-list/templates-list.tsx +253 -0
- package/src/components/templates/types.tsx +75 -0
- package/src/components/templates/wizard.tsx +689 -0
- package/src/hooks/use-breadcrumbs.ts +1 -1
- package/src/hooks/use-recurrence.tsx +1 -2
- package/src/pages/dashboard/dashboard-link-cards.tsx +8 -11
- package/src/pages/dashboard/dashboard-list-sections.tsx +7 -9
- package/src/pages/dashboard/dashboard.tsx +1 -2
- package/src/pages/execution-details/execution-details.tsx +211 -14
- package/src/pages/execution-details/task-execution-details.tsx +160 -0
- package/src/pages/execution-details/task-execution-drawer.tsx +54 -0
- package/src/pages/executions/executions-list/executions-list-row.tsx +21 -27
- package/src/pages/executions/executions-list/executions-list-table.tsx +28 -35
- package/src/pages/executions/executions-list/executions-list.tsx +24 -18
- package/src/pages/executions/executions.tsx +11 -15
- package/src/pages/integration-create/index.ts +1 -0
- package/src/pages/integration-create/integration-create.tsx +174 -0
- package/src/pages/integration-create/pre-creation-step.tsx +12 -0
- package/src/pages/integration-create/select-step.tsx +105 -0
- package/src/pages/integration-create/template-list-step.tsx +77 -0
- package/src/pages/integration-create/wizard-step.tsx +50 -0
- package/src/pages/integration-details/import-process/copy-tasks-list.tsx +265 -0
- package/src/pages/integration-details/import-process/copy-tasks-row.tsx +77 -0
- package/src/pages/integration-details/import-process/import-confirm.tsx +61 -0
- package/src/pages/integration-details/import-process/import-drawer.tsx +48 -0
- package/src/pages/integration-details/import-process/import-process-reducer.ts +90 -0
- package/src/pages/integration-details/import-process/import-process.tsx +149 -0
- package/src/pages/integration-details/index.ts +1 -0
- package/src/pages/integration-details/integration-details.tsx +221 -0
- package/src/pages/integration-details/task-drawer/add-task.tsx +120 -0
- package/src/pages/integration-details/task-drawer/edit-task.tsx +175 -0
- package/src/pages/integration-details/task-drawer/task-drawer.tsx +139 -0
- package/src/pages/integration-details/task-drawer/task-reducer.ts +73 -0
- package/src/pages/integrations/integrations.tsx +68 -8
- package/src/pages/scheduler/scheduler.tsx +12 -24
- package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +27 -37
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +27 -42
- package/src/pages/scheduler/schedules-list/schedules-list.tsx +48 -21
- package/src/utils/date-functions.ts +69 -0
- package/src/utils/slugify.ts +3 -0
- package/tsconfig.json +12 -4
- package/src/hooks/use-timestamp.tsx +0 -25
- package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +0 -227
- package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +0 -77
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +0 -72
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +0 -103
- package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +0 -101
- package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +0 -93
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/edited-types.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/index.ts +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
2
|
+
import { Box, Card, CardContent, CardHeader, Typography } from "@mui/material";
|
|
3
|
+
import { Handle, type NodeProps, Position } from "@xyflow/react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
|
|
6
|
+
export function EmptyNode(props: NodeProps): JSX.Element {
|
|
7
|
+
const t = useTranslations("Integrate.IntegrationDetails.View.EmptyNode");
|
|
8
|
+
return (
|
|
9
|
+
<Box sx={{ opacity: props.data.disabled ? 0.5 : 1 }}>
|
|
10
|
+
<Card
|
|
11
|
+
sx={{
|
|
12
|
+
borderWidth: 1,
|
|
13
|
+
borderStyle: "dashed",
|
|
14
|
+
borderColor: "grey.700",
|
|
15
|
+
backgroundColor: "transparent",
|
|
16
|
+
width: props.width,
|
|
17
|
+
"&:hover": {
|
|
18
|
+
borderColor: props?.data?.disabled ? "grey.700" : "#4E97FD", //Blue not implemented in the theme
|
|
19
|
+
backgroundColor: props?.data?.disabled ? "#fff" : "#DBF0FE",
|
|
20
|
+
},
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
<CardHeader
|
|
24
|
+
title={
|
|
25
|
+
<Typography
|
|
26
|
+
variant="h5"
|
|
27
|
+
sx={{ textAlign: "center", width: "100%" }}
|
|
28
|
+
>
|
|
29
|
+
{props?.data?.label as string}
|
|
30
|
+
</Typography>
|
|
31
|
+
}
|
|
32
|
+
sx={{
|
|
33
|
+
height: 62,
|
|
34
|
+
display: "flex",
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
<CardContent
|
|
38
|
+
sx={{
|
|
39
|
+
height: props.height,
|
|
40
|
+
// width: (props.width || 0) + 48,
|
|
41
|
+
display: "flex",
|
|
42
|
+
justifyContent: "center",
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
width: "100%",
|
|
45
|
+
flexDirection: "column",
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<Typography variant="body2" color="grey.600" pb={3}>
|
|
49
|
+
{t("firstIntegration")}
|
|
50
|
+
</Typography>
|
|
51
|
+
<AddCircleOutlineIcon
|
|
52
|
+
sx={{
|
|
53
|
+
color: "grey.600",
|
|
54
|
+
"&:hover": {
|
|
55
|
+
color: "#4E97FD", //Blue not implemented in the theme
|
|
56
|
+
},
|
|
57
|
+
marginLeft: "-16px",
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
</CardContent>
|
|
61
|
+
<Handle type="target" position={Position.Top} />
|
|
62
|
+
</Card>
|
|
63
|
+
</Box>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -1,10 +1,104 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
Card,
|
|
4
|
+
CardContent,
|
|
5
|
+
Divider,
|
|
6
|
+
type Theme,
|
|
7
|
+
Typography,
|
|
8
|
+
useTheme,
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
import { Handle, type NodeProps, Position } from "@xyflow/react";
|
|
11
|
+
import { useTranslations } from "next-intl";
|
|
12
|
+
import { inputIcon, timerIcon, triggerIcon } from "../task-icon";
|
|
13
|
+
|
|
14
|
+
export function EntryNode(props: NodeProps): JSX.Element {
|
|
15
|
+
const t = useTranslations("Integrate.IntegrationDetails.View.EntryNode");
|
|
16
|
+
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
const styles = getStyles(theme, props);
|
|
2
19
|
|
|
3
|
-
export function EntryNode(): JSX.Element {
|
|
4
20
|
return (
|
|
5
|
-
<
|
|
21
|
+
<Box
|
|
22
|
+
sx={{
|
|
23
|
+
display: "flex",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
//width: props.width + 24 + theme.spacing(1),
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<Card
|
|
30
|
+
sx={{
|
|
31
|
+
borderWidth: 1,
|
|
32
|
+
borderStyle:
|
|
33
|
+
props?.data?.isScheduled || props?.data?.isTriggered
|
|
34
|
+
? "solid"
|
|
35
|
+
: "dashed",
|
|
36
|
+
backgroundColor:
|
|
37
|
+
props?.data?.isScheduled || props?.data?.isTriggered
|
|
38
|
+
? theme.palette.background.paper
|
|
39
|
+
: "transparent",
|
|
40
|
+
"&:hover": {
|
|
41
|
+
borderColor: "#4E97FD", //Blue not implemented in the theme
|
|
42
|
+
backgroundColor: "#DBF0FE",
|
|
43
|
+
},
|
|
44
|
+
//height: props.height,
|
|
45
|
+
//width: props.width,
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
{!(props?.data?.isScheduled as boolean) &&
|
|
49
|
+
!(props?.data?.isTriggered as boolean) && (
|
|
50
|
+
<CardContent sx={styles.cardContent}>
|
|
51
|
+
{inputIcon()}
|
|
52
|
+
<Typography variant="h6" sx={styles.label}>
|
|
53
|
+
{t("noEntryPoint")}
|
|
54
|
+
</Typography>
|
|
55
|
+
</CardContent>
|
|
56
|
+
)}
|
|
57
|
+
{(props?.data?.isScheduled as boolean) && (
|
|
58
|
+
<CardContent sx={styles.cardContent}>
|
|
59
|
+
{timerIcon()}
|
|
60
|
+
<Typography variant="h6" sx={styles.label}>
|
|
61
|
+
{t("scheduled")}
|
|
62
|
+
</Typography>
|
|
63
|
+
</CardContent>
|
|
64
|
+
)}
|
|
65
|
+
{(props?.data?.isScheduled as boolean) &&
|
|
66
|
+
(props?.data?.isTriggered as boolean) ? (
|
|
67
|
+
<Divider sx={styles.divider} />
|
|
68
|
+
) : null}
|
|
69
|
+
{(props?.data?.isTriggered as boolean) && (
|
|
70
|
+
<CardContent sx={styles.cardContent}>
|
|
71
|
+
{triggerIcon()}
|
|
72
|
+
<Typography variant="h6" sx={styles.label}>
|
|
73
|
+
{t("triggered")}
|
|
74
|
+
</Typography>
|
|
75
|
+
</CardContent>
|
|
76
|
+
)}
|
|
77
|
+
</Card>
|
|
6
78
|
<Handle type="source" position={Position.Bottom} />
|
|
7
79
|
<Handle type="target" position={Position.Top} />
|
|
8
|
-
</
|
|
80
|
+
</Box>
|
|
9
81
|
);
|
|
10
82
|
}
|
|
83
|
+
|
|
84
|
+
const getStyles = (theme: Theme, props: NodeProps) => {
|
|
85
|
+
return {
|
|
86
|
+
cardContent: {
|
|
87
|
+
height: props.height,
|
|
88
|
+
width: props.width,
|
|
89
|
+
display: "flex",
|
|
90
|
+
justifyContent: "center",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
},
|
|
93
|
+
label: {
|
|
94
|
+
textAlign: "center",
|
|
95
|
+
paddingLeft: theme.spacing(1),
|
|
96
|
+
fontSize: "18px!important",
|
|
97
|
+
},
|
|
98
|
+
divider: {
|
|
99
|
+
width: "80%",
|
|
100
|
+
margin: `${theme.spacing(1)} auto`,
|
|
101
|
+
borderColor: "grey.800",
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Card,
|
|
5
|
+
CardContent,
|
|
6
|
+
Divider,
|
|
7
|
+
type Theme,
|
|
8
|
+
Typography,
|
|
9
|
+
useTheme,
|
|
10
|
+
} from "@mui/material";
|
|
11
|
+
import { Handle, type NodeProps, Position } from "@xyflow/react";
|
|
12
|
+
|
|
13
|
+
export function ExecutionEntryNode(props: NodeProps): JSX.Element {
|
|
14
|
+
const theme = useTheme();
|
|
15
|
+
const styles = getStyles(theme, props);
|
|
16
|
+
|
|
17
|
+
const borderColor = () => {
|
|
18
|
+
switch (props?.data?.executionStatus) {
|
|
19
|
+
case "300":
|
|
20
|
+
return "info.600";
|
|
21
|
+
case "400":
|
|
22
|
+
return "success.600";
|
|
23
|
+
case "450":
|
|
24
|
+
return "warning.600";
|
|
25
|
+
case "500":
|
|
26
|
+
return "error.600";
|
|
27
|
+
default:
|
|
28
|
+
return "grey.600";
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Box
|
|
34
|
+
sx={{
|
|
35
|
+
display: "flex",
|
|
36
|
+
justifyContent: "center",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
//width: props.width + 24 + theme.spacing(1),
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
<Card
|
|
42
|
+
sx={{
|
|
43
|
+
borderWidth: 1,
|
|
44
|
+
borderStyle: "solid",
|
|
45
|
+
borderColor: borderColor(),
|
|
46
|
+
"&:hover": {
|
|
47
|
+
borderColor: "#4E97FD", //Blue not implemented in the theme
|
|
48
|
+
backgroundColor: "#DBF0FE",
|
|
49
|
+
},
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
<CardContent sx={styles.cardContent}>
|
|
53
|
+
{props?.data?.icon as any}
|
|
54
|
+
<Typography variant="h6" sx={styles.label}>
|
|
55
|
+
{props?.data?.label as string}
|
|
56
|
+
</Typography>
|
|
57
|
+
</CardContent>
|
|
58
|
+
<Handle type="source" position={Position.Bottom} />
|
|
59
|
+
<Handle type="target" position={Position.Top} />
|
|
60
|
+
{props?.data?.icon2 ? (
|
|
61
|
+
<>
|
|
62
|
+
<Divider sx={styles.divider} />
|
|
63
|
+
<CardContent sx={styles.cardContent}>
|
|
64
|
+
{props?.data?.icon2 as any}
|
|
65
|
+
<Typography variant="h6" sx={styles.label}>
|
|
66
|
+
{props?.data?.label2 as string}
|
|
67
|
+
</Typography>
|
|
68
|
+
</CardContent>
|
|
69
|
+
</>
|
|
70
|
+
) : null}
|
|
71
|
+
</Card>
|
|
72
|
+
{props?.data?.isLast ? (
|
|
73
|
+
<AddCircleOutlineIcon
|
|
74
|
+
sx={{
|
|
75
|
+
color: "grey.600",
|
|
76
|
+
marginLeft: theme.spacing(1),
|
|
77
|
+
"&:hover": {
|
|
78
|
+
color: "#4E97FD", //Blue not implemented in the theme
|
|
79
|
+
},
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
) : null}
|
|
83
|
+
</Box>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const getStyles = (theme: Theme, props: NodeProps) => {
|
|
88
|
+
return {
|
|
89
|
+
cardContent: {
|
|
90
|
+
height: props.height,
|
|
91
|
+
width: props.width,
|
|
92
|
+
display: "flex",
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
},
|
|
96
|
+
label: {
|
|
97
|
+
textAlign: "center",
|
|
98
|
+
paddingLeft: theme.spacing(1),
|
|
99
|
+
fontSize: "18px!important",
|
|
100
|
+
},
|
|
101
|
+
divider: {
|
|
102
|
+
width: "80%",
|
|
103
|
+
margin: `${theme.spacing(1)} auto`,
|
|
104
|
+
borderColor: "grey.800",
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { ProcessTaskExecution } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { ExecutionTag } from "@evenicanpm/admin-integrate/components/execution";
|
|
3
|
+
import { Box, Card, CardContent, Typography, useTheme } from "@mui/material";
|
|
4
|
+
import { Handle, type NodeProps, Position } from "@xyflow/react";
|
|
5
|
+
import { mapIconByOrchestrationType } from "../task-icon";
|
|
6
|
+
|
|
7
|
+
export function ExecutionTaskNode(props: NodeProps): JSX.Element {
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
|
|
10
|
+
const borderColor = () => {
|
|
11
|
+
switch (
|
|
12
|
+
(props?.data?.processTaskExecution as ProcessTaskExecution)
|
|
13
|
+
?.executionStatus?.id
|
|
14
|
+
) {
|
|
15
|
+
case "300":
|
|
16
|
+
return "info.600";
|
|
17
|
+
case "400":
|
|
18
|
+
return "success.600";
|
|
19
|
+
case "450":
|
|
20
|
+
return "warning.600";
|
|
21
|
+
case "500":
|
|
22
|
+
return "error.600";
|
|
23
|
+
default:
|
|
24
|
+
return "grey.600";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Box
|
|
30
|
+
sx={{
|
|
31
|
+
display: "flex",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
opacity: !props?.data?.disabled || props?.data?.selected ? 1 : 0.5,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<Card
|
|
38
|
+
sx={{
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderStyle: "solid",
|
|
41
|
+
borderColor: borderColor(),
|
|
42
|
+
"&:hover": {
|
|
43
|
+
borderColor: props?.data?.disabled ? "grey.700" : "#4E97FD", //Blue not implemented in the theme
|
|
44
|
+
backgroundColor: props?.data?.disabled ? "#fff" : "#DBF0FE",
|
|
45
|
+
},
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<CardContent
|
|
49
|
+
sx={{
|
|
50
|
+
height: props.height,
|
|
51
|
+
width: props.width,
|
|
52
|
+
display: "flex",
|
|
53
|
+
justifyContent: "center",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
{mapIconByOrchestrationType(
|
|
58
|
+
(props?.data?.processTask as ProcessTaskExecution)
|
|
59
|
+
?.orchestrationType?.code as string,
|
|
60
|
+
)}
|
|
61
|
+
<Typography
|
|
62
|
+
variant="h6"
|
|
63
|
+
sx={{
|
|
64
|
+
textAlign: "center",
|
|
65
|
+
fontSize: "18px!important",
|
|
66
|
+
paddingLeft: theme.spacing(0.7),
|
|
67
|
+
marginRight: theme.spacing(1),
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{
|
|
71
|
+
(props?.data?.processTaskExecution as ProcessTaskExecution)
|
|
72
|
+
?.name as string
|
|
73
|
+
}
|
|
74
|
+
</Typography>
|
|
75
|
+
<ExecutionTag
|
|
76
|
+
executionStatusId={
|
|
77
|
+
(props?.data?.processTaskExecution as ProcessTaskExecution)
|
|
78
|
+
?.executionStatus?.id as string
|
|
79
|
+
}
|
|
80
|
+
sx={{ marginRight: props?.data?.isLast ? theme.spacing(4) : 0 }}
|
|
81
|
+
/>
|
|
82
|
+
</CardContent>
|
|
83
|
+
<Handle type="target" position={Position.Top} />
|
|
84
|
+
<Handle type="source" position={Position.Bottom} />
|
|
85
|
+
</Card>
|
|
86
|
+
</Box>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Box, Card, CardContent, CardHeader, Typography } from "@mui/material";
|
|
2
|
-
import { Handle, NodeProps, Position } from "@xyflow/react";
|
|
3
1
|
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
2
|
+
import { Box, Card, CardContent, CardHeader, Typography } from "@mui/material";
|
|
3
|
+
import { Handle, type NodeProps, Position } from "@xyflow/react";
|
|
4
4
|
|
|
5
5
|
export function GroupNode(props: NodeProps): JSX.Element {
|
|
6
6
|
return (
|
|
7
|
-
<Box>
|
|
7
|
+
<Box sx={{ opacity: props.data.disabled ? 0.5 : 1 }}>
|
|
8
8
|
<Card
|
|
9
9
|
sx={{
|
|
10
10
|
borderWidth: 1,
|
|
@@ -15,13 +15,17 @@ export function GroupNode(props: NodeProps): JSX.Element {
|
|
|
15
15
|
>
|
|
16
16
|
<CardHeader
|
|
17
17
|
title={
|
|
18
|
-
<Typography
|
|
18
|
+
<Typography
|
|
19
|
+
variant="h5"
|
|
20
|
+
sx={{ textAlign: "center", width: "100%" }}
|
|
21
|
+
>
|
|
19
22
|
{props?.data?.label as string}
|
|
20
23
|
</Typography>
|
|
21
24
|
}
|
|
22
25
|
sx={{
|
|
23
26
|
height: 62,
|
|
24
27
|
paddingRight: "48px",
|
|
28
|
+
display: "flex",
|
|
25
29
|
}}
|
|
26
30
|
/>
|
|
27
31
|
<CardContent
|
|
@@ -34,15 +38,17 @@ export function GroupNode(props: NodeProps): JSX.Element {
|
|
|
34
38
|
paddingRight: "48px",
|
|
35
39
|
}}
|
|
36
40
|
>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
{props.data.variant === "process" ? (
|
|
42
|
+
<AddCircleOutlineIcon
|
|
43
|
+
sx={{
|
|
44
|
+
color: "grey.600",
|
|
45
|
+
"&:hover": {
|
|
46
|
+
color: "#4E97FD", //Blue not implemented in the theme
|
|
47
|
+
},
|
|
48
|
+
marginLeft: "-16px",
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
51
|
+
) : null}
|
|
46
52
|
</CardContent>
|
|
47
53
|
<Handle type="target" position={Position.Top} />
|
|
48
54
|
</Card>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
import type { NodeProps } from "@xyflow/react";
|
|
3
|
+
|
|
4
|
+
export function RowNode(props: NodeProps): JSX.Element {
|
|
5
|
+
return (
|
|
6
|
+
// <Box sx={{ opacity: props.data.disabled ? 0.5 : 1 }}>
|
|
7
|
+
<Box>
|
|
8
|
+
<Box
|
|
9
|
+
sx={{
|
|
10
|
+
borderWidth: 1,
|
|
11
|
+
borderStyle: "solid",
|
|
12
|
+
borderColor: "grey.700",
|
|
13
|
+
width: props.width,
|
|
14
|
+
height: props.height,
|
|
15
|
+
}}
|
|
16
|
+
></Box>
|
|
17
|
+
</Box>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Box, Card, CardContent, Typography, useTheme } from "@mui/material";
|
|
2
|
-
import { Handle, NodeProps, Position } from "@xyflow/react";
|
|
3
|
-
|
|
4
1
|
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
2
|
+
import { Box, Card, CardContent, Typography, useTheme } from "@mui/material";
|
|
3
|
+
import { Handle, type NodeProps, Position } from "@xyflow/react";
|
|
4
|
+
import type { ProcessTask } from "../../../../../admin-core/src/api/e4/graphqlRequestSdk";
|
|
5
|
+
import { mapIconByOrchestrationType } from "../task-icon";
|
|
5
6
|
|
|
6
7
|
export function TaskNode(props: NodeProps): JSX.Element {
|
|
7
8
|
const theme = useTheme();
|
|
@@ -12,6 +13,7 @@ export function TaskNode(props: NodeProps): JSX.Element {
|
|
|
12
13
|
display: "flex",
|
|
13
14
|
justifyContent: "center",
|
|
14
15
|
alignItems: "center",
|
|
16
|
+
opacity: !props?.data?.disabled || props?.data?.selected ? 1 : 0.5,
|
|
15
17
|
//width: props.width + 24 + theme.spacing(1),
|
|
16
18
|
}}
|
|
17
19
|
>
|
|
@@ -21,8 +23,8 @@ export function TaskNode(props: NodeProps): JSX.Element {
|
|
|
21
23
|
borderStyle: "solid",
|
|
22
24
|
borderColor: "grey.700",
|
|
23
25
|
"&:hover": {
|
|
24
|
-
borderColor: "#4E97FD", //Blue not implemented in the theme
|
|
25
|
-
backgroundColor: "#DBF0FE",
|
|
26
|
+
borderColor: props?.data?.disabled ? "grey.700" : "#4E97FD", //Blue not implemented in the theme
|
|
27
|
+
backgroundColor: props?.data?.disabled ? "#fff" : "#DBF0FE",
|
|
26
28
|
},
|
|
27
29
|
}}
|
|
28
30
|
>
|
|
@@ -35,18 +37,22 @@ export function TaskNode(props: NodeProps): JSX.Element {
|
|
|
35
37
|
alignItems: "center",
|
|
36
38
|
}}
|
|
37
39
|
>
|
|
38
|
-
{props?.data?.icon as any}
|
|
40
|
+
{/* {props?.data?.icon as any} */}
|
|
41
|
+
{mapIconByOrchestrationType(
|
|
42
|
+
(props?.data?.processTask as ProcessTask)?.orchestrationType
|
|
43
|
+
?.code as string,
|
|
44
|
+
)}
|
|
39
45
|
<Typography
|
|
40
46
|
variant="h6"
|
|
41
47
|
sx={{ textAlign: "center", paddingLeft: theme.spacing(1) }}
|
|
42
48
|
>
|
|
43
|
-
{props?.data?.
|
|
49
|
+
{(props?.data?.processTask as ProcessTask)?.name as string}
|
|
44
50
|
</Typography>
|
|
45
51
|
</CardContent>
|
|
46
52
|
<Handle type="target" position={Position.Top} />
|
|
47
53
|
<Handle type="source" position={Position.Bottom} />
|
|
48
54
|
</Card>
|
|
49
|
-
{props?.data
|
|
55
|
+
{props?.data.isLast ? (
|
|
50
56
|
<AddCircleOutlineIcon
|
|
51
57
|
sx={{
|
|
52
58
|
color: "grey.600",
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import DownloadIcon from "@mui/icons-material/Download";
|
|
2
|
+
import ExitToAppIcon from "@mui/icons-material/ExitToApp";
|
|
3
|
+
import FileUploadIcon from "@mui/icons-material/FileUpload";
|
|
4
|
+
import IosShareIcon from "@mui/icons-material/IosShare";
|
|
5
|
+
import StorageIcon from "@mui/icons-material/Storage";
|
|
6
|
+
import SystemUpdateAltIcon from "@mui/icons-material/SystemUpdateAlt";
|
|
7
|
+
import TableChartIcon from "@mui/icons-material/TableChart";
|
|
8
|
+
import TimerIcon from "@mui/icons-material/Timer";
|
|
9
|
+
|
|
10
|
+
import { Box } from "@mui/material";
|
|
11
|
+
|
|
12
|
+
export const mapIconByOrchestrationType = (code: string | undefined) => {
|
|
13
|
+
let light: string;
|
|
14
|
+
let dark: string;
|
|
15
|
+
|
|
16
|
+
switch (code) {
|
|
17
|
+
case "PubSubPush":
|
|
18
|
+
light = "orange.100";
|
|
19
|
+
dark = "orange.600";
|
|
20
|
+
break;
|
|
21
|
+
case "PubSubPull":
|
|
22
|
+
light = "bluish.100";
|
|
23
|
+
dark = "bluish.600";
|
|
24
|
+
break;
|
|
25
|
+
case "SQLProcess":
|
|
26
|
+
light = "paste.100";
|
|
27
|
+
dark = "paste.600";
|
|
28
|
+
break;
|
|
29
|
+
case "ExportStaged":
|
|
30
|
+
light = "paste.100";
|
|
31
|
+
dark = "paste.600";
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
return inputIcon();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Box
|
|
39
|
+
sx={{
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
justifyContent: "center",
|
|
43
|
+
borderRadius: "5px",
|
|
44
|
+
bgcolor: light,
|
|
45
|
+
borderWidth: 1,
|
|
46
|
+
borderStyle: "solid",
|
|
47
|
+
borderColor: dark,
|
|
48
|
+
padding: "2px",
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
{code === "PubSubPush" ? (
|
|
52
|
+
<FileUploadIcon sx={{ color: dark }} />
|
|
53
|
+
) : code === "PubSubPull" ? (
|
|
54
|
+
<DownloadIcon sx={{ color: dark }} />
|
|
55
|
+
) : code === "SQLProcess" ? (
|
|
56
|
+
<StorageIcon sx={{ color: dark }} />
|
|
57
|
+
) : code === "ExportStaged" ? (
|
|
58
|
+
<IosShareIcon sx={{ color: dark }} />
|
|
59
|
+
) : null}
|
|
60
|
+
</Box>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//Temporary icons until logic is added to determine icon based on integration
|
|
65
|
+
export const pullIcon = () => {};
|
|
66
|
+
|
|
67
|
+
export const pushIcon = () => {
|
|
68
|
+
return (
|
|
69
|
+
<Box
|
|
70
|
+
sx={{
|
|
71
|
+
display: "flex",
|
|
72
|
+
alignItems: "center",
|
|
73
|
+
justifyContent: "center",
|
|
74
|
+
borderRadius: "5px",
|
|
75
|
+
bgcolor: "orange.100",
|
|
76
|
+
borderWidth: 1,
|
|
77
|
+
borderStyle: "solid",
|
|
78
|
+
borderColor: "orange.600",
|
|
79
|
+
padding: "2px",
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
<FileUploadIcon sx={{ color: "orange.600" }} />
|
|
83
|
+
</Box>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const storageIcon = () => {
|
|
88
|
+
return (
|
|
89
|
+
<Box
|
|
90
|
+
sx={{
|
|
91
|
+
display: "flex",
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
borderRadius: "5px",
|
|
95
|
+
bgcolor: "paste.100",
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderStyle: "solid",
|
|
98
|
+
borderColor: "paste.600",
|
|
99
|
+
padding: "2px",
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<StorageIcon sx={{ color: "paste.600" }} />
|
|
103
|
+
</Box>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const exportIcon = () => {
|
|
108
|
+
return (
|
|
109
|
+
<Box
|
|
110
|
+
sx={{
|
|
111
|
+
display: "flex",
|
|
112
|
+
alignItems: "center",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
borderRadius: "5px",
|
|
115
|
+
bgcolor: "paste.100",
|
|
116
|
+
borderWidth: 1,
|
|
117
|
+
borderStyle: "solid",
|
|
118
|
+
borderColor: "paste.600",
|
|
119
|
+
padding: "2px",
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
<IosShareIcon sx={{ color: "paste.600" }} />
|
|
123
|
+
</Box>
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const chartIcon = () => {
|
|
128
|
+
return (
|
|
129
|
+
<Box
|
|
130
|
+
sx={{
|
|
131
|
+
display: "flex",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
justifyContent: "center",
|
|
134
|
+
borderRadius: "5px",
|
|
135
|
+
bgcolor: "paste.100",
|
|
136
|
+
borderWidth: 1,
|
|
137
|
+
borderStyle: "solid",
|
|
138
|
+
borderColor: "paste.600",
|
|
139
|
+
padding: "2px",
|
|
140
|
+
}}
|
|
141
|
+
>
|
|
142
|
+
<TableChartIcon sx={{ color: "paste.600" }} />
|
|
143
|
+
</Box>
|
|
144
|
+
);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export const timerIcon = () => {
|
|
148
|
+
return (
|
|
149
|
+
<Box
|
|
150
|
+
sx={{
|
|
151
|
+
display: "flex",
|
|
152
|
+
alignItems: "center",
|
|
153
|
+
justifyContent: "center",
|
|
154
|
+
borderRadius: "5px",
|
|
155
|
+
bgcolor: "info.100",
|
|
156
|
+
borderWidth: 1,
|
|
157
|
+
borderStyle: "solid",
|
|
158
|
+
borderColor: "info.600",
|
|
159
|
+
padding: "2px",
|
|
160
|
+
}}
|
|
161
|
+
>
|
|
162
|
+
<TimerIcon sx={{ color: "info.500" }} />
|
|
163
|
+
</Box>
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export const triggerIcon = () => {
|
|
168
|
+
return (
|
|
169
|
+
<Box
|
|
170
|
+
sx={{
|
|
171
|
+
display: "flex",
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "center",
|
|
174
|
+
borderRadius: "5px",
|
|
175
|
+
bgcolor: "success.100",
|
|
176
|
+
borderWidth: 1,
|
|
177
|
+
borderStyle: "solid",
|
|
178
|
+
borderColor: "success.600",
|
|
179
|
+
padding: "2px",
|
|
180
|
+
}}
|
|
181
|
+
>
|
|
182
|
+
<ExitToAppIcon sx={{ color: "success.600" }} />
|
|
183
|
+
</Box>
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export const inputIcon = () => {
|
|
188
|
+
return (
|
|
189
|
+
<Box>
|
|
190
|
+
<SystemUpdateAltIcon sx={{ color: "grey.600" }} />
|
|
191
|
+
</Box>
|
|
192
|
+
);
|
|
193
|
+
};
|