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 May 28, 2024
2 parents 449ef81 + aba18ee commit 2860e97
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import appStyles from '../../../../../styles/app.module.css';
import catalogStyles from '../../../../../styles/catalog.module.css';
import oclDisplayStyles from '../../../../../styles/ocl-display.module.css';
import { ServiceTemplateDetailVo } from '../../../../../xpanse-api/generated';
import { ServiceTemplateRegisterStatus } from '../../../common/catalog/ServiceTemplateRegisterStatus.tsx';
import { ApiDoc } from '../../../common/doc/ApiDoc';
import { AgreementText } from '../../../common/ocl/AgreementText';
import { BillingText } from '../../../common/ocl/BillingText';
import { ContactDetailsShowType } from '../../../common/ocl/ContactDetailsShowType';
import { ContactDetailsText } from '../../../common/ocl/ContactDetailsText';
import { DeploymentText } from '../../../common/ocl/DeploymentText';
import { FlavorsText } from '../../../common/ocl/FlavorsText';
import { ServiceRegistrationStatus } from './ServiceRegistrationStatus';
import { ShowIcon } from './ShowIcon';

function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDetailVo }): React.JSX.Element {
Expand Down Expand Up @@ -56,7 +56,7 @@ function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDeta
<Tag color='cyan'>{serviceDetails.namespace}</Tag>
</Descriptions.Item>
<Descriptions.Item label='Status'>
<ServiceRegistrationStatus serviceStatus={serviceDetails.serviceRegistrationState} />
<ServiceTemplateRegisterStatus serviceRegistrationState={serviceDetails.serviceRegistrationState} />
</Descriptions.Item>
<Descriptions.Item label='CredentialType'>{serviceDetails.deployment.credentialType}</Descriptions.Item>
<Descriptions.Item label='Deployment'>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function UnregisterResult({
if (useUnregisterRequestState[0].status === 'success') {
return (
<Alert
message='Unregister:'
description={'Service Unregistered Successfully'}
message='Service Unregistered Successfully'
description={'Service removed from the catalog.'}
showIcon
type={'success'}
closable={true}
Expand All @@ -53,7 +53,7 @@ export function UnregisterResult({
useUnregisterRequestState[0].error.body &&
'details' in useUnregisterRequestState[0].error.body ? (
<Alert
message='Unregister:'
message='Unregister Request Failed'
description={(useUnregisterRequestState[0].error.body as Response).details}
showIcon
type={'error'}
Expand All @@ -62,7 +62,7 @@ export function UnregisterResult({
/>
) : (
<Alert
message='Unregister:'
message='Unregister Request Failed'
description={useUnregisterRequestState[0].error.message}
showIcon
type={'error'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, SyncOutlined } from '@ant-design/icons';
import { Tag } from 'antd';
import React from 'react';
import serviceReviewStyles from '../../../styles/service-review.module.css';
import { ServiceTemplateDetailVo } from '../../../xpanse-api/generated';
import serviceReviewStyles from '../../../../styles/service-review.module.css';
import { ServiceTemplateDetailVo } from '../../../../xpanse-api/generated';

export function ServiceTemplateRegisterStatus(
serviceRegistrationState: ServiceTemplateDetailVo.serviceRegistrationState
): React.JSX.Element {
export function ServiceTemplateRegisterStatus({
serviceRegistrationState,
}: {
serviceRegistrationState: ServiceTemplateDetailVo.serviceRegistrationState;
}): React.JSX.Element {
switch (serviceRegistrationState) {
case ServiceTemplateDetailVo.serviceRegistrationState.APPROVAL_PENDING:
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export const ApproveOrRejectServiceTemplate = ({
return (
<div className={serviceReviewStyles.approveRejectAlertClass}>
<Alert
message={errorMessage}
description={'Register service review failed.'}
message={'Service review request failed'}
description={errorMessage}
showIcon
closable={true}
onClose={onClose}
Expand All @@ -84,8 +84,7 @@ export const ApproveOrRejectServiceTemplate = ({
return (
<div className={serviceReviewStyles.approveRejectAlertClass}>
<Alert
message={'Processing Status'}
description={'Service template reviewed successfully.'}
message={'Service template review result submitted'}
showIcon
closable={true}
onClose={onClose}
Expand Down
7 changes: 4 additions & 3 deletions src/components/content/review/ServiceReviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import React, { useState } from 'react';
import serviceReviewStyles from '../../../styles/service-review.module.css';
import tableStyles from '../../../styles/table.module.css';
import { Deployment, ServiceTemplateDetailVo } from '../../../xpanse-api/generated';
import { ServiceTemplateRegisterStatus } from '../common/catalog/ServiceTemplateRegisterStatus.tsx';
import GetServiceTemplatesListError from './GetServiceTemplatesListError';
import { ServiceReviewsDetails } from './ServiceReviewsDetails';
import { ServiceTemplateRegisterStatus } from './ServiceTemplateRegisterStatus';
import useListAllServiceTemplatesQuery from './query/useListAllServiceTemplatesQuery';

export default function ServiceReviews(): React.JSX.Element {
Expand Down Expand Up @@ -234,8 +234,9 @@ export default function ServiceReviews(): React.JSX.Element {
onFilter: (value: React.Key | boolean, record) =>
record.serviceRegistrationState.startsWith(value.toString()),
align: 'left',
render: (serviceRegistrationState: ServiceTemplateDetailVo.serviceRegistrationState) =>
ServiceTemplateRegisterStatus(serviceRegistrationState),
render: (serviceRegistrationState: ServiceTemplateDetailVo.serviceRegistrationState) => (
<ServiceTemplateRegisterStatus serviceRegistrationState={serviceRegistrationState} />
),
},
{
title: 'Deployer Type',
Expand Down
2 changes: 0 additions & 2 deletions src/components/content/review/ServiceReviewsDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ export const ServiceReviewsDetails = ({
{currentServiceTemplateVo.name}
</Paragraph>
</Tooltip>
<br />
<br />
</div>
<div>
<b>Cloud Service Provider</b>
Expand Down

0 comments on commit 2860e97

Please sign in to comment.