@evenicanpm/admin-integrate 1.3.0 → 1.6.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/Endpoint/list.ts +8 -0
- package/documents/Process/get-process-details.ts +0 -1
- package/documents/ProcessConfig/fragments.ts +1 -1
- package/documents/ProcessExport/read.ts +108 -0
- package/documents/ProcessTask/fragments.ts +4 -1
- package/documents/ProcessTemplate/fragments.ts +6 -1
- package/package.json +2 -2
- package/src/api/configuration/queries/configuration-export.query.ts +48 -0
- package/src/api/configuration/queries/configuration-export.server.ts +9 -0
- package/src/api/configuration/queries/index.ts +1 -0
- package/src/api/process/mutations/copy-process.mutation.ts +2 -5
- package/src/api/process-config/mutation/process-config-import.mutation.ts +9 -0
- package/src/api/process-task/queries/get-process-task-by-id.query.ts +1 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.mutation.ts +2 -2
- package/src/api/scheduler/mutation/update-process-schedule-group-details.mutation.ts +2 -2
- package/src/api/templates/queries/template-input-search.query.ts +5 -0
- package/src/api/templates/queries/template-input-search.server.ts +8 -1
- package/src/api/templates/queries/types.ts +9 -3
- package/src/components/breadcrumbs/breadcrumbs.tsx +1 -1
- package/src/components/core/date-time-popover.tsx +1 -1
- package/src/components/core/drawer-buttons.tsx +1 -1
- package/src/components/core/edited-typography.tsx +1 -1
- package/src/components/core/title-edit.tsx +13 -11
- package/src/components/dashboard-list/dashboard-list.tsx +1 -1
- package/src/components/data-table/table-header.tsx +1 -1
- package/src/components/data-table/table-skeleton.tsx +1 -1
- package/src/components/execution-history-drawer/execution-history-drawer.tsx +1 -2
- package/src/components/header/integration-details-header.tsx +4 -0
- package/src/components/integration-list/list/integration-list-row.tsx +2 -2
- package/src/components/integration-list/list/integration-list-table.tsx +3 -3
- package/src/components/integration-list/list/integration-list.tsx +3 -3
- package/src/components/integration-view/edges/default-edge.tsx +1 -5
- package/src/components/integration-view/flow-types.tsx +2 -0
- package/src/components/integration-view/integration-view.tsx +148 -577
- package/src/components/integration-view/nodes/add-node.tsx +20 -0
- package/src/components/integration-view/nodes/group-node.tsx +15 -1
- package/src/components/integration-view/nodes/task-node.tsx +38 -10
- package/src/components/integration-view/temp-data/initialElements.tsx +0 -2
- package/src/components/integration-view/utils/mapping.ts +404 -0
- package/src/components/layouts/main-layout.tsx +1 -1
- package/src/components/layouts/root-container.tsx +2 -5
- package/src/components/link-cards/link-card.tsx +1 -1
- package/src/components/list-filter/date-filter.tsx +3 -1
- package/src/components/list-filter/date-range-filter.tsx +4 -2
- package/src/components/list-filter/list-filter.tsx +1 -1
- package/src/components/list-filter/select-filter.tsx +10 -4
- package/src/components/scheduler/schedule-drawer/schedule-details-integrations.tsx +6 -8
- package/src/components/scheduler/schedule-drawer/schedule-details-main.tsx +1 -1
- package/src/components/scheduler/schedule-drawer/schedule-details-name.tsx +1 -1
- package/src/components/scheduler/schedule-drawer/schedule-details.tsx +1 -1
- package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +4 -8
- package/src/components/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +1 -1
- package/src/components/scheduler/schedule-drawer/schedule-drawer.tsx +2 -2
- package/src/components/scheduler/schedule-drawer/sortable-integration-row.tsx +1 -1
- package/src/components/templates/inputs/index.tsx +162 -121
- package/src/components/templates/templates-list/templates-list-table.tsx +2 -2
- package/src/components/templates/templates-list/templates-list.tsx +1 -1
- package/src/components/templates/types.tsx +1 -0
- package/src/components/templates/wizard.tsx +98 -50
- package/src/pages/dashboard/dashboard-list-sections.tsx +2 -2
- package/src/pages/execution-details/execution-details.tsx +4 -3
- package/src/pages/execution-details/task-execution-details.tsx +1 -1
- package/src/pages/execution-details/task-execution-drawer.tsx +1 -1
- package/src/pages/executions/executions-list/executions-list-table.tsx +1 -1
- package/src/pages/integration-create/integration-create.tsx +87 -45
- package/src/pages/integration-create/pre-creation-step.tsx +77 -5
- package/src/pages/integration-create/select-step.tsx +1 -1
- package/src/pages/integration-create/wizard-step.tsx +2 -1
- package/src/pages/integration-details/import-process/copy-tasks-list.tsx +2 -2
- package/src/pages/integration-details/import-process/copy-tasks-row.tsx +1 -1
- package/src/pages/integration-details/import-process/import-confirm.tsx +1 -1
- package/src/pages/integration-details/import-process/import-drawer.tsx +1 -1
- package/src/pages/integration-details/import-process/import-process.tsx +1 -1
- package/src/pages/integration-details/integration-details.tsx +290 -43
- package/src/pages/integration-details/task-drawer/add-task.tsx +65 -13
- package/src/pages/integration-details/task-drawer/edit-task.tsx +69 -83
- package/src/pages/integration-details/task-drawer/task-drawer.tsx +22 -4
- package/src/pages/integration-details/task-drawer/task-reducer.ts +32 -2
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
|
|
3
|
+
const GET_CONFIGURATION_EXPORT = gql`
|
|
4
|
+
query ConfigurationExport($processId: ID, $includeIds: Boolean, $useSourceEndpoint: Boolean) {
|
|
5
|
+
configurationExport(processId: $processId, includeIds: $includeIds, useSourceEndpoint: $useSourceEndpoint) {
|
|
6
|
+
DepotGroups {
|
|
7
|
+
DepotGroupId
|
|
8
|
+
DepotGroup
|
|
9
|
+
}
|
|
10
|
+
Depots {
|
|
11
|
+
DepotId
|
|
12
|
+
Depot
|
|
13
|
+
DepotGroup
|
|
14
|
+
}
|
|
15
|
+
Entities {
|
|
16
|
+
EntityId
|
|
17
|
+
Entity
|
|
18
|
+
Name
|
|
19
|
+
EntityType
|
|
20
|
+
SourceEntityName
|
|
21
|
+
ExtendedFields
|
|
22
|
+
EntitySchema
|
|
23
|
+
EnableParse
|
|
24
|
+
EntityFields {
|
|
25
|
+
EntityFieldId
|
|
26
|
+
EntityField
|
|
27
|
+
FieldType
|
|
28
|
+
Length
|
|
29
|
+
Sort
|
|
30
|
+
IsKey
|
|
31
|
+
IsRequired
|
|
32
|
+
IsEditable
|
|
33
|
+
Path
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
Endpoints {
|
|
37
|
+
EndpointId
|
|
38
|
+
Endpoint
|
|
39
|
+
Name
|
|
40
|
+
Depot
|
|
41
|
+
EndpointType
|
|
42
|
+
Entity
|
|
43
|
+
StagingTableSchema
|
|
44
|
+
StagingTableName
|
|
45
|
+
Metadata
|
|
46
|
+
Queues {
|
|
47
|
+
EndpointSubscriptionId
|
|
48
|
+
EndpointQueueId
|
|
49
|
+
TargetEndpoint
|
|
50
|
+
SourceEndpoint
|
|
51
|
+
Transformations {
|
|
52
|
+
TransformationType
|
|
53
|
+
JSLT
|
|
54
|
+
Params
|
|
55
|
+
Sort
|
|
56
|
+
Enabled
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
TemplateConfig
|
|
60
|
+
ProcessTemplateId
|
|
61
|
+
}
|
|
62
|
+
Processes {
|
|
63
|
+
ProcessId
|
|
64
|
+
Process
|
|
65
|
+
Name
|
|
66
|
+
OrchestratorInstanceId
|
|
67
|
+
MaxConcurrentExecutions
|
|
68
|
+
AllowParallelProcessExecution
|
|
69
|
+
AllowParallelTaskExecution
|
|
70
|
+
MaxRetryAttempts
|
|
71
|
+
ProcessScheduleGroup {
|
|
72
|
+
ProcessScheduleGroupId
|
|
73
|
+
IsDisabled
|
|
74
|
+
ProcessScheduleGroup
|
|
75
|
+
Name
|
|
76
|
+
ProcessScheduleId
|
|
77
|
+
ProcessSchedule
|
|
78
|
+
SchedulePeriod
|
|
79
|
+
Sort
|
|
80
|
+
IsMonday
|
|
81
|
+
IsTuesday
|
|
82
|
+
IsWednesday
|
|
83
|
+
IsThursday
|
|
84
|
+
IsFriday
|
|
85
|
+
IsSaturday
|
|
86
|
+
IsSunday
|
|
87
|
+
StartDate
|
|
88
|
+
EndDate
|
|
89
|
+
}
|
|
90
|
+
ProcessIcon
|
|
91
|
+
IsTriggered
|
|
92
|
+
ProcessTasks {
|
|
93
|
+
ProcessTaskId
|
|
94
|
+
ProcessTask
|
|
95
|
+
Name
|
|
96
|
+
Endpoint
|
|
97
|
+
ProcessTaskType
|
|
98
|
+
OrchestrationType
|
|
99
|
+
PreExecutionProcedure
|
|
100
|
+
PostExecutionProcedure
|
|
101
|
+
Sort
|
|
102
|
+
Params
|
|
103
|
+
ParallelProcessingGroup
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
@@ -18,6 +18,7 @@ export const PROCESS_TEMPLATE_FRAGMENT = gql`
|
|
|
18
18
|
fieldName
|
|
19
19
|
inputType
|
|
20
20
|
isRequired
|
|
21
|
+
isEditableAfterCreate
|
|
21
22
|
sort
|
|
22
23
|
placeholder
|
|
23
24
|
helpText
|
|
@@ -25,6 +26,7 @@ export const PROCESS_TEMPLATE_FRAGMENT = gql`
|
|
|
25
26
|
queryName
|
|
26
27
|
created
|
|
27
28
|
modified
|
|
29
|
+
defaultValue
|
|
28
30
|
schemas {
|
|
29
31
|
id
|
|
30
32
|
fieldKey
|
|
@@ -32,7 +34,10 @@ export const PROCESS_TEMPLATE_FRAGMENT = gql`
|
|
|
32
34
|
inputType
|
|
33
35
|
defaultValue
|
|
34
36
|
validationRegex
|
|
35
|
-
options
|
|
37
|
+
options {
|
|
38
|
+
id
|
|
39
|
+
label
|
|
40
|
+
}
|
|
36
41
|
sort
|
|
37
42
|
isRequired
|
|
38
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evenicanpm/admin-integrate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "e4Integrate Admin Panel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"elkjs": "^0.10.0",
|
|
21
21
|
"lodash": "^4.17.21"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "9b18fe6294cc0e57332ec8703825a609ac7b73b2"
|
|
24
24
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ConfigurationExportQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
|
+
import {
|
|
3
|
+
type QueryClient,
|
|
4
|
+
type UseQueryOptions,
|
|
5
|
+
useQuery,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
7
|
+
import { queryFn } from "./configuration-export.server";
|
|
8
|
+
|
|
9
|
+
export const buildConfigurationExportQueryKey = {
|
|
10
|
+
all: () => ["configurationExport"] as const,
|
|
11
|
+
byInput: (variables?: ConfigurationExportQueryVariables) => [
|
|
12
|
+
"configurationExport",
|
|
13
|
+
variables,
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const configurationExport = {
|
|
18
|
+
queryKey: buildConfigurationExportQueryKey.all(),
|
|
19
|
+
|
|
20
|
+
prefetch: (
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
variables: ConfigurationExportQueryVariables,
|
|
23
|
+
) =>
|
|
24
|
+
queryClient.prefetchQuery({
|
|
25
|
+
queryKey: buildConfigurationExportQueryKey.byInput(variables),
|
|
26
|
+
queryFn: () => queryFn(variables),
|
|
27
|
+
}),
|
|
28
|
+
|
|
29
|
+
fetchData: async (
|
|
30
|
+
queryClient: QueryClient,
|
|
31
|
+
variables: ConfigurationExportQueryVariables,
|
|
32
|
+
) => {
|
|
33
|
+
return await queryClient.fetchQuery({
|
|
34
|
+
queryKey: buildConfigurationExportQueryKey.byInput(variables),
|
|
35
|
+
queryFn: () => queryFn(variables),
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
useData: (
|
|
40
|
+
variables: ConfigurationExportQueryVariables,
|
|
41
|
+
options?: UseQueryOptions,
|
|
42
|
+
) =>
|
|
43
|
+
useQuery({
|
|
44
|
+
queryKey: buildConfigurationExportQueryKey.byInput(variables),
|
|
45
|
+
queryFn: () => queryFn(variables),
|
|
46
|
+
...options,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import type { ConfigurationExportQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
3
|
+
import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
|
|
4
|
+
|
|
5
|
+
export const queryFn = async (variables: ConfigurationExportQueryVariables) => {
|
|
6
|
+
const sdk = await createGraphqlclient();
|
|
7
|
+
const { data } = await sdk.ConfigurationExport(variables);
|
|
8
|
+
return data;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { configurationExport } from "./configuration-export.query";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CopyProcessMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
2
|
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
-
import { buildProcessByIdQueryKey } from "@evenicanpm/admin-integrate/api/process/queries/get-process-by-id.query";
|
|
4
3
|
import { buildProcessScheduleGroupDetailsQueryKey } from "@evenicanpm/admin-integrate/api/scheduler/queries/get-process-schedule-group-details.query";
|
|
5
4
|
import { buildScheduledProcessesQueryKey } from "@evenicanpm/admin-integrate/api/scheduler/queries/get-scheduled-processes.query";
|
|
6
5
|
import { useMutation } from "@tanstack/react-query";
|
|
6
|
+
import { buildConfigurationExportQueryKey } from "../../../api/configuration/queries/configuration-export.query";
|
|
7
7
|
import { mutationFn } from "./copy-process.server";
|
|
8
8
|
|
|
9
9
|
export const buildCopyProcessMutationKey = {
|
|
@@ -33,10 +33,7 @@ export const copyProcess = () => {
|
|
|
33
33
|
queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
|
|
34
34
|
}),
|
|
35
35
|
queryClient.invalidateQueries({
|
|
36
|
-
queryKey:
|
|
37
|
-
}),
|
|
38
|
-
queryClient.invalidateQueries({
|
|
39
|
-
queryKey: buildProcessByIdQueryKey.allWithTasks(),
|
|
36
|
+
queryKey: buildConfigurationExportQueryKey.all(),
|
|
40
37
|
}),
|
|
41
38
|
]);
|
|
42
39
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ConfigurationImportMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
2
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { queryFn } from "./process-config-import.server";
|
|
4
|
+
import { buildConfigurationExportQueryKey } from "../../../api/configuration/queries/configuration-export.query";
|
|
4
5
|
|
|
5
6
|
export const buildProcessScheduleGroupDetailsQueryKey = {
|
|
6
7
|
all: () => ["configurationImport"] as const,
|
|
@@ -24,6 +25,14 @@ export const processConfigImport = () => {
|
|
|
24
25
|
queryClient.invalidateQueries({
|
|
25
26
|
queryKey: ["getScheduledProcesses"],
|
|
26
27
|
});
|
|
28
|
+
|
|
29
|
+
queryClient.invalidateQueries({
|
|
30
|
+
queryKey: buildConfigurationExportQueryKey.all(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
queryClient.invalidateQueries({
|
|
34
|
+
queryKey: ["getProcessTaskById"],
|
|
35
|
+
});
|
|
27
36
|
},
|
|
28
37
|
|
|
29
38
|
onError: (error) => {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { queryFn } from "./get-process-task-by-id.server";
|
|
8
8
|
|
|
9
9
|
export const buildProcessTaskByIdQueryKey = {
|
|
10
|
+
all: () => ["getProcessTaskById"] as const,
|
|
10
11
|
byInput: (variables?: GetProcessTaskByIdQueryVariables) => [
|
|
11
12
|
"getProcessTaskById",
|
|
12
13
|
variables,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CreateProcessScheduleGroupDetailsMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
2
|
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
-
import { buildProcessByIdQueryKey } from "@evenicanpm/admin-integrate/api/process/queries/get-process-by-id.query";
|
|
4
3
|
import { useMutation } from "@tanstack/react-query";
|
|
4
|
+
import { buildConfigurationExportQueryKey } from "../../../api/configuration/queries/configuration-export.query";
|
|
5
5
|
import { buildProcessScheduleGroupDetailsQueryKey } from "../queries/get-process-schedule-group-details.query";
|
|
6
6
|
import { buildScheduledProcessesQueryKey } from "../queries/get-scheduled-processes.query";
|
|
7
7
|
import { queryFn } from "./create-process-schedule-group-details.server";
|
|
@@ -35,7 +35,7 @@ export const createProcessScheduleGroupDetails = () => {
|
|
|
35
35
|
queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
|
|
36
36
|
}),
|
|
37
37
|
queryClient.invalidateQueries({
|
|
38
|
-
queryKey:
|
|
38
|
+
queryKey: buildConfigurationExportQueryKey.all(),
|
|
39
39
|
}),
|
|
40
40
|
]);
|
|
41
41
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UpdateProcessScheduleGroupDetailsMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
2
2
|
import { getQueryClient } from "@evenicanpm/admin-core/api/sdk/get-query-client";
|
|
3
|
-
import { buildProcessByIdQueryKey } from "@evenicanpm/admin-integrate/api/process/queries/get-process-by-id.query";
|
|
4
3
|
import { useMutation } from "@tanstack/react-query";
|
|
4
|
+
import { buildConfigurationExportQueryKey } from "../../../api/configuration/queries/configuration-export.query";
|
|
5
5
|
import { buildProcessScheduleGroupDetailsQueryKey } from "../queries/get-process-schedule-group-details.query";
|
|
6
6
|
import { buildScheduledProcessesQueryKey } from "../queries/get-scheduled-processes.query";
|
|
7
7
|
import { queryFn } from "./update-process-schedule-group-details.server";
|
|
@@ -35,7 +35,7 @@ export const updateProcessScheduleGroupDetails = () => {
|
|
|
35
35
|
queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
|
|
36
36
|
}),
|
|
37
37
|
queryClient.invalidateQueries({
|
|
38
|
-
queryKey:
|
|
38
|
+
queryKey: buildConfigurationExportQueryKey.all(),
|
|
39
39
|
}),
|
|
40
40
|
]);
|
|
41
41
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
CheckUniqueIdentifierQueryVariables,
|
|
2
3
|
GetDataDescriptionsQueryVariables,
|
|
3
4
|
GetSourceEndpointsQueryVariables,
|
|
4
5
|
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
@@ -18,6 +19,10 @@ export const buildTemplateSearchQueryKey = {
|
|
|
18
19
|
"getDataDescriptions",
|
|
19
20
|
variables,
|
|
20
21
|
],
|
|
22
|
+
checkUniqueIdentifier: (variables: CheckUniqueIdentifierQueryVariables) => [
|
|
23
|
+
"checkUniqueIdentifier",
|
|
24
|
+
variables,
|
|
25
|
+
],
|
|
21
26
|
};
|
|
22
27
|
|
|
23
28
|
export const templateInputSearch = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use server";
|
|
2
2
|
import type {
|
|
3
|
+
CheckUniqueIdentifierQueryVariables,
|
|
3
4
|
GetDataDescriptionsQueryVariables,
|
|
4
5
|
GetSourceEndpointsQueryVariables,
|
|
5
6
|
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
@@ -10,7 +11,7 @@ import type {
|
|
|
10
11
|
} from "./types";
|
|
11
12
|
|
|
12
13
|
export const queryFn = async (
|
|
13
|
-
variables: TemplateInputSearchQueryVariables,
|
|
14
|
+
variables: TemplateInputSearchQueryVariables | string,
|
|
14
15
|
queryKey: TemplateInputSearchQueryKey,
|
|
15
16
|
) => {
|
|
16
17
|
const sdk = await createGraphqlclient();
|
|
@@ -28,6 +29,12 @@ export const queryFn = async (
|
|
|
28
29
|
);
|
|
29
30
|
return data;
|
|
30
31
|
}
|
|
32
|
+
case "checkUniqueIdentifier": {
|
|
33
|
+
const { data } = await sdk.CheckUniqueIdentifier(
|
|
34
|
+
variables as CheckUniqueIdentifierQueryVariables,
|
|
35
|
+
);
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
31
38
|
default: {
|
|
32
39
|
throw new Error(`queryKey "${queryKey}" invalid`);
|
|
33
40
|
}
|
|
@@ -3,19 +3,24 @@ import type {
|
|
|
3
3
|
GetDataDescriptionsQueryVariables,
|
|
4
4
|
GetSourceEndpointsQuery,
|
|
5
5
|
GetSourceEndpointsQueryVariables,
|
|
6
|
+
CheckUniqueIdentifierQuery,
|
|
7
|
+
CheckUniqueIdentifierQueryVariables,
|
|
6
8
|
} from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
|
|
7
9
|
|
|
8
10
|
export type TemplateInputSearchQueryVariables =
|
|
9
11
|
| GetSourceEndpointsQueryVariables
|
|
10
|
-
| GetDataDescriptionsQueryVariables
|
|
12
|
+
| GetDataDescriptionsQueryVariables
|
|
13
|
+
| CheckUniqueIdentifierQueryVariables;
|
|
11
14
|
|
|
12
15
|
export type TemplateInputSearchQuery =
|
|
13
16
|
| GetSourceEndpointsQuery
|
|
14
|
-
| GetDataDescriptionsQuery
|
|
17
|
+
| GetDataDescriptionsQuery
|
|
18
|
+
| CheckUniqueIdentifierQuery;
|
|
15
19
|
|
|
16
20
|
export type TemplateInputSearchQueryKey =
|
|
17
21
|
| "getSourceEndpoints"
|
|
18
|
-
| "getDataDescriptions"
|
|
22
|
+
| "getDataDescriptions"
|
|
23
|
+
| "checkUniqueIdentifier";
|
|
19
24
|
|
|
20
25
|
export const isTemplateInputSearchQueryKey = (
|
|
21
26
|
qn: string,
|
|
@@ -23,6 +28,7 @@ export const isTemplateInputSearchQueryKey = (
|
|
|
23
28
|
const keys: TemplateInputSearchQueryKey[] = [
|
|
24
29
|
"getSourceEndpoints",
|
|
25
30
|
"getDataDescriptions",
|
|
31
|
+
"checkUniqueIdentifier",
|
|
26
32
|
];
|
|
27
33
|
return keys.includes(qn as TemplateInputSearchQueryKey);
|
|
28
34
|
};
|
|
@@ -19,7 +19,7 @@ type Props = {
|
|
|
19
19
|
breadcrumbs: Crumb[];
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export default function IntegrateBreadcrumbs({ breadcrumbs }: Props) {
|
|
22
|
+
export default function IntegrateBreadcrumbs({ breadcrumbs }: Readonly<Props>) {
|
|
23
23
|
const router = useRouter();
|
|
24
24
|
const pathname = usePathname();
|
|
25
25
|
|
|
@@ -7,7 +7,7 @@ interface Props {
|
|
|
7
7
|
children?: React.ReactNode; // e.g. add button, save button, etc.
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export default function DrawerButtons(props: Props) {
|
|
10
|
+
export default function DrawerButtons(props: Readonly<Props>) {
|
|
11
11
|
const theme = useTheme();
|
|
12
12
|
const styles = getStyles(theme);
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ interface Props {
|
|
|
20
20
|
variant?: TypographyOwnProps["variant"];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export default function TitleEdit(props: Props) {
|
|
23
|
+
export default function TitleEdit(props: Readonly<Props>) {
|
|
24
24
|
const theme = useTheme();
|
|
25
25
|
const styles = getStyles(theme);
|
|
26
26
|
|
|
@@ -41,6 +41,8 @@ export default function TitleEdit(props: Props) {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const handleConfirm = () => {
|
|
44
|
+
// NOSONAR - regex replacement requires replace, not replaceAll
|
|
45
|
+
// replaceAll - Doesn’t properly handle \s+ logic - Misleading Sonar suggestion
|
|
44
46
|
const trimmed = input.trim().replace(/\s+/g, " ");
|
|
45
47
|
props.onConfirm(trimmed);
|
|
46
48
|
setInput(trimmed);
|
|
@@ -70,11 +72,7 @@ export default function TitleEdit(props: Props) {
|
|
|
70
72
|
justifyContent="flex-start"
|
|
71
73
|
alignItems="center"
|
|
72
74
|
>
|
|
73
|
-
{
|
|
74
|
-
<Typography sx={styles.name} variant={props.variant || "h6"}>
|
|
75
|
-
{props.title}
|
|
76
|
-
</Typography>
|
|
77
|
-
) : (
|
|
75
|
+
{editMode ? (
|
|
78
76
|
<TextField
|
|
79
77
|
sx={styles.input}
|
|
80
78
|
fullWidth={props.fullWidth}
|
|
@@ -84,15 +82,15 @@ export default function TitleEdit(props: Props) {
|
|
|
84
82
|
onChange={handleChange}
|
|
85
83
|
onKeyDown={handleKeyDown}
|
|
86
84
|
/>
|
|
85
|
+
) : (
|
|
86
|
+
<Typography sx={styles.name} variant={props.variant || "h6"}>
|
|
87
|
+
{props.title}
|
|
88
|
+
</Typography>
|
|
87
89
|
)}
|
|
88
90
|
</Box>
|
|
89
91
|
{!props.readOnly && (
|
|
90
92
|
<Box display="flex" justifyContent="flex-end" alignItems="center">
|
|
91
|
-
{
|
|
92
|
-
<IconButton onClick={handleClickEdit}>
|
|
93
|
-
<EditOutlined />
|
|
94
|
-
</IconButton>
|
|
95
|
-
) : (
|
|
93
|
+
{editMode ? (
|
|
96
94
|
<Stack direction="row" spacing={1}>
|
|
97
95
|
<OutlinedIconButton color="error" onClick={handleClose}>
|
|
98
96
|
<Clear />
|
|
@@ -105,6 +103,10 @@ export default function TitleEdit(props: Props) {
|
|
|
105
103
|
<Check />
|
|
106
104
|
</OutlinedIconButton>
|
|
107
105
|
</Stack>
|
|
106
|
+
) : (
|
|
107
|
+
<IconButton onClick={handleClickEdit}>
|
|
108
|
+
<EditOutlined />
|
|
109
|
+
</IconButton>
|
|
108
110
|
)}
|
|
109
111
|
</Box>
|
|
110
112
|
)}
|
|
@@ -95,7 +95,7 @@ const DashboardList: React.FC<Props> = (props: Props) => {
|
|
|
95
95
|
<TableBody>
|
|
96
96
|
{items.map((item, index) => (
|
|
97
97
|
<DashboardListRow
|
|
98
|
-
key={index}
|
|
98
|
+
key={`list-row-${index + 1}`}
|
|
99
99
|
item={item}
|
|
100
100
|
heading={props.heading}
|
|
101
101
|
enableBgColor={props.enableBgColor}
|
|
@@ -123,8 +123,7 @@ const ExecutionHistoryDrawer: React.FC<Props> = (props: Props) => {
|
|
|
123
123
|
</IconButton>
|
|
124
124
|
</Box>
|
|
125
125
|
{props.drawerOpen &&
|
|
126
|
-
props?.data?.processExecutionsByProcess?.nodes
|
|
127
|
-
props.data.processExecutionsByProcess.nodes.map((item) => (
|
|
126
|
+
props?.data?.processExecutionsByProcess?.nodes?.map((item) => (
|
|
128
127
|
<ExecutionsCard key={item?.id as string} item={item as Item} />
|
|
129
128
|
))}
|
|
130
129
|
|
|
@@ -26,6 +26,7 @@ interface Props {
|
|
|
26
26
|
setName: React.Dispatch<React.SetStateAction<string>>;
|
|
27
27
|
onImportClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
28
28
|
onScheduleClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
29
|
+
onExecutionsClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
29
30
|
icon?: string;
|
|
30
31
|
children?: React.ReactNode; // buttons to go in header, e.g. save, cancel etc.
|
|
31
32
|
toolbar?: "enabled" | "disabled" | "hidden";
|
|
@@ -125,6 +126,9 @@ const IntegrationDetailsHeader: React.FC<Props> = (props: Props) => {
|
|
|
125
126
|
<Button
|
|
126
127
|
startIcon={<PlayArrowOutlined />}
|
|
127
128
|
disabled={props.toolbar === "disabled"}
|
|
129
|
+
onClick={(e) => {
|
|
130
|
+
if (props.onExecutionsClick) props.onExecutionsClick(e);
|
|
131
|
+
}}
|
|
128
132
|
>
|
|
129
133
|
{t("executions")}
|
|
130
134
|
</Button>
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
import { RedirectType, redirect } from "next/navigation";
|
|
24
24
|
import type React from "react";
|
|
25
25
|
import { useState } from "react";
|
|
26
|
-
import type {
|
|
26
|
+
import type { IntegrationItem } from "./integration-list";
|
|
27
27
|
|
|
28
28
|
interface Props {
|
|
29
|
-
item:
|
|
29
|
+
item: IntegrationItem;
|
|
30
30
|
heading: Head[]; // for alignment
|
|
31
31
|
sx?: SxProps;
|
|
32
32
|
handleRedirect?: (id: string) => void;
|
|
@@ -2,12 +2,12 @@ import type { ProcessExecutionInput } from "@evenicanpm/admin-core/api/e4/graphq
|
|
|
2
2
|
import { TableHeader } from "@evenicanpm/admin-integrate/components/data-table";
|
|
3
3
|
import type { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
|
|
4
4
|
import { type SxProps, Table, TableBody, TableContainer } from "@mui/material";
|
|
5
|
-
import type {
|
|
5
|
+
import type { IntegrationItem } from "./integration-list";
|
|
6
6
|
import IntegrationListRow from "./integration-list-row";
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
9
|
heading: Head[];
|
|
10
|
-
items:
|
|
10
|
+
items: IntegrationItem[];
|
|
11
11
|
input: ProcessExecutionInput;
|
|
12
12
|
setInput: (newInput: ProcessExecutionInput) => void;
|
|
13
13
|
rowSx?: SxProps;
|
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
readOnly?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export default function IntegrationListTable(props: Props) {
|
|
19
|
+
export default function IntegrationListTable(props: Readonly<Props>) {
|
|
20
20
|
const handleRequestSort = (property: string) => {
|
|
21
21
|
const current = props.input.sort;
|
|
22
22
|
if (property === current) {
|
|
@@ -29,7 +29,7 @@ import { useEffect, useState } from "react";
|
|
|
29
29
|
import IntegrationListTable from "./integration-list-table";
|
|
30
30
|
|
|
31
31
|
// Returned from processExecutions query
|
|
32
|
-
export interface
|
|
32
|
+
export interface IntegrationItem {
|
|
33
33
|
isScheduled: 0 | 1;
|
|
34
34
|
isTriggered: 0 | 1;
|
|
35
35
|
id: string;
|
|
@@ -58,7 +58,7 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
58
58
|
const theme = useTheme();
|
|
59
59
|
const styles = getStyles(theme);
|
|
60
60
|
|
|
61
|
-
const [items, setItems] = useState<
|
|
61
|
+
const [items, setItems] = useState<IntegrationItem[]>([]);
|
|
62
62
|
const [page, setPage] = useState(
|
|
63
63
|
(props.input.skip ?? 0) / (props.input.top ?? 10) + 1,
|
|
64
64
|
);
|
|
@@ -104,7 +104,7 @@ const IntegrationList: React.FC<Props> = (props: Props) => {
|
|
|
104
104
|
|
|
105
105
|
useEffect(() => {
|
|
106
106
|
if (props.data?.processes?.nodes) {
|
|
107
|
-
setItems(props.data.processes.nodes as
|
|
107
|
+
setItems(props.data.processes.nodes as IntegrationItem[]);
|
|
108
108
|
}
|
|
109
109
|
}, [props.data]);
|
|
110
110
|
|