@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
|
@@ -8,7 +8,6 @@ import { Item } from "./executions-list";
|
|
|
8
8
|
import { ProcessExecutionInput } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
9
9
|
|
|
10
10
|
// MUI
|
|
11
|
-
import { Theme, useTheme } from "@mui/material";
|
|
12
11
|
import { TableContainer, Table, TableBody } from "@mui/material";
|
|
13
12
|
import { SxProps } from "@mui/material";
|
|
14
13
|
|
|
@@ -19,60 +18,53 @@ import { TableHeader } from "@evenicanpm/admin-integrate/components/data-table";
|
|
|
19
18
|
import ExecutionsListRow from "./executions-list-row";
|
|
20
19
|
|
|
21
20
|
interface Props {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
heading: Head[];
|
|
22
|
+
items: Item[];
|
|
23
|
+
input: ProcessExecutionInput;
|
|
24
|
+
setInput: (newInput: ProcessExecutionInput) => void;
|
|
25
|
+
rowSx?: SxProps;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export default function ExecutionsListTable(props: Props) {
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const handleRequestSort = (property: string) => {
|
|
30
|
+
const current = props.input.sort;
|
|
31
|
+
if (property === current) {
|
|
32
|
+
props.setInput({
|
|
33
|
+
...props.input,
|
|
34
|
+
sortDesc: !props.input.sortDesc,
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
props.setInput({
|
|
38
|
+
...props.input,
|
|
39
|
+
sort: property,
|
|
40
|
+
sortDesc: false,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
32
44
|
|
|
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
|
-
rowSx={props.rowSx}
|
|
59
|
-
/>
|
|
60
|
-
<TableBody>
|
|
61
|
-
{props.items.map((item, index) => (
|
|
62
|
-
<ExecutionsListRow
|
|
63
|
-
key={index}
|
|
64
|
-
item={item}
|
|
65
|
-
heading={props.heading}
|
|
66
|
-
sx={props.rowSx}
|
|
67
|
-
/>
|
|
68
|
-
))}
|
|
69
|
-
</TableBody>
|
|
70
|
-
</Table>
|
|
71
|
-
</TableContainer>
|
|
72
|
-
</>
|
|
73
|
-
);
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<TableContainer>
|
|
48
|
+
<Table>
|
|
49
|
+
<TableHeader
|
|
50
|
+
heading={props.heading}
|
|
51
|
+
orderBy={props.input.sort || ""}
|
|
52
|
+
order={props.input.sortDesc ? "desc" : "asc"}
|
|
53
|
+
onRequestSort={handleRequestSort}
|
|
54
|
+
rowSx={props.rowSx}
|
|
55
|
+
/>
|
|
56
|
+
<TableBody>
|
|
57
|
+
{props.items.map((item, index) => (
|
|
58
|
+
<ExecutionsListRow
|
|
59
|
+
key={index}
|
|
60
|
+
item={item}
|
|
61
|
+
heading={props.heading}
|
|
62
|
+
sx={props.rowSx}
|
|
63
|
+
/>
|
|
64
|
+
))}
|
|
65
|
+
</TableBody>
|
|
66
|
+
</Table>
|
|
67
|
+
</TableContainer>
|
|
68
|
+
</>
|
|
69
|
+
);
|
|
74
70
|
}
|
|
75
|
-
|
|
76
|
-
const getStyles = (theme: Theme) => {
|
|
77
|
-
return {};
|
|
78
|
-
};
|
|
@@ -7,20 +7,13 @@ import { ProcessExecutionInput } from "@evenicanpm/admin-core/api/e4/graphqlRequ
|
|
|
7
7
|
|
|
8
8
|
// MUI
|
|
9
9
|
import { Theme, useTheme } from "@mui/material";
|
|
10
|
-
import {
|
|
11
|
-
Card,
|
|
12
|
-
Box,
|
|
13
|
-
Stack,
|
|
14
|
-
Typography,
|
|
15
|
-
Grid2 as Grid,
|
|
16
|
-
Skeleton,
|
|
17
|
-
} from "@mui/material";
|
|
10
|
+
import { Card, Box, Stack, Typography, Grid2 as Grid } from "@mui/material";
|
|
18
11
|
|
|
19
12
|
// Custom components
|
|
20
13
|
import { FlexBox } from "@evenicanpm/admin-core/components/flex-box";
|
|
21
14
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
TablePagination,
|
|
16
|
+
TableSkeleton,
|
|
24
17
|
} from "@evenicanpm/admin-integrate/components/data-table";
|
|
25
18
|
import { ListFilter } from "@evenicanpm/admin-integrate/components/list-filter";
|
|
26
19
|
|
|
@@ -31,235 +24,249 @@ import ExecutionsListTable from "./executions-list-table";
|
|
|
31
24
|
import { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
|
|
32
25
|
import { ListFilterOutput } from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
|
|
33
26
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
ExecutionsListFilters,
|
|
28
|
+
executionListFilters,
|
|
36
29
|
} from "@evenicanpm/admin-integrate/components/execution/execution-filter";
|
|
37
30
|
|
|
38
31
|
// Returned from processExecutions query
|
|
39
32
|
export interface Item {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
startDate: string;
|
|
36
|
+
executionStatus: {
|
|
37
|
+
id: string;
|
|
38
|
+
};
|
|
39
|
+
process: {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
49
42
|
}
|
|
50
43
|
|
|
51
44
|
// Row height in terms of multiples of theme.spacing(1) (e.g. theme.spacing(7.5 & rows per page))
|
|
52
45
|
const rowHeight = 7.5;
|
|
53
46
|
|
|
54
47
|
interface Props {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
heading: Head[];
|
|
49
|
+
data: GetProcessExecutionsQuery;
|
|
50
|
+
loading: boolean;
|
|
51
|
+
input: ProcessExecutionInput;
|
|
52
|
+
setInput: (newInput: ProcessExecutionInput) => void;
|
|
60
53
|
}
|
|
61
54
|
|
|
62
55
|
const ExecutionsList: React.FC<Props> = (props: Props) => {
|
|
63
|
-
|
|
56
|
+
const t = useTranslations("Integrate.Executions");
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
const theme = useTheme();
|
|
59
|
+
const styles = getStyles(theme);
|
|
67
60
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
const [items, setItems] = useState<Item[]>([]);
|
|
62
|
+
const [fetched, setFetched] = useState<boolean>(false); // prevents "empty list" msg from showing for split second
|
|
63
|
+
// in practice skip and top are never undefined. this is to satisfy linting.
|
|
64
|
+
const [page, setPage] = useState(
|
|
65
|
+
(props.input.skip || 0) / (props.input.top || 10) + 1,
|
|
66
|
+
);
|
|
67
|
+
const [perPage, setPerPage] = useState<number>(props.input.top || 10);
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
69
|
+
const handleChangePage = (
|
|
70
|
+
event: React.ChangeEvent<unknown>,
|
|
71
|
+
value: number,
|
|
72
|
+
) => {
|
|
73
|
+
if (page !== value && event) {
|
|
74
|
+
setPage(value);
|
|
75
|
+
props.setInput({
|
|
76
|
+
...props.input,
|
|
77
|
+
skip: (props.input.top || 10) * (value - 1),
|
|
78
|
+
});
|
|
79
|
+
setFetched(false);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
83
|
+
const handleSetFilters = (
|
|
84
|
+
filterUpdate: ListFilterOutput<ExecutionsListFilters>,
|
|
85
|
+
) => {
|
|
86
|
+
const { itemsPerPage, search, filters } = filterUpdate;
|
|
87
|
+
props.setInput({
|
|
88
|
+
...props.input,
|
|
89
|
+
top: itemsPerPage,
|
|
90
|
+
skip: 0,
|
|
91
|
+
search: search,
|
|
92
|
+
dateRange: {
|
|
93
|
+
startDate: filters.dateRange?.start,
|
|
94
|
+
endDate: filters.dateRange?.end,
|
|
95
|
+
},
|
|
96
|
+
executionStatusIds: filters.multiSelectFilter?.map(
|
|
97
|
+
(obj) => obj.id as number,
|
|
98
|
+
),
|
|
99
|
+
});
|
|
100
|
+
setFetched(false);
|
|
101
|
+
setPerPage(itemsPerPage as number);
|
|
102
|
+
setPage(1);
|
|
103
|
+
};
|
|
108
104
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
const handleClearFilters = () => {
|
|
106
|
+
props.setInput({
|
|
107
|
+
...props.input,
|
|
108
|
+
skip: 0,
|
|
109
|
+
dateRange: null,
|
|
110
|
+
executionStatusIds: null,
|
|
111
|
+
});
|
|
112
|
+
setFetched(false);
|
|
113
|
+
};
|
|
118
114
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (props.data?.processExecutions?.nodes) {
|
|
117
|
+
setItems(props.data.processExecutions.nodes as Item[]);
|
|
118
|
+
setFetched(true);
|
|
119
|
+
}
|
|
120
|
+
}, [props.data]);
|
|
125
121
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
122
|
+
return (
|
|
123
|
+
<>
|
|
124
|
+
<Box sx={styles.list}>
|
|
125
|
+
<ListFilter<ExecutionsListFilters>
|
|
126
|
+
setFilters={handleSetFilters}
|
|
127
|
+
clearFilters={handleClearFilters}
|
|
128
|
+
filters={executionListFilters}
|
|
129
|
+
config={{
|
|
130
|
+
pagination: {
|
|
131
|
+
pageDefault: 10,
|
|
132
|
+
pageOptions: [10, 20, 50],
|
|
133
|
+
},
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
136
|
+
</Box>
|
|
141
137
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
138
|
+
{props.loading && !props.data && (
|
|
139
|
+
<Card>
|
|
140
|
+
<TableSkeleton
|
|
141
|
+
heading={props.heading}
|
|
142
|
+
perPage={perPage}
|
|
143
|
+
rowSx={styles.rowSx}
|
|
144
|
+
/>
|
|
145
|
+
</Card>
|
|
146
|
+
)}
|
|
151
147
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
148
|
+
{!props.loading &&
|
|
149
|
+
props.data?.processExecutions &&
|
|
150
|
+
fetched &&
|
|
151
|
+
items.length > 0 ? (
|
|
152
|
+
<Box
|
|
153
|
+
sx={{
|
|
154
|
+
minHeight:
|
|
155
|
+
props.data.processExecutions.pageInfo.resultsReturned < perPage &&
|
|
156
|
+
page === 1
|
|
157
|
+
? theme.spacing(
|
|
158
|
+
rowHeight *
|
|
159
|
+
(props.data.processExecutions.pageInfo.resultsReturned +
|
|
160
|
+
1),
|
|
161
|
+
)
|
|
162
|
+
: theme.spacing(rowHeight * (perPage + 1)),
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
<Card>
|
|
166
|
+
<ExecutionsListTable
|
|
167
|
+
heading={props.heading}
|
|
168
|
+
items={items}
|
|
169
|
+
input={props.input}
|
|
170
|
+
setInput={props.setInput}
|
|
171
|
+
rowSx={styles.rowSx}
|
|
172
|
+
/>
|
|
173
|
+
</Card>
|
|
174
|
+
</Box>
|
|
175
|
+
) : null}
|
|
177
176
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
177
|
+
{!props.loading && fetched && items.length === 0 ? (
|
|
178
|
+
<Card>
|
|
179
|
+
<FlexBox
|
|
180
|
+
justifyContent="center"
|
|
181
|
+
alignItems="center"
|
|
182
|
+
sx={{
|
|
183
|
+
minHeight: "335px",
|
|
184
|
+
marginBottom: theme.spacing(2),
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
187
|
+
<Stack spacing={1} justifyContent="center" alignItems="center">
|
|
188
|
+
<Typography variant="h6" color="info">
|
|
189
|
+
{t("ListEmpty.title")}
|
|
190
|
+
</Typography>
|
|
191
|
+
<Typography variant="body1">{t("ListEmpty.body")}</Typography>
|
|
192
|
+
</Stack>
|
|
193
|
+
</FlexBox>
|
|
194
|
+
</Card>
|
|
195
|
+
) : null}
|
|
197
196
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
197
|
+
{!props.loading &&
|
|
198
|
+
props.data?.processExecutions &&
|
|
199
|
+
fetched &&
|
|
200
|
+
items.length > 0 ? (
|
|
201
|
+
<Grid container spacing={1} sx={styles.pagination}>
|
|
202
|
+
<Grid size={{ xs: 10.5 }}>
|
|
203
|
+
<FlexBox
|
|
204
|
+
justifyContent="center"
|
|
205
|
+
alignItems="center"
|
|
206
|
+
sx={styles.paginationBox}
|
|
207
|
+
>
|
|
208
|
+
<TablePagination
|
|
209
|
+
page={page}
|
|
210
|
+
onChange={handleChangePage}
|
|
211
|
+
count={Math.ceil(
|
|
212
|
+
(props.data.processExecutions.recordCount || 10) /
|
|
213
|
+
(props.input.top || 10),
|
|
214
|
+
)}
|
|
215
|
+
/>
|
|
216
|
+
</FlexBox>
|
|
217
|
+
</Grid>
|
|
218
|
+
<Grid size={{ xs: 1.5 }}>
|
|
219
|
+
<FlexBox
|
|
220
|
+
justifyContent="flex-end"
|
|
221
|
+
alignItems="center"
|
|
222
|
+
sx={{ height: "100%" }}
|
|
223
|
+
>
|
|
224
|
+
<Typography color="grey">
|
|
225
|
+
{`${props.data.processExecutions.pageInfo.resultsReturned} ${t(
|
|
226
|
+
"Pagination.of",
|
|
227
|
+
)} ${props.data.processExecutions.recordCount} ${t(
|
|
228
|
+
"Pagination.items",
|
|
229
|
+
)}`}
|
|
230
|
+
</Typography>
|
|
231
|
+
</FlexBox>
|
|
232
|
+
</Grid>
|
|
233
|
+
</Grid>
|
|
234
|
+
) : null}
|
|
235
|
+
</>
|
|
236
|
+
);
|
|
230
237
|
};
|
|
231
238
|
|
|
232
239
|
const getStyles = (theme: Theme) => {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
240
|
+
return {
|
|
241
|
+
title: {
|
|
242
|
+
display: "flex",
|
|
243
|
+
alignItems: "center",
|
|
244
|
+
height: "100%",
|
|
245
|
+
},
|
|
246
|
+
typography: {
|
|
247
|
+
fontWeight: "medium",
|
|
248
|
+
},
|
|
249
|
+
button: {
|
|
250
|
+
borderWidth: 2,
|
|
251
|
+
borderRadius: 1,
|
|
252
|
+
marginRight: theme.spacing(1),
|
|
253
|
+
},
|
|
254
|
+
iconButton: {
|
|
255
|
+
borderRadius: 1,
|
|
256
|
+
},
|
|
257
|
+
pagination: {
|
|
258
|
+
marginTop: theme.spacing(2),
|
|
259
|
+
},
|
|
260
|
+
list: {
|
|
261
|
+
margin: theme.spacing(2, 0),
|
|
262
|
+
},
|
|
263
|
+
paginationBox: {
|
|
264
|
+
paddingLeft: theme.spacing(15),
|
|
265
|
+
},
|
|
266
|
+
rowSx: {
|
|
267
|
+
height: theme.spacing(rowHeight),
|
|
268
|
+
},
|
|
269
|
+
};
|
|
263
270
|
};
|
|
264
271
|
|
|
265
272
|
export default ExecutionsList;
|