From fc4b60603eb800303a737e313a7a24ed8a78717b Mon Sep 17 00:00:00 2001 From: baixinsui Date: Fri, 27 Dec 2024 13:51:45 +0800 Subject: [PATCH] deployer changed to multiple files map (#1388) --- .../policies/AddOrUpdateServicePolicy.tsx | 2 +- .../deletePolicy/useDeleteServicePolicy.tsx | 4 +- .../updatePolicy/useUpdateServicePolicy.tsx | 10 +- .../content/common/ocl/DeploymentScript.tsx | 4 +- .../deployment/DeploymentInfomation.tsx | 2 +- .../delete/useDeletePolicyRequest.tsx | 4 +- .../content/workflows/Workflows.tsx | 4 +- src/xpanse-api/generated/sdk.gen.ts | 136 +++++++++--------- src/xpanse-api/generated/types.gen.ts | 56 ++++---- 9 files changed, 115 insertions(+), 107 deletions(-) diff --git a/src/components/content/catalog/services/policies/AddOrUpdateServicePolicy.tsx b/src/components/content/catalog/services/policies/AddOrUpdateServicePolicy.tsx index 9d0cbebfa..3a15f8951 100644 --- a/src/components/content/catalog/services/policies/AddOrUpdateServicePolicy.tsx +++ b/src/components/content/catalog/services/policies/AddOrUpdateServicePolicy.tsx @@ -75,7 +75,7 @@ export const AddOrUpdateServicePolicy = ({ }; setUpdatePolicyRequest(policyUpdateRequest); updatePoliciesManagementServiceRequest.mutate({ - id: currentServicePolicy.servicePolicyId, + policyId: currentServicePolicy.servicePolicyId, policyUpdateRequest: policyUpdateRequest, }); } diff --git a/src/components/content/catalog/services/policies/deletePolicy/useDeleteServicePolicy.tsx b/src/components/content/catalog/services/policies/deletePolicy/useDeleteServicePolicy.tsx index a0e1638db..a46956d47 100644 --- a/src/components/content/catalog/services/policies/deletePolicy/useDeleteServicePolicy.tsx +++ b/src/components/content/catalog/services/policies/deletePolicy/useDeleteServicePolicy.tsx @@ -8,9 +8,9 @@ import { deleteServicePolicy, DeleteServicePolicyData } from '../../../../../../ export const useDeleteServicePolicy = () => { return useMutation({ - mutationFn: (id: string) => { + mutationFn: (policyId: string) => { const deleteData: DeleteServicePolicyData = { - id: id, + policyId: policyId, }; return deleteServicePolicy(deleteData); }, diff --git a/src/components/content/catalog/services/policies/updatePolicy/useUpdateServicePolicy.tsx b/src/components/content/catalog/services/policies/updatePolicy/useUpdateServicePolicy.tsx index 1a9fca5fd..28912635e 100644 --- a/src/components/content/catalog/services/policies/updatePolicy/useUpdateServicePolicy.tsx +++ b/src/components/content/catalog/services/policies/updatePolicy/useUpdateServicePolicy.tsx @@ -12,9 +12,15 @@ import { export const useUpdateServicePolicy = () => { return useMutation({ - mutationFn: ({ id, policyUpdateRequest }: { id: string; policyUpdateRequest: ServicePolicyUpdateRequest }) => { + mutationFn: ({ + policyId, + policyUpdateRequest, + }: { + policyId: string; + policyUpdateRequest: ServicePolicyUpdateRequest; + }) => { const data: UpdateServicePolicyData = { - id: id, + policyId: policyId, requestBody: policyUpdateRequest, }; return updateServicePolicy(data); diff --git a/src/components/content/common/ocl/DeploymentScript.tsx b/src/components/content/common/ocl/DeploymentScript.tsx index aad2a00c7..b59e2b710 100644 --- a/src/components/content/common/ocl/DeploymentScript.tsx +++ b/src/components/content/common/ocl/DeploymentScript.tsx @@ -15,11 +15,11 @@ export function DeploymentScriptText({ deployment }: { deployment: Deployment }) const yamlDocument = new YAML.Document(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error - yamlDocument.contents = deployment.deployer ? deployment.deployer : deployment.scriptsRepo; + yamlDocument.contents = deployment.scriptFiles ? deployment.scriptFiles : deployment.scriptsRepo; return ( {yamlDocument.toString()}} - title={'Deployment Script'} + title={'Deployment Scripts'} trigger='hover' >