Skip to content

Commit

Permalink
Merge branch 'eclipse-xpanse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLiNaruto authored Jun 6, 2024
2 parents ce48e8a + 00cceed commit 5a95f02
Show file tree
Hide file tree
Showing 49 changed files with 647 additions and 594 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^16.0.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.1",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^9.0.8",
Expand All @@ -126,7 +126,7 @@
"jest-environment-jsdom": "^29.7.0",
"knip": "^5.17.4",
"openapi-typescript-codegen": "^0.29.0",
"prettier": "3.3.0",
"prettier": "3.3.1",
"prettier-plugin-organize-imports": "^3.2.4",
"release-it": "^17.3.0",
"ts-jest": "^29.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDeta
<Descriptions.Item label='Service' labelStyle={{ width: '230px' }}>
<ShowIcon serviceDetails={serviceDetails} />
</Descriptions.Item>
<Descriptions.Item label='ServiceTemplateId' labelStyle={{ width: '230px' }}>
{serviceDetails.id}
</Descriptions.Item>
<Descriptions.Item label='Description' labelStyle={{ width: '230px' }}>
{serviceDetails.description}
</Descriptions.Item>
Expand All @@ -69,7 +72,7 @@ function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDeta
<BillingText billing={serviceDetails.billing} />
</Descriptions.Item>
<Descriptions.Item label={'Service API'}>
<ApiDoc id={serviceDetails.id} styleClass={appStyles.serviceApiDocLink} />
<ApiDoc id={serviceDetails.serviceTemplateId} styleClass={appStyles.serviceApiDocLink} />
</Descriptions.Item>
<Descriptions.Item label='Contact Details'>
<ContactDetailsText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ function ServiceProvider({
<>
{activeServiceDetail ? (
<>
<UnregisterResult id={activeServiceDetail.id} category={category} />
<ReRegisterResult id={activeServiceDetail.id} category={category} />
<DeleteResult id={activeServiceDetail.id} category={category} />
<UnregisterResult id={activeServiceDetail.serviceTemplateId} category={category} />
<ReRegisterResult id={activeServiceDetail.serviceTemplateId} category={category} />
<DeleteResult id={activeServiceDetail.serviceTemplateId} category={category} />
<Tabs
items={items}
onChange={onChangeCsp}
Expand All @@ -197,24 +197,24 @@ function ServiceProvider({
/>
<div className={catalogStyles.updateUnregisterBtnClass}>
<UpdateService
id={activeServiceDetail.id}
id={activeServiceDetail.serviceTemplateId}
category={category}
isViewDisabled={isViewDisabled}
/>
<UnregisterService
id={activeServiceDetail.id}
id={activeServiceDetail.serviceTemplateId}
setIsViewDisabled={setIsViewDisabled}
serviceRegistrationState={activeServiceDetail.serviceRegistrationState}
/>
<ReRegisterService
id={activeServiceDetail.id}
id={activeServiceDetail.serviceTemplateId}
setIsViewDisabled={setIsViewDisabled}
isReRegisterDisabled={isReRegisterDisabled}
setIsDeleteDisabled={setIsDeleteDisabled}
serviceRegistrationState={activeServiceDetail.serviceRegistrationState}
/>
<DeleteService
id={activeServiceDetail.id}
id={activeServiceDetail.serviceTemplateId}
setIsViewDisabled={setIsViewDisabled}
isDeleteDisabled={isDeleteDisabled}
setIsReRegisterDisabled={setIsReRegisterDisabled}
Expand All @@ -233,7 +233,7 @@ function ServiceProvider({
/>
<ServiceDetail serviceDetails={activeServiceDetail} />
<ServicePolicies
key={activeServiceDetail.id}
key={activeServiceDetail.serviceTemplateId}
serviceDetails={activeServiceDetail}
isViewDisabled={isViewDisabled}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const AddOrUpdateServicePolicy = ({
};
setCreatePolicyRequest(policyCreateRequest);
createServicePoliciesRequest.mutate(policyCreateRequest);
} else if (currentServicePolicy.id.length > 0) {
} else if (currentServicePolicy.servicePolicyId.length > 0) {
// Check whether the modified data has changed
if (comparePolicyUpdateRequestResult(policyRequest, currentServicePolicy)) {
setIsUpdated(comparePolicyUpdateRequestResult(policyRequest, currentServicePolicy));
Expand All @@ -75,7 +75,7 @@ export const AddOrUpdateServicePolicy = ({
};
setUpdatePolicyRequest(policyUpdateRequest);
updatePoliciesManagementServiceRequest.mutate({
id: currentServicePolicy.id,
id: currentServicePolicy.servicePolicyId,
policyUpdateRequest: policyUpdateRequest,
});
}
Expand Down Expand Up @@ -214,12 +214,12 @@ export const AddOrUpdateServicePolicy = ({
initialValues={{
remember: true,
enabled:
currentServicePolicy !== undefined && currentServicePolicy.id.length > 0
currentServicePolicy !== undefined && currentServicePolicy.servicePolicyId.length > 0
? currentServicePolicy.enabled
: false,
flavors:
currentServicePolicy !== undefined &&
currentServicePolicy.id.length > 0 &&
currentServicePolicy.servicePolicyId.length > 0 &&
currentServicePolicy.flavorNameList
? currentServicePolicy.flavorNameList
: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ServicePolicies = ({
const [currentServicePolicy, setCurrentServicePolicy] = useState<ServicePolicy | undefined>(undefined);
const [isOpenAddOrUpdatePolicyModal, setIsOpenAddOrUpdatePolicyModal] = useState<boolean>(false);

const servicePolicyListQuery = useGetServicePolicyList(serviceDetails.id);
const servicePolicyListQuery = useGetServicePolicyList(serviceDetails.serviceTemplateId);
const deleteServicePolicyRequest = useDeleteServicePolicy();

const refreshServicePoliciesList = () => {
Expand All @@ -52,7 +52,7 @@ export const ServicePolicies = ({
const columns: ColumnsType<ServicePolicy> = [
{
title: 'Policy ID',
dataIndex: 'id',
dataIndex: 'servicePolicyId',
},
{
title: 'Content',
Expand Down Expand Up @@ -134,7 +134,7 @@ export const ServicePolicies = ({
type='primary'
icon={<CloseCircleOutlined />}
loading={
record.id === currentPolicyId &&
record.servicePolicyId === currentPolicyId &&
!deleteServicePolicyRequest.isSuccess &&
deleteServicePolicyRequest.isError
}
Expand All @@ -156,8 +156,8 @@ export const ServicePolicies = ({
];

const deleteCurrentServicePolicy = (record: ServicePolicy) => {
setCurrentPolicyId(record.id);
deleteServicePolicyRequest.mutate(record.id);
setCurrentPolicyId(record.servicePolicyId);
deleteServicePolicyRequest.mutate(record.servicePolicyId);
};

const addServicePolicies = () => {
Expand Down Expand Up @@ -250,7 +250,7 @@ export const ServicePolicies = ({
onCancel={closeAddOrUpdateServicePolicyModal}
>
<AddOrUpdateServicePolicy
serviceTemplateId={serviceDetails.id}
serviceTemplateId={serviceDetails.serviceTemplateId}
currentServicePolicy={currentServicePolicy}
getCancelUpdateStatus={getCancelUpdateStatus}
serviceDetails={serviceDetails}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function ServicePolicyCreateResultStatus({
description={
<ServicePolicySubmitResult
msg={'Policy created successfully'}
uuid={currentServicePolicy === undefined ? '' : currentServicePolicy.id}
uuid={currentServicePolicy === undefined ? '' : currentServicePolicy.servicePolicyId}
/>
}
showIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function ServicePolicyUpdateResultStatus({
description={
<ServicePolicySubmitResult
msg={'Policy updated successfully'}
uuid={currentServicePolicy === undefined ? '' : currentServicePolicy.id}
uuid={currentServicePolicy === undefined ? '' : currentServicePolicy.servicePolicyId}
/>
}
showIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function UpdateService({
},
onSuccess: (serviceTemplateVo: ServiceTemplateDetailVo) => {
files.current[0].status = 'done';
updateResult.current = [`ID - ${serviceTemplateVo.id}`];
updateResult.current = [`ID - ${serviceTemplateVo.serviceTemplateId}`];
},
onError: (error: Error) => {
files.current[0].status = 'error';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const MyServiceHistory = ({
deployedService: DeployedServiceDetails | VendorHostedDeployedServiceDetails;
}): React.JSX.Element => {
let serviceModificationAuditHistoryList: ServiceModificationAuditDetails[] = [];
const listServiceModifyHistoryQuery = useListServiceModifyHistoryQuery(deployedService.id);
const listServiceModifyHistoryQuery = useListServiceModifyHistoryQuery(deployedService.serviceId);

if (listServiceModifyHistoryQuery.isSuccess && listServiceModifyHistoryQuery.data.length > 0) {
serviceModificationAuditHistoryList = listServiceModifyHistoryQuery.data;
Expand All @@ -33,7 +33,7 @@ export const MyServiceHistory = ({
const columns: ColumnsType<ServiceModificationAuditDetails> = [
{
title: 'ModifyId',
dataIndex: 'id',
dataIndex: 'serviceModificationRequestId',
align: 'center',
width: 100,
className: serviceModifyStyles.modifyHistoryValue,
Expand Down
Loading

0 comments on commit 5a95f02

Please sign in to comment.