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 15, 2024
2 parents efd3f62 + a84f5fc commit ab50f21
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 186 deletions.
250 changes: 86 additions & 164 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"dependencies": {
"@ant-design/icons": "^5.3.7",
"@axa-fr/react-oidc": "^7.22.4",
"@tanstack/react-query": "^5.35.5",
"@tanstack/react-query": "^5.36.0",
"antd": "^5.17.0",
"echarts": "5.5.0",
"echarts-for-react": "^3.0.2",
"rc-field-form": "^2.0.1",
"rc-field-form": "^2.1.0",
"rc-menu": "^9.12.2",
"rc-tabs": "^15.0.0",
"react": "^18.2.0",
Expand Down Expand Up @@ -93,8 +93,8 @@
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"env-cmd": "^10.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -106,7 +106,7 @@
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"knip": "^5.14.0",
"knip": "^5.15.1",
"openapi-typescript-codegen": "^0.29.0",
"prettier": "3.2.5",
"react-scripts": "5.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDeta
<Descriptions.Item label='Flavors'>
<FlavorsText flavors={serviceDetails.flavors.serviceFlavors} />
</Descriptions.Item>
<Descriptions.Item label='Billing'>
<Descriptions.Item label='Billing Modes'>
<BillingText billing={serviceDetails.billing} />
</Descriptions.Item>
<Descriptions.Item label={'Service API'}>
Expand Down
17 changes: 10 additions & 7 deletions src/components/content/common/ocl/BillingText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Billing } from '../../../../xpanse-api/generated';
import YAML from 'yaml';
import { Button, Popover } from 'antd';
import { Col, Row, Tag } from 'antd';
import React from 'react';

export function BillingText({ billing }: { billing: Billing }): React.JSX.Element {
Expand All @@ -16,12 +16,15 @@ export function BillingText({ billing }: { billing: Billing }): React.JSX.Elemen
// @ts-expect-error
yamlDocument.contents = billing;
return (
<Popover content={<pre>{yamlDocument.toString()}</pre>} title={'Billing'} trigger='hover'>
<Button className={'ocl-data-hover'} type={'link'}>
{/* TODO Will be fixed in #1591 or #1592 */}
{billing.billingModes[0]}
</Button>
</Popover>
<Row>
{billing.billingModes.map((billingMode) => {
return (
<Col key={billingMode}>
<Tag color={'blue'}>{billingMode}</Tag>
</Col>
);
})}
</Row>
);
}
return <></>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/common/ocl/DisplayOclData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function DisplayOclData({ ocl }: { ocl: Ocl }): React.JSX.Element | string {
<Descriptions.Item label='Flavors'>
<FlavorsText flavors={ocl.flavors.serviceFlavors} />
</Descriptions.Item>
<Descriptions.Item label='Billing'>
<Descriptions.Item label='Billing Modes'>
<BillingText billing={ocl.billing} />
</Descriptions.Item>
<Descriptions.Item label='Deployment'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const BillingModeSelection = ({
<>
<Form.Item
key={'BillingMode'}
label={<p style={{ fontWeight: 'bold' }}>{'BillingMode'}</p>}
label={<p style={{ fontWeight: 'bold' }}>{'Billing Mode'}</p>}
required={true}
rules={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const MigrateServiceSubmitBillingMode = ({ selectBillMode }: { selectBill
<>
<Form.Item
key={'BillingMode'}
label={<p style={{ fontWeight: 'bold' }}>{'BillingMode'}</p>}
label={<p style={{ fontWeight: 'bold' }}>{'Billing Mode'}</p>}
required={true}
>
<Flex vertical gap='middle'>
Expand Down
10 changes: 5 additions & 5 deletions src/components/content/order/scale/Scale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ export const Scale = ({
<Tag color={'blue'}>
{/* TODO Will be fixed after #1597 is fixed */}
{(20).toString()}
{/* TODO Will be fixed in #1591 or #1592 */}
{currentBilling.billingModes[0]}
{
currentSelectedService.deployRequest
.billingMode
}
</Tag>
</>
) : (
Expand All @@ -186,9 +188,7 @@ export const Scale = ({
<Tag color={'blue'}>
{/* TODO Will be fixed after #1597 is fixed */}
{(20).toString()}
{/* TODO Will be fixed in #1591 or #1592 */}
{currentBilling.billingModes[0]}
in #1591 or #1592
{currentSelectedService.deployRequest.billingMode}
</Tag>
</>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/review/ServiceReviewsDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const ServiceReviewsDetails = ({
<Descriptions.Item label='Flavors'>
<FlavorsText flavors={currentServiceTemplateVo.flavors.serviceFlavors} />
</Descriptions.Item>
<Descriptions.Item label='Billing'>
<Descriptions.Item label='Billing Modes'>
<BillingText billing={currentServiceTemplateVo.billing} />
</Descriptions.Item>
<Descriptions.Item label='Deployment'>
Expand Down

0 comments on commit ab50f21

Please sign in to comment.