@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.
Files changed (114) hide show
  1. package/documents/Process/fragments.ts +13 -0
  2. package/documents/Process/list.ts +27 -0
  3. package/documents/ProcessSchedule/fragments.ts +24 -0
  4. package/documents/ProcessSchedule/read.ts +12 -0
  5. package/documents/ProcessScheduleGroup/fragments.ts +29 -0
  6. package/documents/ProcessScheduleGroup/read.ts +12 -0
  7. package/documents/ScheduledProcess/fragments.ts +24 -0
  8. package/documents/ScheduledProcess/list.ts +27 -0
  9. package/package.json +21 -17
  10. package/src/api/Integrations/queries/get-process.query.ts +48 -0
  11. package/src/api/Integrations/queries/get-process.server.ts +9 -0
  12. package/src/api/Integrations/queries/index.ts +1 -0
  13. package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
  14. package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
  15. package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
  16. package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
  17. package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
  18. package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
  19. package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
  20. package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
  21. package/src/api/scheduler/queries/index.ts +3 -0
  22. package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
  23. package/src/components/breadcrumbs/index.ts +1 -1
  24. package/src/components/breadcrumbs/types.tsx +4 -0
  25. package/src/components/button/outlined-icon-button.tsx +26 -38
  26. package/src/components/core/date-time-popover.tsx +32 -0
  27. package/src/components/core/edited-typography.tsx +20 -0
  28. package/src/components/core/index.ts +3 -0
  29. package/src/components/core/loading.tsx +6 -6
  30. package/src/components/core/title-edit.tsx +122 -0
  31. package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
  32. package/src/components/dashboard-list/dashboard-list.tsx +119 -119
  33. package/src/components/data-table/table-header.tsx +85 -81
  34. package/src/components/data-table/table-pagination.tsx +27 -27
  35. package/src/components/data-table/table-row.tsx +14 -14
  36. package/src/components/data-table/table-skeleton.tsx +34 -34
  37. package/src/components/execution/execution-filter.ts +22 -22
  38. package/src/components/execution/execution-status-icon.tsx +16 -17
  39. package/src/components/execution/execution-tag.tsx +81 -80
  40. package/src/components/footer/footer.tsx +34 -34
  41. package/src/components/header/dashboard-list-header.tsx +64 -63
  42. package/src/components/header/execution-details-header.tsx +102 -129
  43. package/src/components/header/header.tsx +27 -27
  44. package/src/components/header/index.ts +1 -0
  45. package/src/components/header/integration-details-header.tsx +99 -0
  46. package/src/components/icons/up-down.tsx +15 -15
  47. package/src/components/integration-list/index.ts +2 -0
  48. package/src/components/integration-list/integration-filter.ts +21 -0
  49. package/src/components/integration-list/integration-status-icon.tsx +33 -0
  50. package/src/components/integration-list/integration-tag.tsx +77 -0
  51. package/src/components/integration-view/edges/default-edge.tsx +18 -17
  52. package/src/components/integration-view/elk-layout-options.ts +26 -26
  53. package/src/components/integration-view/elk-types.ts +16 -12
  54. package/src/components/integration-view/flow-types.tsx +5 -5
  55. package/src/components/integration-view/integration-view.tsx +132 -130
  56. package/src/components/integration-view/nodes/base-node.tsx +50 -0
  57. package/src/components/integration-view/nodes/connection-node.tsx +8 -8
  58. package/src/components/integration-view/nodes/entry-node.tsx +8 -8
  59. package/src/components/integration-view/nodes/group-node.tsx +47 -6
  60. package/src/components/integration-view/nodes/task-node.tsx +58 -13
  61. package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
  62. package/src/components/integration-view/types.ts +6 -6
  63. package/src/components/layouts/main-layout.tsx +13 -13
  64. package/src/components/layouts/root-container.tsx +25 -25
  65. package/src/components/link-cards/link-card.tsx +23 -23
  66. package/src/components/link-cards/styles.ts +15 -15
  67. package/src/components/list-filter/date-filter.tsx +41 -45
  68. package/src/components/list-filter/date-range-filter.tsx +78 -77
  69. package/src/components/list-filter/list-filter-types.ts +38 -38
  70. package/src/components/list-filter/list-filter.tsx +363 -354
  71. package/src/components/list-filter/multi-select-filter.tsx +94 -95
  72. package/src/components/list-filter/select-filter.tsx +67 -64
  73. package/src/components/scheduler/day-selector.tsx +174 -0
  74. package/src/components/scheduler/day-tag.tsx +73 -0
  75. package/src/components/scheduler/index.ts +4 -0
  76. package/src/components/scheduler/schedule-filter.ts +25 -0
  77. package/src/components/scheduler/schedule-icon.tsx +87 -0
  78. package/src/components/scheduler/scheduler-types.ts +40 -0
  79. package/src/hooks/use-breadcrumbs.ts +31 -31
  80. package/src/hooks/use-recurrence.tsx +13 -0
  81. package/src/hooks/use-timestamp.tsx +21 -21
  82. package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
  83. package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
  84. package/src/pages/dashboard/dashboard.tsx +6 -6
  85. package/src/pages/execution-details/execution-details.tsx +23 -29
  86. package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
  87. package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
  88. package/src/pages/executions/executions-list/executions-list.tsx +219 -212
  89. package/src/pages/executions/executions.tsx +67 -72
  90. package/src/pages/integrations/integration-list/index.ts +1 -0
  91. package/src/pages/integrations/integration-list/integration-list-row.tsx +147 -0
  92. package/src/pages/integrations/integration-list/integration-list-table.tsx +78 -0
  93. package/src/pages/integrations/integration-list/integration-list.tsx +262 -0
  94. package/src/pages/integrations/integrations.tsx +83 -28
  95. package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
  96. package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
  97. package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
  98. package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
  99. package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
  100. package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
  101. package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
  102. package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
  103. package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
  104. package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
  105. package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
  106. package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
  107. package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
  108. package/src/pages/scheduler/scheduler.tsx +106 -30
  109. package/src/pages/scheduler/schedules-list/index.ts +1 -0
  110. package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
  111. package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
  112. package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
  113. package/tsconfig.json +29 -26
  114. 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
- heading: Head[];
23
- items: Item[];
24
- input: ProcessExecutionInput;
25
- setInput: (newInput: ProcessExecutionInput) => void;
26
- rowSx?: SxProps;
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
- const theme = useTheme();
31
- const styles = getStyles(theme);
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
- const handleRequestSort = (property: string) => {
34
- const current = props.input.sort;
35
- if (property === current) {
36
- props.setInput({
37
- ...props.input,
38
- sortDesc: !props.input.sortDesc,
39
- });
40
- } else {
41
- props.setInput({
42
- ...props.input,
43
- sort: property,
44
- sortDesc: false,
45
- });
46
- }
47
- };
48
-
49
- return (
50
- <>
51
- <TableContainer>
52
- <Table>
53
- <TableHeader
54
- heading={props.heading}
55
- orderBy={props.input.sort}
56
- order={props.input.sortDesc ? "desc" : "asc"}
57
- onRequestSort={handleRequestSort}
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
- TablePagination,
23
- TableSkeleton,
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
- ExecutionsListFilters,
35
- executionListFilters,
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
- id: string;
41
- name: string;
42
- startDate: string;
43
- executionStatus: {
44
- id: string;
45
- };
46
- process: {
47
- id: string;
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
- heading: Head[];
56
- data: GetProcessExecutionsQuery;
57
- loading: boolean;
58
- input: ProcessExecutionInput;
59
- setInput: (newInput: ProcessExecutionInput) => void;
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
- const t = useTranslations("Integrate.Executions");
56
+ const t = useTranslations("Integrate.Executions");
64
57
 
65
- const theme = useTheme();
66
- const styles = getStyles(theme);
58
+ const theme = useTheme();
59
+ const styles = getStyles(theme);
67
60
 
68
- const [items, setItems] = useState<Item[]>([]);
69
- const [fetched, setFetched] = useState<boolean>(false); // prevents "empty list" msg from showing for split second
70
- const [page, setPage] = useState(props.input.skip / props.input.top + 1);
71
- const [perPage, setPerPage] = useState(props.input.top);
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
- const handleChangePage = (
74
- event: React.ChangeEvent<unknown>,
75
- value: number,
76
- ) => {
77
- if (page !== value) {
78
- setPage(value);
79
- props.setInput({
80
- ...props.input,
81
- skip: props.input.top * (value - 1),
82
- });
83
- setFetched(false);
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
- const handleSetFilters = (
88
- filterUpdate: ListFilterOutput<ExecutionsListFilters>,
89
- ) => {
90
- const { itemsPerPage, search, filters } = filterUpdate;
91
- props.setInput({
92
- ...props.input,
93
- top: itemsPerPage,
94
- skip: 0,
95
- search: search,
96
- dateRange: {
97
- startDate: filters.dateRange?.start,
98
- endDate: filters.dateRange?.end,
99
- },
100
- executionStatusIds: filters.multiSelectFilter?.map(
101
- (obj) => obj.id as number,
102
- ),
103
- });
104
- setFetched(false);
105
- setPerPage(itemsPerPage);
106
- setPage(1);
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
- const handleClearFilters = () => {
110
- props.setInput({
111
- ...props.input,
112
- skip: 0,
113
- dateRange: null,
114
- executionStatusIds: null,
115
- });
116
- setFetched(false);
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
- useEffect(() => {
120
- if (props.data) {
121
- setItems(props.data.processExecutions.nodes as Item[]);
122
- setFetched(true);
123
- }
124
- }, [props.data]);
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
- return (
127
- <>
128
- <Box sx={styles.list}>
129
- <ListFilter<ExecutionsListFilters>
130
- setFilters={handleSetFilters}
131
- clearFilters={handleClearFilters}
132
- filters={executionListFilters}
133
- config={{
134
- pagination: {
135
- pageDefault: 10,
136
- pageOptions: [10, 20, 50],
137
- },
138
- }}
139
- />
140
- </Box>
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
- {props.loading && !props.data && (
143
- <Card>
144
- <TableSkeleton
145
- heading={props.heading}
146
- perPage={perPage}
147
- rowSx={styles.rowSx}
148
- />
149
- </Card>
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
- {!props.loading && props.data && fetched && items.length > 0 ? (
153
- <Box
154
- sx={{
155
- minHeight:
156
- props.data.processExecutions.pageInfo.resultsReturned < perPage &&
157
- page === 1
158
- ? theme.spacing(
159
- rowHeight *
160
- (props.data.processExecutions.pageInfo.resultsReturned +
161
- 1),
162
- )
163
- : theme.spacing(rowHeight * (perPage + 1)),
164
- }}
165
- >
166
- <Card>
167
- <ExecutionsListTable
168
- heading={props.heading}
169
- items={items}
170
- input={props.input}
171
- setInput={props.setInput}
172
- rowSx={styles.rowSx}
173
- />
174
- </Card>
175
- </Box>
176
- ) : null}
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
- {!props.loading && fetched && items.length === 0 ? (
179
- <Card>
180
- <FlexBox
181
- justifyContent="center"
182
- alignItems="center"
183
- sx={{
184
- minHeight: "335px",
185
- marginBottom: theme.spacing(2),
186
- }}
187
- >
188
- <Stack spacing={1} justifyContent="center" alignItems="center">
189
- <Typography variant="h6" color="info">
190
- {t("ListEmpty.title")}
191
- </Typography>
192
- <Typography variant="body1">{t("ListEmpty.body")}</Typography>
193
- </Stack>
194
- </FlexBox>
195
- </Card>
196
- ) : null}
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
- {!props.loading && props.data && fetched && items.length > 0 ? (
199
- <Grid container spacing={1} sx={styles.pagination}>
200
- <Grid size={{ xs: 10.5 }}>
201
- <FlexBox
202
- justifyContent="center"
203
- alignItems="center"
204
- sx={styles.paginationBox}
205
- >
206
- <TablePagination
207
- page={page}
208
- onChange={handleChangePage}
209
- count={Math.ceil(
210
- props.data.processExecutions.recordCount / props.input.top,
211
- )}
212
- />
213
- </FlexBox>
214
- </Grid>
215
- <Grid size={{ xs: 1.5 }}>
216
- <FlexBox
217
- justifyContent="flex-end"
218
- alignItems="center"
219
- sx={{ height: "100%" }}
220
- >
221
- <Typography color="grey">
222
- {`${props.data.processExecutions.pageInfo.resultsReturned} ${t("Pagination.of")} ${props.data.processExecutions.recordCount} ${t("Pagination.items")}`}
223
- </Typography>
224
- </FlexBox>
225
- </Grid>
226
- </Grid>
227
- ) : null}
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
- return {
234
- title: {
235
- display: "flex",
236
- alignItems: "center",
237
- height: "100%",
238
- },
239
- typography: {
240
- fontWeight: "medium",
241
- },
242
- button: {
243
- borderWidth: 2,
244
- borderRadius: 1,
245
- marginRight: theme.spacing(1),
246
- },
247
- iconButton: {
248
- borderRadius: 1,
249
- },
250
- pagination: {
251
- marginTop: theme.spacing(2),
252
- },
253
- list: {
254
- margin: theme.spacing(2, 0),
255
- },
256
- paginationBox: {
257
- paddingLeft: theme.spacing(15),
258
- },
259
- rowSx: {
260
- height: theme.spacing(rowHeight),
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;