@evenicanpm/admin-integrate 1.1.0 → 1.2.2
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/Process/fragments.ts +13 -0
- package/documents/Process/list.ts +27 -0
- package/documents/ProcessSchedule/fragments.ts +24 -0
- package/documents/ProcessSchedule/read.ts +12 -0
- package/documents/ProcessScheduleGroup/fragments.ts +29 -0
- package/documents/ProcessScheduleGroup/read.ts +12 -0
- package/documents/ScheduledProcess/fragments.ts +24 -0
- package/documents/ScheduledProcess/list.ts +27 -0
- package/package.json +21 -17
- package/src/api/Integrations/queries/get-process.query.ts +48 -0
- package/src/api/Integrations/queries/get-process.server.ts +9 -0
- package/src/api/Integrations/queries/index.ts +1 -0
- package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
- package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
- package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
- package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
- package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
- package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
- package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
- package/src/api/scheduler/queries/index.ts +3 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
- package/src/components/breadcrumbs/index.ts +1 -1
- package/src/components/breadcrumbs/types.tsx +4 -0
- package/src/components/button/outlined-icon-button.tsx +26 -38
- package/src/components/core/date-time-popover.tsx +32 -0
- package/src/components/core/edited-typography.tsx +20 -0
- package/src/components/core/index.ts +3 -0
- package/src/components/core/loading.tsx +6 -6
- package/src/components/core/title-edit.tsx +122 -0
- package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
- package/src/components/dashboard-list/dashboard-list.tsx +119 -119
- package/src/components/data-table/table-header.tsx +85 -81
- package/src/components/data-table/table-pagination.tsx +27 -27
- package/src/components/data-table/table-row.tsx +14 -14
- package/src/components/data-table/table-skeleton.tsx +34 -34
- package/src/components/execution/execution-filter.ts +22 -22
- package/src/components/execution/execution-status-icon.tsx +16 -17
- package/src/components/execution/execution-tag.tsx +81 -80
- package/src/components/footer/footer.tsx +34 -34
- package/src/components/header/dashboard-list-header.tsx +64 -63
- package/src/components/header/execution-details-header.tsx +102 -129
- package/src/components/header/header.tsx +27 -27
- package/src/components/header/index.ts +1 -0
- package/src/components/header/integration-details-header.tsx +99 -0
- package/src/components/icons/up-down.tsx +15 -15
- package/src/components/integration-list/index.ts +2 -0
- package/src/components/integration-list/integration-filter.ts +21 -0
- package/src/components/integration-list/integration-status-icon.tsx +33 -0
- package/src/components/integration-list/integration-tag.tsx +77 -0
- package/src/components/integration-view/edges/default-edge.tsx +18 -17
- package/src/components/integration-view/elk-layout-options.ts +26 -26
- package/src/components/integration-view/elk-types.ts +16 -12
- package/src/components/integration-view/flow-types.tsx +5 -5
- package/src/components/integration-view/integration-view.tsx +132 -130
- package/src/components/integration-view/nodes/base-node.tsx +50 -0
- package/src/components/integration-view/nodes/connection-node.tsx +8 -8
- package/src/components/integration-view/nodes/entry-node.tsx +8 -8
- package/src/components/integration-view/nodes/group-node.tsx +47 -6
- package/src/components/integration-view/nodes/task-node.tsx +58 -13
- package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
- package/src/components/integration-view/types.ts +6 -6
- package/src/components/layouts/main-layout.tsx +13 -13
- package/src/components/layouts/root-container.tsx +25 -25
- package/src/components/link-cards/link-card.tsx +23 -23
- package/src/components/link-cards/styles.ts +15 -15
- package/src/components/list-filter/date-filter.tsx +41 -45
- package/src/components/list-filter/date-range-filter.tsx +78 -77
- package/src/components/list-filter/list-filter-types.ts +38 -38
- package/src/components/list-filter/list-filter.tsx +363 -354
- package/src/components/list-filter/multi-select-filter.tsx +94 -95
- package/src/components/list-filter/select-filter.tsx +67 -64
- package/src/components/scheduler/day-selector.tsx +174 -0
- package/src/components/scheduler/day-tag.tsx +73 -0
- package/src/components/scheduler/index.ts +4 -0
- package/src/components/scheduler/schedule-filter.ts +25 -0
- package/src/components/scheduler/schedule-icon.tsx +87 -0
- package/src/components/scheduler/scheduler-types.ts +40 -0
- package/src/hooks/use-breadcrumbs.ts +31 -31
- package/src/hooks/use-recurrence.tsx +13 -0
- package/src/hooks/use-timestamp.tsx +21 -21
- package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
- package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
- package/src/pages/dashboard/dashboard.tsx +6 -6
- package/src/pages/execution-details/execution-details.tsx +23 -29
- package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
- package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
- package/src/pages/executions/executions-list/executions-list.tsx +219 -212
- package/src/pages/executions/executions.tsx +67 -72
- package/src/pages/integrations/integration-list/index.ts +1 -0
- package/src/pages/integrations/integration-list/integration-list-row.tsx +147 -0
- package/src/pages/integrations/integration-list/integration-list-table.tsx +78 -0
- package/src/pages/integrations/integration-list/integration-list.tsx +262 -0
- package/src/pages/integrations/integrations.tsx +83 -28
- package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
- package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
- package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
- package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
- package/src/pages/scheduler/scheduler.tsx +106 -30
- package/src/pages/scheduler/schedules-list/index.ts +1 -0
- package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
- package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
- package/tsconfig.json +29 -26
- package/src/components/integration-view/temp-data/initialElements.ts +0 -238
|
@@ -2,153 +2,126 @@ import React, { useState } from "react";
|
|
|
2
2
|
|
|
3
3
|
// MUI
|
|
4
4
|
import { Theme, useTheme } from "@mui/material";
|
|
5
|
-
import {
|
|
6
|
-
Grid2 as Grid,
|
|
7
|
-
Box,
|
|
8
|
-
Typography,
|
|
9
|
-
Button,
|
|
10
|
-
Stack,
|
|
11
|
-
Popover,
|
|
12
|
-
} from "@mui/material";
|
|
13
|
-
import { PlayArrowOutlined } from "@mui/icons-material";
|
|
5
|
+
import { Grid2 as Grid, Typography, Stack } from "@mui/material";
|
|
14
6
|
|
|
15
7
|
// Custom components
|
|
16
|
-
import ExecutionTag from "
|
|
8
|
+
import { ExecutionTag } from "@evenicanpm/admin-integrate/components/execution";
|
|
9
|
+
import { DateTimePopover } from "@evenicanpm/admin-integrate/components/core";
|
|
17
10
|
|
|
18
11
|
interface Execution {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
name: string;
|
|
13
|
+
startDate: string;
|
|
14
|
+
endDate: string;
|
|
15
|
+
executionStatus: {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
25
18
|
}
|
|
26
19
|
|
|
27
20
|
interface Props {
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
execution: Execution;
|
|
22
|
+
children?: React.ReactNode; // buttons to go in header, e.g. save, cancel etc.
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
const ExecutionDetailsHeader: React.FC<Props> = (props: Props) => {
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
const styles = getStyles(theme);
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
const startDate = new Date(props.execution.startDate);
|
|
30
|
+
const endDate = new Date(props.execution.endDate);
|
|
31
|
+
const localTime = startDate.toLocaleString();
|
|
32
|
+
const duration = (endDate.getTime() - startDate.getTime()) / 1000;
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
|
|
35
|
+
const open = Boolean(anchorEl);
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
const handlePopoverOpen = (event: React.MouseEvent<HTMLElement>) => {
|
|
38
|
+
setAnchorEl(event.currentTarget);
|
|
39
|
+
};
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
const handlePopoverClose = () => {
|
|
42
|
+
setAnchorEl(null);
|
|
43
|
+
};
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
>
|
|
109
|
-
<Box sx={styles.popover}>
|
|
110
|
-
<Typography variant="body2">
|
|
111
|
-
Uses your browser's local timezone.
|
|
112
|
-
</Typography>
|
|
113
|
-
<Box
|
|
114
|
-
display={
|
|
115
|
-
Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
116
|
-
? "block"
|
|
117
|
-
: "none"
|
|
118
|
-
}
|
|
119
|
-
>
|
|
120
|
-
<Typography variant="body2" align="center" sx={styles.timezone}>
|
|
121
|
-
{Intl.DateTimeFormat().resolvedOptions().timeZone}
|
|
122
|
-
</Typography>
|
|
123
|
-
</Box>
|
|
124
|
-
</Box>
|
|
125
|
-
</Popover>
|
|
126
|
-
</Grid>
|
|
127
|
-
);
|
|
45
|
+
return (
|
|
46
|
+
<Grid container columnSpacing={1}>
|
|
47
|
+
<Grid size={8}>
|
|
48
|
+
<Stack spacing={5} direction="row" alignItems="center">
|
|
49
|
+
<Typography variant="h5" sx={styles.typography}>
|
|
50
|
+
{props.execution.name}
|
|
51
|
+
</Typography>
|
|
52
|
+
<ExecutionTag
|
|
53
|
+
executionStatusId={props.execution.executionStatus.id}
|
|
54
|
+
/>
|
|
55
|
+
</Stack>
|
|
56
|
+
</Grid>
|
|
57
|
+
<Grid size={4}>
|
|
58
|
+
<Stack
|
|
59
|
+
spacing={1}
|
|
60
|
+
direction="row"
|
|
61
|
+
alignItems="center"
|
|
62
|
+
justifyContent={{ xs: "flex-start", sm: "flex-end" }}
|
|
63
|
+
>
|
|
64
|
+
{/* E.g. run, etc. */}
|
|
65
|
+
{props.children}
|
|
66
|
+
</Stack>
|
|
67
|
+
</Grid>
|
|
68
|
+
<Grid size={12}>
|
|
69
|
+
<Stack
|
|
70
|
+
spacing={1}
|
|
71
|
+
direction="row"
|
|
72
|
+
onMouseEnter={handlePopoverOpen}
|
|
73
|
+
onMouseLeave={handlePopoverClose}
|
|
74
|
+
>
|
|
75
|
+
<Typography color="grey" variant="caption">
|
|
76
|
+
{localTime}
|
|
77
|
+
</Typography>
|
|
78
|
+
<Typography color="grey" variant="caption">
|
|
79
|
+
Duration: {duration}s
|
|
80
|
+
</Typography>
|
|
81
|
+
</Stack>
|
|
82
|
+
</Grid>
|
|
83
|
+
<DateTimePopover
|
|
84
|
+
dateIsoString={props.execution.startDate}
|
|
85
|
+
sx={{ pointerEvents: "none" }}
|
|
86
|
+
open={open}
|
|
87
|
+
anchorEl={anchorEl}
|
|
88
|
+
anchorOrigin={{
|
|
89
|
+
vertical: "bottom",
|
|
90
|
+
horizontal: "left",
|
|
91
|
+
}}
|
|
92
|
+
transformOrigin={{
|
|
93
|
+
vertical: "top",
|
|
94
|
+
horizontal: "left",
|
|
95
|
+
}}
|
|
96
|
+
onClose={handlePopoverClose}
|
|
97
|
+
disableRestoreFocus
|
|
98
|
+
/>
|
|
99
|
+
</Grid>
|
|
100
|
+
);
|
|
128
101
|
};
|
|
129
102
|
|
|
130
103
|
const getStyles = (theme: Theme) => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
104
|
+
return {
|
|
105
|
+
title: {
|
|
106
|
+
display: "flex",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
height: "100%",
|
|
109
|
+
},
|
|
110
|
+
typography: {
|
|
111
|
+
fontWeight: "medium",
|
|
112
|
+
},
|
|
113
|
+
button: {
|
|
114
|
+
borderWidth: 2,
|
|
115
|
+
borderRadius: 1,
|
|
116
|
+
marginRight: theme.spacing(1),
|
|
117
|
+
},
|
|
118
|
+
popover: {
|
|
119
|
+
padding: theme.spacing(1),
|
|
120
|
+
},
|
|
121
|
+
timezone: {
|
|
122
|
+
color: "info.main",
|
|
123
|
+
},
|
|
124
|
+
};
|
|
152
125
|
};
|
|
153
126
|
|
|
154
127
|
export default ExecutionDetailsHeader;
|
|
@@ -3,40 +3,40 @@ import { Box, Typography, AppBar, Toolbar, Stack } from "@mui/material";
|
|
|
3
3
|
import { Theme, useTheme } from "@mui/material";
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
title: string; // e.g. Executions
|
|
7
|
+
section: string; // e.g. e4Integrate
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const IntegrateHeader: React.FC<Props> = (props: Props) => {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const theme = useTheme();
|
|
12
|
+
const styles = getStyles(theme);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
return (
|
|
15
|
+
<Box sx={{ flexGrow: 1 }}>
|
|
16
|
+
<AppBar position="static" sx={styles.appbar} elevation={2}>
|
|
17
|
+
<Toolbar sx={styles.toolbar}>
|
|
18
|
+
<Stack>
|
|
19
|
+
<Typography variant="body1" color="info.main">
|
|
20
|
+
{props.section}
|
|
21
|
+
</Typography>
|
|
22
|
+
<Typography variant="h4">{props.title}</Typography>
|
|
23
|
+
</Stack>
|
|
24
|
+
</Toolbar>
|
|
25
|
+
</AppBar>
|
|
26
|
+
</Box>
|
|
27
|
+
);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const getStyles = (theme: Theme) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
return {
|
|
32
|
+
appbar: {
|
|
33
|
+
color: "text.primary",
|
|
34
|
+
},
|
|
35
|
+
toolbar: {
|
|
36
|
+
backgroundColor: "white",
|
|
37
|
+
padding: theme.spacing(2, 0),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export default IntegrateHeader;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as IntegrateHeader } from "./header";
|
|
2
2
|
export { default as DashboardListHeader } from "./dashboard-list-header";
|
|
3
3
|
export { default as ExecutionDetailsHeader } from "./execution-details-header";
|
|
4
|
+
export { default as IntegrationDetailsHeader } from "./integration-details-header";
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useTranslations } from "next-intl";
|
|
3
|
+
|
|
4
|
+
// MUI
|
|
5
|
+
import { Theme, useTheme } from "@mui/material";
|
|
6
|
+
import { Grid2 as Grid, Stack, Divider, Button, Box } from "@mui/material";
|
|
7
|
+
import {
|
|
8
|
+
InfoOutlined,
|
|
9
|
+
Code,
|
|
10
|
+
FileUploadOutlined,
|
|
11
|
+
PlayArrowOutlined,
|
|
12
|
+
} from "@mui/icons-material";
|
|
13
|
+
|
|
14
|
+
// Custom components
|
|
15
|
+
import { TitleEdit } from "@evenicanpm/admin-integrate/components/core";
|
|
16
|
+
|
|
17
|
+
// TODO: when applying on page, change to use type of API query result
|
|
18
|
+
type DetailsTemp = {
|
|
19
|
+
name: string;
|
|
20
|
+
processIcon: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
interface Props {
|
|
24
|
+
details: DetailsTemp;
|
|
25
|
+
setDetails: (newDetails: DetailsTemp) => void;
|
|
26
|
+
children?: React.ReactNode; // buttons to go in header, e.g. save, cancel etc.
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const IntegrationDetailsHeader: React.FC<Props> = (props: Props) => {
|
|
30
|
+
const t = useTranslations("Integrate.Integrations.Details");
|
|
31
|
+
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
const styles = getStyles(theme);
|
|
34
|
+
|
|
35
|
+
const onConfirm = (input: string) => {
|
|
36
|
+
props.setDetails({ ...props.details, name: input });
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Grid container rowSpacing={1} columnSpacing={0}>
|
|
41
|
+
<Grid size={{ xs: 12, sm: 8 }}>
|
|
42
|
+
<Stack spacing={1} direction="row" alignItems="center">
|
|
43
|
+
{/* TODO: Apply Process icon component once that is merged. Using temp icon for now */}
|
|
44
|
+
<InfoOutlined color="info" />
|
|
45
|
+
|
|
46
|
+
<TitleEdit
|
|
47
|
+
title={props.details.name}
|
|
48
|
+
onConfirm={onConfirm}
|
|
49
|
+
variant="h5"
|
|
50
|
+
/>
|
|
51
|
+
</Stack>
|
|
52
|
+
</Grid>
|
|
53
|
+
<Grid size={{ xs: 12, sm: 4 }}>
|
|
54
|
+
<Stack
|
|
55
|
+
spacing={1}
|
|
56
|
+
direction="row"
|
|
57
|
+
alignItems="center"
|
|
58
|
+
justifyContent={{ xs: "flex-start", sm: "flex-end" }}
|
|
59
|
+
>
|
|
60
|
+
{/* E.g. create, save, cancel buttons, etc. */}
|
|
61
|
+
{props.children}
|
|
62
|
+
</Stack>
|
|
63
|
+
</Grid>
|
|
64
|
+
<Grid size={12}>
|
|
65
|
+
<Divider sx={styles.divider} />
|
|
66
|
+
</Grid>
|
|
67
|
+
<Grid size={12}>
|
|
68
|
+
<Stack direction="row">
|
|
69
|
+
<Box sx={styles.controlsButton}>
|
|
70
|
+
<Button startIcon={<Code />}>{t("codeView")}</Button>
|
|
71
|
+
</Box>
|
|
72
|
+
<Box sx={styles.controlsButton}>
|
|
73
|
+
<Button startIcon={<FileUploadOutlined />}>{t("import")}</Button>
|
|
74
|
+
</Box>
|
|
75
|
+
<Box sx={{ ...styles.controlsButton, border: "none" }}>
|
|
76
|
+
<Button startIcon={<PlayArrowOutlined />}>{t("executions")}</Button>
|
|
77
|
+
</Box>
|
|
78
|
+
</Stack>
|
|
79
|
+
</Grid>
|
|
80
|
+
</Grid>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const getStyles = (theme: Theme) => {
|
|
85
|
+
return {
|
|
86
|
+
divider: {
|
|
87
|
+
border: `1px solid ${theme.palette.grey[500]}`,
|
|
88
|
+
},
|
|
89
|
+
controlsButton: {
|
|
90
|
+
padding: theme.spacing(0, 1),
|
|
91
|
+
fontSize: theme.typography.body1.fontSize,
|
|
92
|
+
color: theme.palette.grey[600],
|
|
93
|
+
borderRadius: 0,
|
|
94
|
+
borderRight: `${theme.spacing(0.2)} solid ${theme.palette.grey[500]}`,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export default IntegrationDetailsHeader;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
2
|
|
|
3
3
|
const UpDown = createSvgIcon(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="M8.64847 6.88354H3.35158C3.04454 6.88354 2.86173 7.2269 3.03517 7.4812L5.68362 11.3824C5.83596 11.6062 6.16526 11.6062 6.3176 11.3824L8.96605 7.4812C9.13714 7.2269 8.9555 6.88354 8.64847 6.88354Z"
|
|
7
|
+
fill="currentColor"
|
|
8
|
+
/>
|
|
9
|
+
<path
|
|
10
|
+
d="M8.64852 6.76641C8.54188 6.76641 8.43524 6.76641 8.32743 6.76641C8.05204 6.76641 7.77782 6.76641 7.50243 6.76641C7.13329 6.76641 6.76532 6.76641 6.39618 6.76641C6.0036 6.76641 5.61102 6.76641 5.21845 6.76641C4.87274 6.76641 4.52821 6.76641 4.18251 6.76641C3.95517 6.76641 3.72783 6.76641 3.49931 6.76641C3.45361 6.76641 3.40673 6.76641 3.36103 6.76641C3.17705 6.76758 3.00478 6.85898 2.91455 7.02187C2.82197 7.18828 2.83251 7.39102 2.93916 7.54922C2.96728 7.59141 2.9954 7.63242 3.02353 7.67344C3.16064 7.87617 3.29892 8.07891 3.43603 8.28164C3.64111 8.58281 3.84618 8.88516 4.05009 9.18633C4.26923 9.50977 4.48954 9.8332 4.70868 10.1566C4.89384 10.4285 5.07782 10.7016 5.26298 10.9734C5.36259 11.1211 5.46337 11.2687 5.56298 11.4164C5.63798 11.5277 5.73642 11.6168 5.87001 11.6508C6.08446 11.7059 6.2954 11.6145 6.41962 11.4363C6.50282 11.3168 6.58368 11.1949 6.66571 11.0742C6.84032 10.8164 7.01493 10.5598 7.18954 10.302C7.40751 9.97969 7.62665 9.65859 7.84461 9.33633C8.05438 9.02812 8.26415 8.71875 8.47274 8.41055C8.62391 8.18789 8.77508 7.96406 8.92625 7.74141C9.02703 7.59375 9.14891 7.44961 9.14539 7.26094C9.14422 6.98672 8.91922 6.77109 8.64852 6.76641C8.49735 6.76406 8.49735 6.99844 8.64852 7.00078C8.85125 7.0043 8.98133 7.22109 8.88055 7.39687C8.8618 7.42969 8.83836 7.46133 8.81727 7.49297C8.70125 7.66289 8.58641 7.83398 8.47039 8.00391C8.06493 8.60156 7.65946 9.19922 7.25282 9.79687C6.93173 10.2703 6.61063 10.7437 6.28954 11.216C6.2661 11.2512 6.24266 11.2863 6.21805 11.3203C6.12313 11.4504 5.94149 11.4715 5.82548 11.3684C5.79149 11.3379 5.76806 11.2992 5.74227 11.2617C5.69774 11.1961 5.65321 11.1305 5.60868 11.0648C5.2454 10.5305 4.88212 9.99492 4.52001 9.46055C4.13915 8.89922 3.75712 8.33672 3.37626 7.77539C3.29775 7.65937 3.21806 7.54453 3.14072 7.42852C3.05634 7.30195 3.07392 7.14726 3.18642 7.0582C3.2497 7.00898 3.31298 7.00078 3.3915 7.00078C3.86025 7.00078 4.33017 7.00078 4.79892 7.00078C5.55009 7.00078 6.30126 7.00078 7.05243 7.00078C7.55985 7.00078 8.0661 7.00078 8.57352 7.00078C8.5993 7.00078 8.62391 7.00078 8.64969 7.00078C8.79852 7.00078 8.79969 6.76641 8.64852 6.76641ZM8.64852 5.11641H3.35165C3.04462 5.11641 2.86181 4.77305 3.03525 4.51875L5.68368 0.617578C5.83602 0.39375 6.16532 0.39375 6.31766 0.617578L8.9661 4.51875C9.13719 4.77305 8.95555 5.11641 8.64852 5.11641Z"
|
|
11
|
+
fill="currentColor"
|
|
12
|
+
/>
|
|
13
|
+
<path
|
|
14
|
+
d="M8.64832 4.99922C8.28153 4.99922 7.91473 4.99922 7.54676 4.99922C6.80262 4.99922 6.05849 4.99922 5.31552 4.99922C4.73193 4.99922 4.14834 4.99922 3.56592 4.99922C3.50615 4.99922 3.44639 4.99922 3.38662 4.99922C3.30459 4.99922 3.23428 4.98515 3.17803 4.93476C3.07022 4.83633 3.05733 4.6957 3.1417 4.57031C3.16865 4.53047 3.19561 4.49062 3.22256 4.45195C3.55068 3.96914 3.87881 3.48633 4.20576 3.00234C4.60888 2.4082 5.01201 1.81524 5.41513 1.2211C5.52529 1.05821 5.63661 0.895317 5.74677 0.732426C5.77372 0.692583 5.7995 0.650395 5.83583 0.62227C5.95536 0.52852 6.12763 0.55313 6.21903 0.680864C6.30106 0.794536 6.37724 0.912895 6.45575 1.02891C6.62333 1.27618 6.79208 1.52461 6.95966 1.77188C7.37801 2.38828 7.79637 3.00469 8.21473 3.61992C8.37293 3.85312 8.53113 4.08515 8.68816 4.31836C8.7327 4.38281 8.77605 4.44844 8.82059 4.51289C8.8452 4.55039 8.87566 4.58789 8.89441 4.6289C8.96824 4.8 8.84051 4.9957 8.64832 4.99922C8.49715 5.00156 8.49715 5.23593 8.64832 5.23359C8.92371 5.2289 9.15926 5.00039 9.14871 4.71914C9.14519 4.60898 9.10301 4.51289 9.04324 4.425C8.93777 4.26914 8.8323 4.11445 8.72684 3.95859C8.53934 3.68203 8.35184 3.40547 8.16317 3.12891C7.94285 2.80547 7.72371 2.48086 7.5034 2.15742C7.30184 1.85977 7.10028 1.56211 6.89755 1.26563C6.76395 1.06875 6.62919 0.870707 6.49559 0.673833C6.47098 0.637505 6.44638 0.600005 6.42059 0.563677C6.29403 0.382036 6.06903 0.287115 5.85224 0.356255C5.65419 0.418364 5.56044 0.591802 5.45146 0.751176C5.30146 0.971488 5.15263 1.1918 5.00263 1.41328C4.79287 1.72266 4.5831 2.03203 4.37216 2.34141C4.1542 2.6625 3.93623 2.98242 3.71943 3.30352C3.54365 3.5625 3.3667 3.82266 3.19092 4.08164C3.10654 4.20586 3.021 4.3289 2.93779 4.45429C2.82998 4.61601 2.82178 4.82929 2.9249 4.99687C3.01983 5.15039 3.18389 5.23476 3.36318 5.23593C3.50615 5.23711 3.65029 5.23593 3.79326 5.23593C4.08974 5.23593 4.38623 5.23593 4.68271 5.23593C5.06357 5.23593 5.44325 5.23593 5.82411 5.23593C6.21317 5.23593 6.60223 5.23593 6.9913 5.23593C7.31942 5.23593 7.64872 5.23593 7.97684 5.23593C8.17371 5.23593 8.37059 5.23593 8.56746 5.23593C8.59441 5.23593 8.62137 5.23593 8.64832 5.23593C8.79832 5.23359 8.79949 4.99922 8.64832 4.99922Z"
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
/>
|
|
17
|
+
</svg>,
|
|
18
|
+
"UpDown",
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
export default UpDown;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Filters,
|
|
3
|
+
MultiSelectFilter,
|
|
4
|
+
} from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
|
|
5
|
+
|
|
6
|
+
export interface IntegrationListFilters extends Filters {
|
|
7
|
+
multiSelectFilter: MultiSelectFilter;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const integrationListFilters: IntegrationListFilters = {
|
|
11
|
+
multiSelectFilter: {
|
|
12
|
+
type: "multiSelect",
|
|
13
|
+
label: "IntegrationList.tags",
|
|
14
|
+
value: null,
|
|
15
|
+
options: [
|
|
16
|
+
{ id: "Schedule Pending", value: "IntegrationList.scheduledPending" },
|
|
17
|
+
{ id: "Scheduled", value: "IntegrationList.scheduled" },
|
|
18
|
+
{ id: "Triggered", value: "IntegrationList.triggered" },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { SxProps } from "@mui/material";
|
|
4
|
+
import StorageIcon from "@mui/icons-material/Storage";
|
|
5
|
+
import ElectricBoltIcon from "@mui/icons-material/ElectricBolt";
|
|
6
|
+
import CodeIcon from "@mui/icons-material/Code";
|
|
7
|
+
import TableChartIcon from "@mui/icons-material/TableChart";
|
|
8
|
+
import EmailIcon from "@mui/icons-material/Email";
|
|
9
|
+
import IosShareIcon from "@mui/icons-material/IosShare";
|
|
10
|
+
import QuestionMarkIcon from "@mui/icons-material/QuestionMark";
|
|
11
|
+
import { purple } from "@mui/material/colors";
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
processIcon: string;
|
|
15
|
+
sx?: SxProps;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const IntegrationStatusIcon: React.FC<Props> = (props: Props) => {
|
|
19
|
+
const color = purple[500];
|
|
20
|
+
const statusIconMap = {
|
|
21
|
+
DB: <StorageIcon color="success" />,
|
|
22
|
+
Webhook: <ElectricBoltIcon color="error" />,
|
|
23
|
+
Restful: <CodeIcon color="info" />,
|
|
24
|
+
Table: <TableChartIcon sx={{ color: color }} />,
|
|
25
|
+
Email: <EmailIcon color="warning" />,
|
|
26
|
+
Export: <IosShareIcon color="primary" />,
|
|
27
|
+
noIcon: <QuestionMarkIcon color="info" />,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return statusIconMap[props.processIcon] || statusIconMap["noIcon"];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default IntegrationStatusIcon;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
import { Box, Typography, SxProps } from "@mui/material";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
|
|
6
|
+
const StyledTagBox = styled(Box)(({ theme }) => ({
|
|
7
|
+
padding: theme.spacing(0, 1.5),
|
|
8
|
+
border: "solid 1px",
|
|
9
|
+
borderRadius: 4,
|
|
10
|
+
alignContent: "center",
|
|
11
|
+
maxWidth: "fit-content",
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
const StyledTag = styled(Typography)(({ theme }) => ({
|
|
15
|
+
fontWeight: "bold",
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
interface Props {
|
|
19
|
+
process: {
|
|
20
|
+
isScheduled: number;
|
|
21
|
+
isTriggered: number;
|
|
22
|
+
};
|
|
23
|
+
sx?: SxProps;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const IntegrationTag: React.FC<Props> = ({ process, sx }) => {
|
|
27
|
+
const t = useTranslations("Integrate.IntegrationList");
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Box display="flex" gap={1} justifyContent="center">
|
|
31
|
+
{process.isTriggered === 1 && (
|
|
32
|
+
<StyledTagBox
|
|
33
|
+
sx={{
|
|
34
|
+
backgroundColor: "info.100",
|
|
35
|
+
borderColor: "transparent",
|
|
36
|
+
...sx,
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
<StyledTag color="info" variant="caption">
|
|
40
|
+
{t("triggered")}
|
|
41
|
+
</StyledTag>
|
|
42
|
+
</StyledTagBox>
|
|
43
|
+
)}
|
|
44
|
+
|
|
45
|
+
{process.isScheduled === 1 && (
|
|
46
|
+
<StyledTagBox
|
|
47
|
+
sx={{
|
|
48
|
+
backgroundColor: "success.100",
|
|
49
|
+
borderColor: "transparent",
|
|
50
|
+
...sx,
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<StyledTag color="success" variant="caption">
|
|
54
|
+
{t("scheduled")}
|
|
55
|
+
</StyledTag>
|
|
56
|
+
</StyledTagBox>
|
|
57
|
+
)}
|
|
58
|
+
|
|
59
|
+
{process.isScheduled === 0 && process.isTriggered === 0 && (
|
|
60
|
+
<StyledTagBox
|
|
61
|
+
sx={{
|
|
62
|
+
backgroundColor: "warning.100",
|
|
63
|
+
borderColor: "transparent",
|
|
64
|
+
color: "orange.700",
|
|
65
|
+
...sx,
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
68
|
+
<StyledTag color="inherit" variant="caption">
|
|
69
|
+
{t("scheduledPending")}
|
|
70
|
+
</StyledTag>
|
|
71
|
+
</StyledTagBox>
|
|
72
|
+
)}
|
|
73
|
+
</Box>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export default IntegrationTag;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { BaseEdge, EdgeProps, getSmoothStepPath } from "@xyflow/react";
|
|
2
2
|
|
|
3
3
|
export function DefaultEdge({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
id,
|
|
5
|
+
sourceX,
|
|
6
|
+
sourceY,
|
|
7
|
+
targetX,
|
|
8
|
+
targetY,
|
|
9
|
+
markerEnd,
|
|
9
10
|
}: EdgeProps): JSX.Element {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const [edgePath] = getSmoothStepPath({
|
|
12
|
+
sourceX,
|
|
13
|
+
sourceY,
|
|
14
|
+
targetX,
|
|
15
|
+
targetY,
|
|
16
|
+
borderRadius: 0,
|
|
17
|
+
});
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<BaseEdge id={id} path={edgePath} markerEnd={markerEnd} />
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
23
24
|
}
|