@evenicanpm/admin-integrate 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documents/ConfigImport/configuration-import.ts +54 -0
- package/documents/CopyProcess/copy.ts +25 -0
- package/documents/Endpoint/fragments.ts +9 -0
- package/documents/Endpoint/list.ts +22 -0
- package/documents/Process/fragments.ts +22 -0
- package/documents/Process/get-process-details.ts +73 -0
- package/documents/Process/list.ts +24 -0
- package/documents/ProcessConfig/fragments.ts +116 -0
- package/documents/ProcessConfig/read.ts +35 -0
- package/documents/ProcessExecution/fragments.ts +12 -0
- package/documents/ProcessExecution/list.ts +30 -1
- package/documents/ProcessExecutionDetails/fragments.ts +96 -0
- package/documents/ProcessExecutionDetails/read.ts +12 -0
- package/documents/ProcessScheduleGroup/read.ts +43 -0
- package/documents/ProcessTask/fragments.ts +285 -0
- package/documents/ProcessTask/read.ts +12 -0
- package/documents/ProcessTemplate/fragments.ts +69 -0
- package/documents/ProcessTemplate/list.ts +67 -0
- package/documents/ProcessTemplate/read.ts +12 -0
- package/documents/RunProcess/run.ts +11 -0
- package/package.json +4 -3
- package/src/api/Integrations/queries/get-process.query.ts +12 -12
- package/src/api/Integrations/queries/get-process.server.ts +7 -2
- package/src/api/dashboard/queries/get-process-executions.query.ts +6 -3
- package/src/api/dashboard/queries/get-process-executions.server.ts +1 -1
- package/src/api/execution-details/queries/get-process-execution-details.query.ts +46 -0
- package/src/api/execution-details/queries/get-process-execution-details.server.ts +11 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.query.ts +48 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.server.ts +11 -0
- package/src/api/execution-details/queries/index.ts +2 -0
- package/src/api/process/mutations/copy-process.mutation.ts +48 -0
- package/src/api/process/mutations/copy-process.server.ts +14 -0
- package/src/api/process/mutations/index.ts +2 -0
- package/src/api/process/mutations/run-process.mutation.ts +41 -0
- package/src/api/process/mutations/run-process.server.ts +14 -0
- package/src/api/process/queries/get-process-by-id.query.ts +85 -0
- package/src/api/process/queries/get-process-by-id.server.ts +20 -0
- package/src/api/process/queries/index.ts +4 -0
- package/src/api/process-config/mutation/index.ts +2 -0
- package/src/api/process-config/mutation/process-config-import.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-import.server.ts +14 -0
- package/src/api/process-config/mutation/process-config-merge.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-merge.server.ts +14 -0
- package/src/api/process-task/queries/get-process-task-by-id.query.ts +45 -0
- package/src/api/process-task/queries/get-process-task-by-id.server.ts +9 -0
- package/src/api/process-task/queries/index.ts +1 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/mutation/index.ts +2 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.query.ts +48 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.server.ts +11 -0
- package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +3 -3
- package/src/api/scheduler/queries/get-process-schedule.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule.server.ts +3 -3
- package/src/api/scheduler/queries/get-scheduled-processes.query.ts +6 -3
- package/src/api/scheduler/queries/get-scheduled-processes.server.ts +1 -1
- package/src/api/scheduler/queries/index.ts +3 -2
- package/src/api/templates/queries/get-process-template-groups.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-groups.server.ts +11 -0
- package/src/api/templates/queries/get-process-template-records.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-records.server.ts +11 -0
- package/src/api/templates/queries/get-process-template.query.ts +48 -0
- package/src/api/templates/queries/get-process-template.server.ts +9 -0
- package/src/api/templates/queries/get-process-templates.query.ts +45 -0
- package/src/api/templates/queries/get-process-templates.server.ts +9 -0
- package/src/api/templates/queries/index.ts +5 -0
- package/src/api/templates/queries/template-input-search.query.ts +34 -0
- package/src/api/templates/queries/template-input-search.server.ts +35 -0
- package/src/api/templates/queries/types.ts +28 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +32 -5
- package/src/components/button/outlined-icon-button.tsx +2 -2
- package/src/components/core/date-time-popover.tsx +11 -4
- package/src/components/core/drawer-buttons.tsx +52 -0
- package/src/components/core/edited-typography.tsx +1 -1
- package/src/components/core/index.ts +4 -2
- package/src/components/core/loading.tsx +1 -1
- package/src/components/core/status-tag.tsx +97 -0
- package/src/components/core/title-edit.tsx +18 -11
- package/src/components/dashboard-list/dashboard-list-row.tsx +22 -29
- package/src/components/dashboard-list/dashboard-list.tsx +19 -15
- package/src/components/data-table/table-header.tsx +5 -7
- package/src/components/data-table/table-pagination.tsx +1 -1
- package/src/components/data-table/table-row.tsx +1 -1
- package/src/components/data-table/table-skeleton.tsx +9 -4
- package/src/components/execution/execution-filter.ts +1 -1
- package/src/components/execution/execution-status-icon.tsx +7 -7
- package/src/components/execution/execution-tag.tsx +12 -77
- package/src/components/execution/index.ts +1 -1
- package/src/components/execution-history-drawer/execution-history-drawer.tsx +203 -0
- package/src/components/execution-history-drawer/executions-card.tsx +85 -0
- package/src/components/execution-history-drawer/index.ts +1 -0
- package/src/components/footer/footer.tsx +10 -6
- package/src/components/header/dashboard-list-header.tsx +12 -7
- package/src/components/header/execution-details-header.tsx +35 -26
- package/src/components/header/header.tsx +10 -3
- package/src/components/header/index.ts +1 -1
- package/src/components/header/integration-details-header.tsx +104 -45
- package/src/components/integration-list/index.ts +2 -1
- package/src/components/integration-list/integration-filter.ts +1 -1
- package/src/components/integration-list/integration-status-icon.tsx +7 -8
- package/src/components/integration-list/integration-tag.tsx +6 -50
- package/src/components/integration-list/list/integration-list-row.tsx +161 -0
- package/src/components/integration-list/list/integration-list-table.tsx +62 -0
- package/src/{pages/integrations/integration-list → components/integration-list/list}/integration-list.tsx +47 -51
- package/src/components/integration-view/animated-svg.tsx +31 -0
- package/src/components/integration-view/edges/default-edge.tsx +1 -1
- package/src/components/integration-view/elk-layout-options.ts +2 -2
- package/src/components/integration-view/elk-types.ts +35 -6
- package/src/components/integration-view/flow-types.tsx +10 -0
- package/src/components/integration-view/integration-view.tsx +990 -55
- package/src/components/integration-view/nodes/empty-node.tsx +65 -0
- package/src/components/integration-view/nodes/entry-node.tsx +98 -4
- package/src/components/integration-view/nodes/execution-entry-node.tsx +107 -0
- package/src/components/integration-view/nodes/execution-task-node.tsx +88 -0
- package/src/components/integration-view/nodes/group-node.tsx +19 -13
- package/src/components/integration-view/nodes/row-node.tsx +19 -0
- package/src/components/integration-view/nodes/task-node.tsx +14 -8
- package/src/components/integration-view/task-icon.tsx +193 -0
- package/src/components/integration-view/temp-data/initialElements.tsx +36 -32
- package/src/components/integration-view/types.ts +2 -2
- package/src/components/layouts/main-layout.tsx +2 -3
- package/src/components/layouts/root-container.tsx +3 -6
- package/src/components/link-cards/link-card.tsx +15 -4
- package/src/components/link-cards/styles.ts +1 -1
- package/src/components/list-filter/date-filter.tsx +4 -3
- package/src/components/list-filter/date-range-filter.tsx +11 -5
- package/src/components/list-filter/index.ts +1 -1
- package/src/components/list-filter/list-filter.tsx +30 -25
- package/src/components/list-filter/multi-select-filter.tsx +11 -10
- package/src/components/list-filter/select-filter.tsx +13 -8
- package/src/components/scheduler/day-selector.tsx +29 -15
- package/src/components/scheduler/day-tag.tsx +14 -51
- package/src/components/scheduler/index.ts +2 -1
- package/src/components/scheduler/schedule-drawer/details-reducer.ts +217 -0
- package/src/components/scheduler/schedule-drawer/schedule-details-integrations.tsx +503 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-main.tsx +136 -99
- package/src/components/scheduler/schedule-drawer/schedule-details-name.tsx +94 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-skeleton.tsx +1 -2
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details.tsx +9 -13
- package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +218 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +6 -25
- package/src/components/scheduler/schedule-drawer/schedule-drawer.tsx +116 -0
- package/src/components/scheduler/schedule-drawer/sortable-integration-row.tsx +130 -0
- package/src/components/scheduler/schedule-filter.ts +1 -1
- package/src/components/scheduler/schedule-icon.tsx +5 -6
- package/src/components/scheduler/schedule-integration-icon.tsx +31 -0
- package/src/components/templates/index.ts +1 -0
- package/src/components/templates/inputs/index.tsx +1351 -0
- package/src/components/templates/template-filter.ts +5 -0
- package/src/components/templates/templates-list/index.ts +1 -0
- package/src/components/templates/templates-list/templates-list-row.tsx +55 -0
- package/src/components/templates/templates-list/templates-list-table.tsx +58 -0
- package/src/components/templates/templates-list/templates-list.tsx +253 -0
- package/src/components/templates/types.tsx +75 -0
- package/src/components/templates/wizard.tsx +689 -0
- package/src/hooks/use-breadcrumbs.ts +1 -1
- package/src/hooks/use-recurrence.tsx +1 -2
- package/src/pages/dashboard/dashboard-link-cards.tsx +8 -11
- package/src/pages/dashboard/dashboard-list-sections.tsx +7 -9
- package/src/pages/dashboard/dashboard.tsx +1 -2
- package/src/pages/execution-details/execution-details.tsx +211 -14
- package/src/pages/execution-details/task-execution-details.tsx +160 -0
- package/src/pages/execution-details/task-execution-drawer.tsx +54 -0
- package/src/pages/executions/executions-list/executions-list-row.tsx +21 -27
- package/src/pages/executions/executions-list/executions-list-table.tsx +28 -35
- package/src/pages/executions/executions-list/executions-list.tsx +24 -18
- package/src/pages/executions/executions.tsx +11 -15
- package/src/pages/integration-create/index.ts +1 -0
- package/src/pages/integration-create/integration-create.tsx +174 -0
- package/src/pages/integration-create/pre-creation-step.tsx +12 -0
- package/src/pages/integration-create/select-step.tsx +105 -0
- package/src/pages/integration-create/template-list-step.tsx +77 -0
- package/src/pages/integration-create/wizard-step.tsx +50 -0
- package/src/pages/integration-details/import-process/copy-tasks-list.tsx +265 -0
- package/src/pages/integration-details/import-process/copy-tasks-row.tsx +77 -0
- package/src/pages/integration-details/import-process/import-confirm.tsx +61 -0
- package/src/pages/integration-details/import-process/import-drawer.tsx +48 -0
- package/src/pages/integration-details/import-process/import-process-reducer.ts +90 -0
- package/src/pages/integration-details/import-process/import-process.tsx +149 -0
- package/src/pages/integration-details/index.ts +1 -0
- package/src/pages/integration-details/integration-details.tsx +221 -0
- package/src/pages/integration-details/task-drawer/add-task.tsx +120 -0
- package/src/pages/integration-details/task-drawer/edit-task.tsx +175 -0
- package/src/pages/integration-details/task-drawer/task-drawer.tsx +139 -0
- package/src/pages/integration-details/task-drawer/task-reducer.ts +73 -0
- package/src/pages/integrations/integrations.tsx +11 -14
- package/src/pages/scheduler/scheduler.tsx +12 -24
- package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +27 -37
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +27 -42
- package/src/pages/scheduler/schedules-list/schedules-list.tsx +48 -21
- package/src/utils/date-functions.ts +69 -0
- package/src/utils/slugify.ts +3 -0
- package/tsconfig.json +12 -4
- package/src/hooks/use-timestamp.tsx +0 -25
- package/src/pages/integrations/integration-list/integration-list-row.tsx +0 -147
- package/src/pages/integrations/integration-list/integration-list-table.tsx +0 -78
- package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +0 -227
- package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +0 -77
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +0 -72
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +0 -103
- package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +0 -101
- package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +0 -93
- /package/src/{pages/integrations/integration-list → components/integration-list/list}/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/edited-types.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/index.ts +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ProcessExecutionInput } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import { TableHeader } from "@evenicanpm/admin-integrate/components/data-table";
|
|
3
|
+
import type { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
|
|
4
|
+
import { type SxProps, Table, TableBody, TableContainer } from "@mui/material";
|
|
5
|
+
import type { integrationItem } from "./integration-list";
|
|
6
|
+
import IntegrationListRow from "./integration-list-row";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
heading: Head[];
|
|
10
|
+
items: integrationItem[];
|
|
11
|
+
input: ProcessExecutionInput;
|
|
12
|
+
setInput: (newInput: ProcessExecutionInput) => void;
|
|
13
|
+
rowSx?: SxProps;
|
|
14
|
+
handleRedirect?: (id: string) => void;
|
|
15
|
+
isImportMode?: boolean;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function IntegrationListTable(props: Props) {
|
|
20
|
+
const handleRequestSort = (property: string) => {
|
|
21
|
+
const current = props.input.sort;
|
|
22
|
+
if (property === current) {
|
|
23
|
+
props.setInput({
|
|
24
|
+
...props.input,
|
|
25
|
+
sortDesc: !props.input.sortDesc,
|
|
26
|
+
});
|
|
27
|
+
} else {
|
|
28
|
+
props.setInput({
|
|
29
|
+
...props.input,
|
|
30
|
+
sort: property,
|
|
31
|
+
sortDesc: false,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<TableContainer>
|
|
38
|
+
<Table>
|
|
39
|
+
<TableHeader
|
|
40
|
+
heading={props.heading}
|
|
41
|
+
orderBy={props.input.sort ?? ""}
|
|
42
|
+
order={props.input.sortDesc ? "desc" : "asc"}
|
|
43
|
+
onRequestSort={handleRequestSort}
|
|
44
|
+
rowSx={props.rowSx}
|
|
45
|
+
/>
|
|
46
|
+
<TableBody>
|
|
47
|
+
{props.items.map((item) => (
|
|
48
|
+
<IntegrationListRow
|
|
49
|
+
key={item.id}
|
|
50
|
+
item={item}
|
|
51
|
+
heading={props.heading}
|
|
52
|
+
sx={props.rowSx}
|
|
53
|
+
handleRedirect={props.handleRedirect}
|
|
54
|
+
isImportMode={props.isImportMode}
|
|
55
|
+
readOnly={props.readOnly}
|
|
56
|
+
/>
|
|
57
|
+
))}
|
|
58
|
+
</TableBody>
|
|
59
|
+
</Table>
|
|
60
|
+
</TableContainer>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -1,46 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useTranslations } from "next-intl";
|
|
3
|
-
|
|
4
|
-
// API
|
|
5
|
-
import {
|
|
1
|
+
import type {
|
|
6
2
|
GetProcessesQuery,
|
|
7
3
|
ProcessInput,
|
|
8
4
|
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
9
|
-
import { ProcessExecutionInput } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
10
|
-
|
|
11
|
-
// MUI
|
|
12
|
-
import { Theme, useTheme } from "@mui/material";
|
|
13
|
-
import {
|
|
14
|
-
Card,
|
|
15
|
-
Box,
|
|
16
|
-
Stack,
|
|
17
|
-
Typography,
|
|
18
|
-
Grid2 as Grid,
|
|
19
|
-
Skeleton,
|
|
20
|
-
} from "@mui/material";
|
|
21
|
-
|
|
22
|
-
// Custom components
|
|
23
5
|
import { FlexBox } from "@evenicanpm/admin-core/components/flex-box";
|
|
24
6
|
import {
|
|
25
7
|
TablePagination,
|
|
26
8
|
TableSkeleton,
|
|
27
9
|
} from "@evenicanpm/admin-integrate/components/data-table";
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
// Local components
|
|
31
|
-
import IntegrationListTable from "./integration-list-table";
|
|
32
|
-
|
|
33
|
-
// Types
|
|
34
|
-
import { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
|
|
35
|
-
import { ListFilterOutput } from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
|
|
10
|
+
import type { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
|
|
36
11
|
import {
|
|
37
|
-
IntegrationListFilters,
|
|
12
|
+
type IntegrationListFilters,
|
|
38
13
|
integrationListFilters,
|
|
39
14
|
} from "@evenicanpm/admin-integrate/components/integration-list/integration-filter";
|
|
40
|
-
import {
|
|
15
|
+
import { ListFilter } from "@evenicanpm/admin-integrate/components/list-filter";
|
|
16
|
+
import type { ListFilterOutput } from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
|
|
17
|
+
import {
|
|
18
|
+
Box,
|
|
19
|
+
Card,
|
|
20
|
+
Grid2 as Grid,
|
|
21
|
+
Stack,
|
|
22
|
+
type Theme,
|
|
23
|
+
Typography,
|
|
24
|
+
useTheme,
|
|
25
|
+
} from "@mui/material";
|
|
26
|
+
import { useTranslations } from "next-intl";
|
|
27
|
+
import type React from "react";
|
|
28
|
+
import { useEffect, useState } from "react";
|
|
29
|
+
import IntegrationListTable from "./integration-list-table";
|
|
41
30
|
|
|
42
31
|
// Returned from processExecutions query
|
|
43
|
-
export interface
|
|
32
|
+
export interface integrationItem {
|
|
44
33
|
isScheduled: 0 | 1;
|
|
45
34
|
isTriggered: 0 | 1;
|
|
46
35
|
id: string;
|
|
@@ -58,6 +47,9 @@ interface Props {
|
|
|
58
47
|
loading: boolean;
|
|
59
48
|
input: ProcessInput;
|
|
60
49
|
setInput: (newInput: ProcessInput) => void;
|
|
50
|
+
handleRedirect?: (id: string) => void;
|
|
51
|
+
isImportMode?: boolean;
|
|
52
|
+
readOnly?: boolean;
|
|
61
53
|
}
|
|
62
54
|
|
|
63
55
|
const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
@@ -66,22 +58,22 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
66
58
|
const theme = useTheme();
|
|
67
59
|
const styles = getStyles(theme);
|
|
68
60
|
|
|
69
|
-
const [items, setItems] = useState<
|
|
70
|
-
const [
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
const [items, setItems] = useState<integrationItem[]>([]);
|
|
62
|
+
const [page, setPage] = useState(
|
|
63
|
+
(props.input.skip ?? 0) / (props.input.top ?? 10) + 1,
|
|
64
|
+
);
|
|
65
|
+
const [perPage, setPerPage] = useState<number>(props.input.top || 10);
|
|
73
66
|
|
|
74
67
|
const handleChangePage = (
|
|
75
68
|
event: React.ChangeEvent<unknown>,
|
|
76
69
|
value: number,
|
|
77
70
|
) => {
|
|
78
|
-
if (page !== value) {
|
|
71
|
+
if (page !== value && event) {
|
|
79
72
|
setPage(value);
|
|
80
73
|
props.setInput({
|
|
81
74
|
...props.input,
|
|
82
|
-
skip: props.input.top * (value - 1),
|
|
75
|
+
skip: (props.input.top || 10) * (value - 1),
|
|
83
76
|
});
|
|
84
|
-
setFetched(false);
|
|
85
77
|
}
|
|
86
78
|
};
|
|
87
79
|
|
|
@@ -89,7 +81,6 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
89
81
|
filterUpdate: ListFilterOutput<IntegrationListFilters>,
|
|
90
82
|
) => {
|
|
91
83
|
const { itemsPerPage, search, filters } = filterUpdate;
|
|
92
|
-
console.log("filters", filters?.multiSelectFilter);
|
|
93
84
|
|
|
94
85
|
props.setInput({
|
|
95
86
|
...props.input,
|
|
@@ -98,10 +89,8 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
98
89
|
search: search,
|
|
99
90
|
integrationTags:
|
|
100
91
|
filters?.multiSelectFilter?.map((f) => `${f.id}`) || null,
|
|
101
|
-
sortDesc: true,
|
|
102
92
|
});
|
|
103
|
-
|
|
104
|
-
setPerPage(itemsPerPage);
|
|
93
|
+
setPerPage(itemsPerPage as number);
|
|
105
94
|
setPage(1);
|
|
106
95
|
};
|
|
107
96
|
|
|
@@ -111,13 +100,11 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
111
100
|
skip: 0,
|
|
112
101
|
integrationTags: null,
|
|
113
102
|
});
|
|
114
|
-
setFetched(false);
|
|
115
103
|
};
|
|
116
104
|
|
|
117
105
|
useEffect(() => {
|
|
118
|
-
if (props.data) {
|
|
119
|
-
setItems(props.data.processes.nodes as
|
|
120
|
-
setFetched(true);
|
|
106
|
+
if (props.data?.processes?.nodes) {
|
|
107
|
+
setItems(props.data.processes.nodes as integrationItem[]);
|
|
121
108
|
}
|
|
122
109
|
}, [props.data]);
|
|
123
110
|
|
|
@@ -127,7 +114,11 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
127
114
|
<ListFilter<IntegrationListFilters>
|
|
128
115
|
setFilters={handleSetFilters}
|
|
129
116
|
clearFilters={handleClearFilters}
|
|
130
|
-
filters={
|
|
117
|
+
filters={
|
|
118
|
+
props.heading.find((h) => h.id === "isScheduled")
|
|
119
|
+
? integrationListFilters
|
|
120
|
+
: ({} as IntegrationListFilters)
|
|
121
|
+
}
|
|
131
122
|
config={{
|
|
132
123
|
pagination: {
|
|
133
124
|
pageDefault: 10,
|
|
@@ -147,10 +138,11 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
147
138
|
</Card>
|
|
148
139
|
)}
|
|
149
140
|
|
|
150
|
-
{!props.loading && props.data &&
|
|
141
|
+
{!props.loading && props.data.processes && items.length > 0 ? (
|
|
151
142
|
<Box
|
|
152
143
|
sx={{
|
|
153
144
|
minHeight:
|
|
145
|
+
props.data.processes.pageInfo?.resultsReturned &&
|
|
154
146
|
props.data.processes.pageInfo.resultsReturned < perPage &&
|
|
155
147
|
page === 1
|
|
156
148
|
? theme.spacing(
|
|
@@ -167,12 +159,15 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
167
159
|
input={props.input}
|
|
168
160
|
setInput={props.setInput}
|
|
169
161
|
rowSx={styles.rowSx}
|
|
162
|
+
handleRedirect={props.handleRedirect}
|
|
163
|
+
isImportMode={props.isImportMode}
|
|
164
|
+
readOnly={props.readOnly}
|
|
170
165
|
/>
|
|
171
166
|
</Card>
|
|
172
167
|
</Box>
|
|
173
168
|
) : null}
|
|
174
169
|
|
|
175
|
-
{!props.loading &&
|
|
170
|
+
{!props.loading && items.length === 0 ? (
|
|
176
171
|
<Card>
|
|
177
172
|
<FlexBox
|
|
178
173
|
justifyContent="center"
|
|
@@ -192,7 +187,7 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
192
187
|
</Card>
|
|
193
188
|
) : null}
|
|
194
189
|
|
|
195
|
-
{!props.loading && props.data &&
|
|
190
|
+
{!props.loading && props.data?.processes && items.length > 0 ? (
|
|
196
191
|
<Grid container spacing={1} sx={styles.pagination}>
|
|
197
192
|
<Grid size={{ xs: 10.5 }}>
|
|
198
193
|
<FlexBox
|
|
@@ -204,7 +199,8 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
204
199
|
page={page}
|
|
205
200
|
onChange={handleChangePage}
|
|
206
201
|
count={Math.ceil(
|
|
207
|
-
props.data.processes.recordCount /
|
|
202
|
+
(props.data.processes.recordCount || 10) /
|
|
203
|
+
(props.input.top || 10),
|
|
208
204
|
)}
|
|
209
205
|
/>
|
|
210
206
|
</FlexBox>
|
|
@@ -216,7 +212,7 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
216
212
|
sx={{ height: "100%" }}
|
|
217
213
|
>
|
|
218
214
|
<Typography color="grey">
|
|
219
|
-
{`${props.data.processes.pageInfo
|
|
215
|
+
{`${props.data.processes.pageInfo?.resultsReturned || 0} ${t("Pagination.of")} ${props.data.processes.recordCount || 0} ${t("Pagination.items")}`}
|
|
220
216
|
</Typography>
|
|
221
217
|
</FlexBox>
|
|
222
218
|
</Grid>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseEdge, type EdgeProps, getSmoothStepPath } from "@xyflow/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
export function AnimatedSVGEdge({
|
|
5
|
+
id,
|
|
6
|
+
sourceX,
|
|
7
|
+
sourceY,
|
|
8
|
+
targetX,
|
|
9
|
+
targetY,
|
|
10
|
+
sourcePosition,
|
|
11
|
+
targetPosition,
|
|
12
|
+
markerEnd,
|
|
13
|
+
}: EdgeProps) {
|
|
14
|
+
const [edgePath] = getSmoothStepPath({
|
|
15
|
+
sourceX,
|
|
16
|
+
sourceY,
|
|
17
|
+
sourcePosition,
|
|
18
|
+
targetX,
|
|
19
|
+
targetY,
|
|
20
|
+
targetPosition,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<BaseEdge id={id} path={edgePath} markerEnd={markerEnd} />
|
|
26
|
+
<circle r="5" fill="#4E97FD">
|
|
27
|
+
<animateMotion dur="2s" repeatCount="indefinite" path={edgePath} />
|
|
28
|
+
</circle>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayoutOptions } from "elkjs";
|
|
1
|
+
import type { LayoutOptions } from "elkjs";
|
|
2
2
|
|
|
3
3
|
export const layoutOptions: LayoutOptions = {
|
|
4
4
|
"elk.algorithm": "layered",
|
|
@@ -8,7 +8,7 @@ export const layoutOptions: LayoutOptions = {
|
|
|
8
8
|
"org.eclipse.elk.hierarchyHandling": "INCLUDE_CHILDREN",
|
|
9
9
|
|
|
10
10
|
// Center parent nodes among their children, children immediately below
|
|
11
|
-
"org.eclipse.elk.layered.contentAlignment": "H_CENTER,V_TOP",
|
|
11
|
+
//"org.eclipse.elk.layered.contentAlignment": "H_CENTER,V_TOP",
|
|
12
12
|
|
|
13
13
|
// Reduce edge crossings
|
|
14
14
|
"org.eclipse.elk.layered.crossingMinimization.strategy": "LAYER_SWEEP",
|
|
@@ -1,18 +1,47 @@
|
|
|
1
|
-
import { ElkExtendedEdge, ElkNode } from "elkjs";
|
|
1
|
+
import type { ElkExtendedEdge, ElkNode } from "elkjs";
|
|
2
|
+
import type {
|
|
3
|
+
ProcessTask,
|
|
4
|
+
ProcessTaskExecution,
|
|
5
|
+
} from "../../../../admin-core/src/api/e4/graphqlRequestSdk";
|
|
2
6
|
|
|
3
7
|
export interface ElkNodeWithFlow extends ElkNode {
|
|
4
8
|
type?: string;
|
|
5
|
-
data?:
|
|
6
|
-
label: string;
|
|
7
|
-
icon?: any;
|
|
8
|
-
isLast?: boolean;
|
|
9
|
-
};
|
|
9
|
+
data?: any;
|
|
10
10
|
position?: {
|
|
11
11
|
x: number;
|
|
12
12
|
y: number;
|
|
13
13
|
};
|
|
14
14
|
children?: ElkNodeWithFlow[];
|
|
15
15
|
extent?: string;
|
|
16
|
+
parentId?: string;
|
|
17
|
+
sort?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface GroupNode extends ElkNodeWithFlow {
|
|
21
|
+
data: {
|
|
22
|
+
label: string;
|
|
23
|
+
parallelProcessesingGroup?: number;
|
|
24
|
+
isLast?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
selected?: boolean;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ProcessTaskNode extends ElkNodeWithFlow {
|
|
31
|
+
data: {
|
|
32
|
+
processTask: ProcessTask;
|
|
33
|
+
isLast?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
selected?: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ProcessTaskExecutionNode extends ElkNodeWithFlow {
|
|
40
|
+
data: {
|
|
41
|
+
processTaskExecution: ProcessTaskExecution;
|
|
42
|
+
isLast?: boolean;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
};
|
|
16
45
|
}
|
|
17
46
|
|
|
18
47
|
export interface ElkExtendedEdgeWithFlow extends ElkExtendedEdge {
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
+
import { AnimatedSVGEdge } from "./animated-svg";
|
|
1
2
|
import { DefaultEdge } from "./edges/default-edge";
|
|
2
3
|
import { ConnectionNode } from "./nodes/connection-node";
|
|
4
|
+
import { EmptyNode } from "./nodes/empty-node";
|
|
3
5
|
import { EntryNode } from "./nodes/entry-node";
|
|
6
|
+
import { ExecutionEntryNode } from "./nodes/execution-entry-node";
|
|
7
|
+
import { ExecutionTaskNode } from "./nodes/execution-task-node";
|
|
4
8
|
import { GroupNode } from "./nodes/group-node";
|
|
9
|
+
import { RowNode } from "./nodes/row-node";
|
|
5
10
|
import { TaskNode } from "./nodes/task-node";
|
|
6
11
|
|
|
7
12
|
export const edgeTypes = {
|
|
8
13
|
"default-edge": DefaultEdge,
|
|
14
|
+
"animated-edge": AnimatedSVGEdge,
|
|
9
15
|
};
|
|
10
16
|
|
|
11
17
|
export const nodeTypes = {
|
|
12
18
|
"connection-node": ConnectionNode,
|
|
13
19
|
"entry-node": EntryNode,
|
|
20
|
+
"execution-entry-node": ExecutionEntryNode,
|
|
14
21
|
"group-node": GroupNode,
|
|
15
22
|
"task-node": TaskNode, // Assuming you have a custom connection node
|
|
23
|
+
"execution-task-node": ExecutionTaskNode, // Assuming you have a custom connection node,
|
|
24
|
+
"row-node": RowNode,
|
|
25
|
+
"empty-node": EmptyNode,
|
|
16
26
|
};
|