@evenicanpm/admin-integrate 1.1.0 → 1.2.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/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/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-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/integrations.tsx +17 -25
- 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
|
@@ -10,100 +10,104 @@ import { ExpandLess, ExpandMore } from "@mui/icons-material";
|
|
|
10
10
|
|
|
11
11
|
// STYLED COMPONENTS
|
|
12
12
|
const StyledTableCell = styled(TableCell)(({ theme }) => ({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
fontWeight: 500,
|
|
14
|
+
padding: "16px 20px",
|
|
15
|
+
color: theme.palette.grey[900],
|
|
16
16
|
}));
|
|
17
17
|
|
|
18
18
|
// ==============================================================
|
|
19
19
|
export type Head = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
align: string;
|
|
23
|
+
width?: string;
|
|
24
|
+
sortable?: boolean;
|
|
25
25
|
};
|
|
26
26
|
interface Props {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
heading: Head[];
|
|
28
|
+
orderBy: string;
|
|
29
|
+
order: "asc" | "desc";
|
|
30
|
+
onRequestSort?: (id: string) => void; // if provided, make list sortable by column
|
|
31
|
+
rowSx?: SxProps;
|
|
32
32
|
}
|
|
33
33
|
// ==============================================================
|
|
34
34
|
|
|
35
35
|
export default function TableHeader({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
order,
|
|
37
|
+
heading,
|
|
38
|
+
orderBy,
|
|
39
|
+
onRequestSort,
|
|
40
|
+
rowSx,
|
|
41
41
|
}: Props) {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const theme = useTheme();
|
|
43
|
+
const styles = getStyles(theme);
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
45
|
+
return (
|
|
46
|
+
<TableHead sx={{ backgroundColor: "grey.200" }}>
|
|
47
|
+
<TableRow sx={rowSx}>
|
|
48
|
+
{heading.map((headCell) => (
|
|
49
|
+
<StyledTableCell
|
|
50
|
+
key={headCell.id}
|
|
51
|
+
align={headCell.align as TableCellProps["align"]}
|
|
52
|
+
sortDirection={orderBy === headCell.id ? order : false}
|
|
53
|
+
width={headCell.width}
|
|
54
|
+
sx={styles.cell}
|
|
55
|
+
>
|
|
56
|
+
{onRequestSort && headCell.sortable ? (
|
|
57
|
+
<TableSortLabel
|
|
58
|
+
active={orderBy === headCell.id}
|
|
59
|
+
onClick={() => onRequestSort(headCell.id)}
|
|
60
|
+
direction={orderBy === headCell.id ? order : "asc"}
|
|
61
|
+
sx={styles.sortLabel}
|
|
62
|
+
IconComponent={() =>
|
|
63
|
+
order === "desc" && orderBy === headCell.id ? (
|
|
64
|
+
<ExpandMore
|
|
65
|
+
sx={{
|
|
66
|
+
...styles.sortIcon,
|
|
67
|
+
visibility:
|
|
68
|
+
orderBy === headCell.id ? "visible" : "hidden",
|
|
69
|
+
}}
|
|
70
|
+
/>
|
|
71
|
+
) : (
|
|
72
|
+
<ExpandLess
|
|
73
|
+
sx={{
|
|
74
|
+
...styles.sortIcon,
|
|
75
|
+
visibility:
|
|
76
|
+
orderBy === headCell.id ? "visible" : "hidden",
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
>
|
|
82
|
+
{headCell.label}
|
|
83
|
+
</TableSortLabel>
|
|
84
|
+
) : (
|
|
85
|
+
headCell.label
|
|
86
|
+
)}
|
|
87
|
+
</StyledTableCell>
|
|
88
|
+
))}
|
|
89
|
+
</TableRow>
|
|
90
|
+
</TableHead>
|
|
91
|
+
);
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
const getStyles = (theme: Theme) => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
return {
|
|
96
|
+
sortLabel: {
|
|
97
|
+
"&:hover": {
|
|
98
|
+
color: "info.main",
|
|
99
|
+
"& .MuiSvgIcon-root": {
|
|
100
|
+
color: "info.main",
|
|
101
|
+
visibility: "visible",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
sortIcon: {
|
|
106
|
+
marginLeft: theme.spacing(1),
|
|
107
|
+
color: "grey.800",
|
|
108
|
+
},
|
|
109
|
+
cell: {
|
|
110
|
+
borderWidth: theme.spacing(0),
|
|
111
|
+
},
|
|
112
|
+
};
|
|
109
113
|
};
|
|
@@ -3,34 +3,34 @@ import styled from "@mui/material/styles/styled";
|
|
|
3
3
|
|
|
4
4
|
// STYLED COMPONENT
|
|
5
5
|
const StyledPagination = styled(Pagination)(({ theme }) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
"& .MuiPaginationItem-root": {
|
|
7
|
+
fontSize: 14,
|
|
8
|
+
fontWeight: 500,
|
|
9
|
+
color: theme.palette.grey[900],
|
|
10
|
+
border: `1px solid transparent`,
|
|
11
|
+
},
|
|
12
|
+
"& .MuiPaginationItem-page:hover": {
|
|
13
|
+
borderRadius: 20,
|
|
14
|
+
backgroundColor: "transparent",
|
|
15
|
+
color: theme.palette.info.main,
|
|
16
|
+
border: `1px solid ${theme.palette.info.main}`,
|
|
17
|
+
},
|
|
18
|
+
"& .MuiPaginationItem-page.Mui-selected": {
|
|
19
|
+
borderRadius: 20,
|
|
20
|
+
backgroundColor: "transparent",
|
|
21
|
+
color: theme.palette.info.main,
|
|
22
|
+
border: `1px solid ${theme.palette.info.main}`,
|
|
23
|
+
":hover": { backgroundColor: "transparent" },
|
|
24
|
+
},
|
|
25
|
+
"& .MuiPaginationItem-previousNext": {
|
|
26
|
+
margin: 10,
|
|
27
|
+
borderRadius: 20,
|
|
28
|
+
color: theme.palette.info.main,
|
|
29
|
+
border: `1px solid ${theme.palette.info.main}`,
|
|
30
|
+
"&:hover": { backgroundColor: "transparent" },
|
|
31
|
+
},
|
|
32
32
|
}));
|
|
33
33
|
|
|
34
34
|
export default function TablePagination(props: PaginationProps) {
|
|
35
|
-
|
|
35
|
+
return <StyledPagination {...props} />;
|
|
36
36
|
}
|
|
@@ -2,26 +2,26 @@ import styled from "@mui/material/styles/styled";
|
|
|
2
2
|
import { TableRow, TableCell, IconButton } from "@mui/material";
|
|
3
3
|
|
|
4
4
|
const StyledTableCell = styled(TableCell)(({ theme }) => ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
fontSize: 14,
|
|
6
|
+
paddingTop: 10,
|
|
7
|
+
fontWeight: 500,
|
|
8
|
+
paddingBottom: 10,
|
|
9
|
+
color: theme.palette.grey[900],
|
|
10
|
+
borderBottom: `1px solid ${theme.palette.grey[300]}`,
|
|
11
11
|
}));
|
|
12
12
|
|
|
13
13
|
const StyledTableRow = styled(TableRow)({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
":last-child .MuiTableCell-root": { border: 0 },
|
|
15
|
+
"&.Mui-selected": {
|
|
16
|
+
backgroundColor: "transparent",
|
|
17
|
+
":hover": { backgroundColor: "transparent" },
|
|
18
|
+
},
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
color: theme.palette.grey[600],
|
|
23
|
+
"& .MuiSvgIcon-root": { fontSize: 19 },
|
|
24
|
+
":hover": { color: theme.palette.info.main },
|
|
25
25
|
}));
|
|
26
26
|
|
|
27
27
|
export { StyledTableCell, StyledTableRow, StyledIconButton };
|
|
@@ -5,41 +5,41 @@ import TableHeader, { Head } from "./table-header";
|
|
|
5
5
|
import { StyledTableRow, StyledTableCell } from "./table-row";
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
heading: Head[];
|
|
9
|
+
perPage: number;
|
|
10
|
+
sx?: SxProps;
|
|
11
|
+
rowSx?: SxProps;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export default function TableSkeleton(props: Props) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
15
|
+
const rangeArray: number[] = Array.from(
|
|
16
|
+
{ length: props.perPage },
|
|
17
|
+
(_, i) => i,
|
|
18
|
+
);
|
|
19
|
+
return (
|
|
20
|
+
<TableContainer sx={props.sx}>
|
|
21
|
+
<Table>
|
|
22
|
+
<TableHeader
|
|
23
|
+
heading={props.heading}
|
|
24
|
+
order="asc"
|
|
25
|
+
orderBy=""
|
|
26
|
+
onRequestSort={() => {
|
|
27
|
+
// do nothing
|
|
28
|
+
}}
|
|
29
|
+
rowSx={props.rowSx}
|
|
30
|
+
/>
|
|
31
|
+
<TableBody>
|
|
32
|
+
{rangeArray.map((i: number) => (
|
|
33
|
+
<StyledTableRow key={i} sx={props.rowSx}>
|
|
34
|
+
{props.heading.map((heading: Head) => (
|
|
35
|
+
<StyledTableCell key={`${i}_${heading.id}`}>
|
|
36
|
+
<Skeleton />
|
|
37
|
+
</StyledTableCell>
|
|
38
|
+
))}
|
|
39
|
+
</StyledTableRow>
|
|
40
|
+
))}
|
|
41
|
+
</TableBody>
|
|
42
|
+
</Table>
|
|
43
|
+
</TableContainer>
|
|
44
|
+
);
|
|
45
45
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
DateRangeFilter,
|
|
3
|
+
Filters,
|
|
4
|
+
MultiSelectFilter,
|
|
5
5
|
} from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
|
|
6
6
|
|
|
7
7
|
export interface ExecutionsListFilters extends Filters {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
dateRange: DateRangeFilter;
|
|
9
|
+
multiSelectFilter: MultiSelectFilter;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const executionListFilters: ExecutionsListFilters = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
dateRange: {
|
|
14
|
+
type: "dateRange",
|
|
15
|
+
label: "Executions.dateRange",
|
|
16
|
+
value: null,
|
|
17
|
+
},
|
|
18
|
+
multiSelectFilter: {
|
|
19
|
+
type: "multiSelect",
|
|
20
|
+
label: "Executions.executionStatus",
|
|
21
|
+
value: null,
|
|
22
|
+
options: [
|
|
23
|
+
{ id: 300, value: "Executions.inProgress" },
|
|
24
|
+
{ id: 400, value: "Executions.complete" },
|
|
25
|
+
{ id: 450, value: "Executions.warning" },
|
|
26
|
+
{ id: 500, value: "Executions.failed" },
|
|
27
|
+
{ id: 999, value: "Executions.unavailable" },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
30
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { SxProps } from "@mui/material";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Clear,
|
|
5
|
+
Loop,
|
|
6
|
+
CheckCircleOutline,
|
|
7
|
+
WarningAmber,
|
|
8
|
+
ErrorOutline,
|
|
9
|
+
Clear,
|
|
11
10
|
} from "@mui/icons-material";
|
|
12
11
|
|
|
13
12
|
interface Props {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
executionStatusId: string;
|
|
14
|
+
sx?: SxProps;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
const ExecutionStatusIcon: React.FC<Props> = (props: Props) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const statusIconMap: { [key: string]: any } = {
|
|
19
|
+
"300": <Loop color="info" />,
|
|
20
|
+
"400": <CheckCircleOutline color="success" />,
|
|
21
|
+
"450": <WarningAmber color="warning" />,
|
|
22
|
+
"500": <ErrorOutline color="error" />,
|
|
23
|
+
"999": <Clear sx={{ color: "grey.600" }} />,
|
|
24
|
+
};
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
return statusIconMap[props.executionStatusId] || statusIconMap["999"];
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
export default ExecutionStatusIcon;
|
|
@@ -6,95 +6,96 @@ import { Box, Typography, SxProps } from "@mui/material";
|
|
|
6
6
|
|
|
7
7
|
// Styled components
|
|
8
8
|
const StyledTagBox = styled(Box)(({ theme }) => ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
padding: theme.spacing(0, 1.5),
|
|
10
|
+
border: "solid 1px",
|
|
11
|
+
borderRadius: 4,
|
|
12
|
+
alignContent: "center",
|
|
13
|
+
maxWidth: "fit-content",
|
|
14
|
+
maxHeight: "fit-content",
|
|
14
15
|
}));
|
|
15
|
-
const StyledTag = styled(Typography)((
|
|
16
|
-
|
|
16
|
+
const StyledTag = styled(Typography)(() => ({
|
|
17
|
+
fontWeight: "bold",
|
|
17
18
|
}));
|
|
18
19
|
|
|
19
20
|
interface Props {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
executionStatusId: string;
|
|
22
|
+
sx?: SxProps;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
const ExecutionTag: React.FC<Props> = (props: Props) => {
|
|
25
|
-
|
|
26
|
+
const t = useTranslations("Integrate");
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
28
|
+
const statusTagMap: { [key: string]: any } = {
|
|
29
|
+
300: (
|
|
30
|
+
<StyledTagBox
|
|
31
|
+
sx={{
|
|
32
|
+
backgroundColor: "info.100",
|
|
33
|
+
borderColor: "info.main",
|
|
34
|
+
...props.sx,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<StyledTag color="info" variant="caption">
|
|
38
|
+
{t("Executions.inProgress")}
|
|
39
|
+
</StyledTag>
|
|
40
|
+
</StyledTagBox>
|
|
41
|
+
),
|
|
42
|
+
400: (
|
|
43
|
+
<StyledTagBox
|
|
44
|
+
sx={{
|
|
45
|
+
backgroundColor: "success.100",
|
|
46
|
+
borderColor: "success.main",
|
|
47
|
+
...props.sx,
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
<StyledTag color="success" variant="caption">
|
|
51
|
+
{t("Executions.complete")}
|
|
52
|
+
</StyledTag>
|
|
53
|
+
</StyledTagBox>
|
|
54
|
+
),
|
|
55
|
+
450: (
|
|
56
|
+
<StyledTagBox
|
|
57
|
+
sx={{
|
|
58
|
+
backgroundColor: "warning.100",
|
|
59
|
+
borderColor: "orange.700",
|
|
60
|
+
color: "orange.700",
|
|
61
|
+
...props.sx,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
<StyledTag color="inherit" variant="caption">
|
|
65
|
+
{t("Executions.warning")}
|
|
66
|
+
</StyledTag>
|
|
67
|
+
</StyledTagBox>
|
|
68
|
+
),
|
|
69
|
+
500: (
|
|
70
|
+
<StyledTagBox
|
|
71
|
+
sx={{
|
|
72
|
+
backgroundColor: "error.100",
|
|
73
|
+
borderColor: "error.main",
|
|
74
|
+
...props.sx,
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
<StyledTag color="error" variant="caption">
|
|
78
|
+
{t("Executions.failed")}
|
|
79
|
+
</StyledTag>
|
|
80
|
+
</StyledTagBox>
|
|
81
|
+
),
|
|
82
|
+
999: (
|
|
83
|
+
<StyledTagBox
|
|
84
|
+
sx={{
|
|
85
|
+
backgroundColor: "grey.300",
|
|
86
|
+
borderColor: "grey.600",
|
|
87
|
+
color: "grey.600",
|
|
88
|
+
...props.sx,
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
<StyledTag color="inherit" variant="caption">
|
|
92
|
+
{t("Executions.unavailable")}
|
|
93
|
+
</StyledTag>
|
|
94
|
+
</StyledTagBox>
|
|
95
|
+
),
|
|
96
|
+
};
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
return statusTagMap[props.executionStatusId] || statusTagMap[999];
|
|
98
99
|
};
|
|
99
100
|
|
|
100
101
|
export default ExecutionTag;
|