diff --git a/src/components/content/order/common/BillingModeSelection.tsx b/src/components/content/order/common/BillingModeSelection.tsx index 87b70c9e..3c625ff0 100644 --- a/src/components/content/order/common/BillingModeSelection.tsx +++ b/src/components/content/order/common/BillingModeSelection.tsx @@ -5,6 +5,7 @@ import { Alert, Flex, Form, Radio } from 'antd'; import React, { Dispatch, SetStateAction } from 'react'; +import serviceOrderStyles from '../../../../styles/service-order.module.css'; import { DeployRequest } from '../../../../xpanse-api/generated'; export const BillingModeSelection = ({ @@ -22,43 +23,47 @@ export const BillingModeSelection = ({ return ( <> - {'Billing Mode'}

} - required={true} - rules={[ - { - required: true, - message: 'billingMode is required', - }, - { type: 'string' }, - ]} +
- {billingModes && billingModes.length > 0 ? ( - - { - onChange(e.target.value as DeployRequest.billingMode); - }} - value={selectBillingMode} - > - {billingModes.map((mode: DeployRequest.billingMode) => ( - - {mode} - - ))} - - - ) : ( - - )} - + {'Billing Mode'}

} + required={true} + rules={[ + { + required: true, + message: 'billingMode is required', + }, + { type: 'string' }, + ]} + > + {billingModes && billingModes.length > 0 ? ( + + { + onChange(e.target.value as DeployRequest.billingMode); + }} + value={selectBillingMode} + > + {billingModes.map((mode: DeployRequest.billingMode) => ( + + {mode} + + ))} + + + ) : ( + + )} +
+
); }; diff --git a/src/components/content/order/common/FlavorFeatures.tsx b/src/components/content/order/common/FlavorFeatures.tsx index 39056170..c1571a7f 100644 --- a/src/components/content/order/common/FlavorFeatures.tsx +++ b/src/components/content/order/common/FlavorFeatures.tsx @@ -20,7 +20,7 @@ export const FlavorFeatures = (flavor: ServiceFlavor): React.JSX.Element => { itemLayout={'horizontal'} dataSource={flavor.features} renderItem={(item, _) => ( - +
 {item} diff --git a/src/components/content/order/common/FlavorInfo.tsx b/src/components/content/order/common/FlavorSelection.tsx similarity index 92% rename from src/components/content/order/common/FlavorInfo.tsx rename to src/components/content/order/common/FlavorSelection.tsx index 5d31752c..df0ae9b7 100644 --- a/src/components/content/order/common/FlavorInfo.tsx +++ b/src/components/content/order/common/FlavorSelection.tsx @@ -12,7 +12,7 @@ import { FlavorFeatures } from './FlavorFeatures'; import { FlavorPrice } from './FlavorPrice'; import { FlavorTitle } from './FlavorTitle'; -export const FlavorInfo = ({ +export const FlavorSelection = ({ selectFlavor, flavorList, onChangeFlavor, @@ -23,7 +23,9 @@ export const FlavorInfo = ({ }): React.JSX.Element => { return ( <> -
+
{availabilityZone.displayName}

} + className={serviceOrderStyles.selectCloudProviderClass} > diff --git a/src/components/content/order/common/MigrateServiceSubmitBillingMode.tsx b/src/components/content/order/common/MigrateServiceSubmitBillingMode.tsx index b23ce5ba..51b6d53c 100644 --- a/src/components/content/order/common/MigrateServiceSubmitBillingMode.tsx +++ b/src/components/content/order/common/MigrateServiceSubmitBillingMode.tsx @@ -5,23 +5,28 @@ import { Flex, Form, Radio } from 'antd'; import React from 'react'; +import serviceOrderStyles from '../../../../styles/service-order.module.css'; export const MigrateServiceSubmitBillingMode = ({ selectBillMode }: { selectBillMode: string }): React.JSX.Element => { return ( <> - {'Billing Mode'}

} - required={true} +
- - - - {selectBillMode} - - - - + {'Billing Mode'}

} + required={true} + > + + + + {selectBillMode} + + + +
+
); }; diff --git a/src/components/content/order/common/RegionInfo.tsx b/src/components/content/order/common/RegionSelection.tsx similarity index 90% rename from src/components/content/order/common/RegionInfo.tsx rename to src/components/content/order/common/RegionSelection.tsx index c083a612..a173d975 100644 --- a/src/components/content/order/common/RegionInfo.tsx +++ b/src/components/content/order/common/RegionSelection.tsx @@ -8,7 +8,7 @@ import React from 'react'; import serviceOrderStyles from '../../../../styles/service-order.module.css'; import { RegionDropDownInfo } from '../types/RegionDropDownInfo'; -export const RegionInfo = ({ +export const RegionSelection = ({ selectRegion, onChangeRegion, regionList, @@ -21,7 +21,7 @@ export const RegionInfo = ({ }): React.JSX.Element => { return ( <> -
+
{ if (onChangeRegion) { onChangeRegion(newRegion); diff --git a/src/components/content/order/common/ServiceHostingSelection.tsx b/src/components/content/order/common/ServiceHostingSelection.tsx index a0d25fc4..14adb1fa 100644 --- a/src/components/content/order/common/ServiceHostingSelection.tsx +++ b/src/components/content/order/common/ServiceHostingSelection.tsx @@ -33,15 +33,22 @@ export function ServiceHostingSelection({ return ( <> -
Service Hosted By:
- - self - service-vendor - +
+
+ Service Hosted By: +
+ + self + service-vendor + +
); } diff --git a/src/components/content/order/common/availabilityzone/AvailabilityZoneFormItem.tsx b/src/components/content/order/common/availabilityzone/AvailabilityZoneFormItem.tsx index c47a477d..a1966787 100644 --- a/src/components/content/order/common/availabilityzone/AvailabilityZoneFormItem.tsx +++ b/src/components/content/order/common/availabilityzone/AvailabilityZoneFormItem.tsx @@ -5,6 +5,7 @@ import { Form } from 'antd'; import React from 'react'; +import serviceOrderStyles from '../../../../../styles/service-order.module.css'; import { AvailabilityZoneConfig, UserOrderableServiceVo } from '../../../../../xpanse-api/generated'; import useGetAvailabilityZonesForRegionQuery from '../utils/useGetAvailabilityZonesForRegionQuery'; import { AvailabilityZoneButton } from './AvailabilityZoneButton'; @@ -35,13 +36,7 @@ export function AvailabilityZoneFormItem({ return ; } if (availabilityZonesVariableRequest.isError) { - return ( - - ); + return ; } if (availabilityZonesVariableRequest.data) { return ( @@ -59,7 +54,7 @@ export function AvailabilityZoneFormItem({ return ( {availabilityZoneConfig.displayName}

} + label={

{availabilityZoneConfig.displayName}

} required={availabilityZoneConfig.mandatory} rules={[ { diff --git a/src/components/content/order/create/NavigateOrderSubmission.tsx b/src/components/content/order/create/NavigateOrderSubmission.tsx index 7b5b0f6c..9fc79869 100644 --- a/src/components/content/order/create/NavigateOrderSubmission.tsx +++ b/src/components/content/order/create/NavigateOrderSubmission.tsx @@ -3,6 +3,7 @@ * SPDX-FileCopyrightText: Huawei Inc. */ +import { Button } from 'antd'; import React from 'react'; import { To, useNavigate } from 'react-router-dom'; import serviceOrderStyles from '../../../../styles/service-order.module.css'; @@ -21,6 +22,7 @@ function NavigateOrderSubmission({ }): React.JSX.Element { const navigate = useNavigate(); const [resetFormCache] = useOrderFormStore((state) => [state.clearFormVariables]); + function goBack(props: OrderSubmitProps | undefined) { const toUrl: string = to as string; if (toUrl.includes(servicesSubPageRoute)) { @@ -30,16 +32,15 @@ function NavigateOrderSubmission({ } return ( -
-
{ - goBack(props); - }} - className={serviceOrderStyles.orderNavigate} - > - {text} -
-
+ ); } diff --git a/src/components/content/order/create/OrderSubmit.tsx b/src/components/content/order/create/OrderSubmit.tsx index 661e8b68..f2fb590e 100644 --- a/src/components/content/order/create/OrderSubmit.tsx +++ b/src/components/content/order/create/OrderSubmit.tsx @@ -89,11 +89,9 @@ function OrderSubmit(state: OrderSubmitProps): React.JSX.Element { return ( <>
- -
- - + + Service: {state.name + '@' + state.version} @@ -104,98 +102,112 @@ function OrderSubmit(state: OrderSubmitProps): React.JSX.Element { -
-
- {isShowDeploymentResult ? ( - - ) : null} -
-
- - { - cacheFormVariable(CUSTOMER_SERVICE_NAME_FIELD, e.target.value); - }} - className={serviceOrderStyles.orderParamItemContent} - suffix={ - - - - } - /> - -
- {state.params.map((item) => - item.kind === 'variable' || item.kind === 'env' ? ( - - ) : undefined - )} -
-
-
-
- -
-
-
-
-
-
- -
+ ? `${serviceOrderStyles.deploying} ${serviceOrderStyles.orderParamItemRow}` + : '' + } + > + {state.params.map((item) => + item.kind === 'variable' || item.kind === 'env' ? ( + + ) : undefined + )} +
+
+
+
+
+
+ +
+
+ + +
+ +
+ + +
+ +
+ +
+
- +
); } diff --git a/src/components/content/order/create/SelectServiceForm.tsx b/src/components/content/order/create/SelectServiceForm.tsx index 0b67cf04..1bdfecd4 100644 --- a/src/components/content/order/create/SelectServiceForm.tsx +++ b/src/components/content/order/create/SelectServiceForm.tsx @@ -21,8 +21,8 @@ import { orderPageRoute, servicesSubPageRoute } from '../../../utils/constants'; import { ContactDetailsShowType } from '../../common/ocl/ContactDetailsShowType'; import { ContactDetailsText } from '../../common/ocl/ContactDetailsText'; import { BillingModeSelection } from '../common/BillingModeSelection'; -import { FlavorInfo } from '../common/FlavorInfo'; -import { RegionInfo } from '../common/RegionInfo'; +import { FlavorSelection } from '../common/FlavorSelection.tsx'; +import { RegionSelection } from '../common/RegionSelection.tsx'; import { ServiceHostingSelection } from '../common/ServiceHostingSelection'; import { AvailabilityZoneFormItem } from '../common/availabilityzone/AvailabilityZoneFormItem'; import { OrderSubmitProps } from '../common/utils/OrderSubmitProps'; @@ -286,18 +286,15 @@ export function SelectServiceForm({ services }: { services: UserOrderableService <>
-
- -
-
- + @@ -316,69 +313,89 @@ export function SelectServiceForm({ services }: { services: UserOrderableService <> )} -
- Version:  - +
-
- { - onChangeCloudProvider(csp); - }} - /> -
- -
-
-
- { - onChangeAreaValue(area); +
+ { + onChangeCloudProvider(csp); }} /> +
+
- - {availabilityZoneConfigs.map((availabilityZoneConfig) => { - return ( - +
+
+ { + onChangeAreaValue(area); + }} /> - ); - })} - - +
+ + {availabilityZoneConfigs.map((availabilityZoneConfig) => { + return ( + + ); + })} +
+
+ + +
-
-
-
-
+ + +
+ +
+ +
-
-
+ + ); diff --git a/src/components/content/order/formElements/CspSelect.tsx b/src/components/content/order/formElements/CspSelect.tsx index 15a891e1..edd29aed 100644 --- a/src/components/content/order/formElements/CspSelect.tsx +++ b/src/components/content/order/formElements/CspSelect.tsx @@ -20,33 +20,39 @@ export default function CspSelect({ }): React.JSX.Element { return ( <> -
Cloud Service Provider:
-
- {cspList.map((item, index) => { - return ( -
{ - onChangeHandler(item); - }} - key={index} - className={ - selectCsp.valueOf() === item.valueOf() - ? serviceOrderStyles.cloudProviderSelectHover - : serviceOrderStyles.cloudProviderSelect - } - > - {item} -
-
- ); - })} +
+
+ Cloud Service Provider: +
+
+ {cspList.map((item, index) => { + return ( +
{ + onChangeHandler(item); + }} + key={index} + className={ + selectCsp.valueOf() === item.valueOf() + ? serviceOrderStyles.cloudProviderSelectHover + : serviceOrderStyles.cloudProviderSelect + } + > + {item} +
+
+ ); + })} +
); diff --git a/src/components/content/order/migrate/DeploymentForm.tsx b/src/components/content/order/migrate/DeploymentForm.tsx index 263ea0c4..49c7d9c0 100644 --- a/src/components/content/order/migrate/DeploymentForm.tsx +++ b/src/components/content/order/migrate/DeploymentForm.tsx @@ -104,7 +104,6 @@ export const DeploymentForm = ({
-
- - +
+ - - - } - onChange={(e) => { - cacheFormVariable(CUSTOMER_SERVICE_NAME_FIELD, String(e.target.value)); - }} - /> - -
- {deployParams.params.map((item) => - item.kind === 'variable' || item.kind === 'env' ? ( - - ) : undefined - )} + label={'Name: Service Name'} + rules={[{ required: true }, { type: 'string', min: 5 }]} + colon={true} + className={serviceOrderStyles.orderParamsFirstParam} + > + + + + } + onChange={(e) => { + cacheFormVariable(CUSTOMER_SERVICE_NAME_FIELD, String(e.target.value)); + }} + /> + +
+ {deployParams.params.map((item) => + item.kind === 'variable' || item.kind === 'env' ? ( + + ) : undefined + )} +
+
diff --git a/src/components/content/order/migrate/MigrateServiceSubmit.tsx b/src/components/content/order/migrate/MigrateServiceSubmit.tsx index 430512cd..3ca33704 100644 --- a/src/components/content/order/migrate/MigrateServiceSubmit.tsx +++ b/src/components/content/order/migrate/MigrateServiceSubmit.tsx @@ -8,6 +8,7 @@ import { Tab } from 'rc-tabs/lib/interface'; import React, { useState } from 'react'; import appStyles from '../../../../styles/app.module.css'; import serviceOrderStyles from '../../../../styles/service-order.module.css'; +import tableStyles from '../../../../styles/table.module.css'; import { CloudServiceProvider, DeployRequest, @@ -20,10 +21,10 @@ import { } from '../../../../xpanse-api/generated'; import { cspMap } from '../../common/csp/CspLogo'; import useGetOrderableServiceDetailsQuery from '../../deployedServices/myServices/query/useGetOrderableServiceDetailsQuery'; -import { FlavorInfo } from '../common/FlavorInfo'; +import { FlavorSelection } from '../common/FlavorSelection.tsx'; import { MigrateServiceSubmitAvailabilityZoneInfo } from '../common/MigrateServiceSubmitAvailabilityZoneInfo'; import { MigrateServiceSubmitBillingMode } from '../common/MigrateServiceSubmitBillingMode'; -import { RegionInfo } from '../common/RegionInfo'; +import { RegionSelection } from '../common/RegionSelection.tsx'; import { ServiceHostingSelection } from '../common/ServiceHostingSelection'; import { getServiceFlavorList } from '../formDataHelpers/flavorHelper'; import { getAvailabilityZoneRequirementsForAService } from '../formDataHelpers/getAvailabilityZoneRequirementsForAService'; @@ -140,48 +141,72 @@ export const MigrateServiceSubmit = ({ migrationDetails={migrateServiceDetailsQuery.data} /> ) : null} - -
Cloud Service Provider:
-
-
- {selectCsp} -
+ +
+
+
+
+ Cloud Service Provider: +
+
+
+ {selectCsp} +
+
+
+
+
+ +
+
+
+ +
+ + {Object.keys(availabilityZones).length > 0 ? ( + + ) : undefined} +
+
+ +
-
- -
-
-
- -
- - {Object.keys(availabilityZones).length > 0 ? ( - - ) : undefined} - -
- - + /> +
+ + {availabilityZoneConfigs.map((availabilityZoneConfig) => { + return ( + + ); + })} +
+
+ +
+
+ + + + +
); }; diff --git a/src/styles/app.module.css b/src/styles/app.module.css index 12b82fcb..50f216b7 100644 --- a/src/styles/app.module.css +++ b/src/styles/app.module.css @@ -75,7 +75,6 @@ .content-title { font-size: 20px; font-weight: bold; - width: 400px; } .menu-loading { diff --git a/src/styles/flavor.module.css b/src/styles/flavor.module.css index b25f228f..5f5f3736 100644 --- a/src/styles/flavor.module.css +++ b/src/styles/flavor.module.css @@ -70,7 +70,6 @@ flex-wrap: wrap; gap: 10px; margin: 0 0 20px 0; - font-weight: bold; font-size: 14px; } @@ -103,3 +102,7 @@ .ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled { background-color: transparent !important; } + +.flavor-feature-item-name { + font-weight: lighter; +} diff --git a/src/styles/service-order.module.css b/src/styles/service-order.module.css index 7f76a6da..3a90a79b 100644 --- a/src/styles/service-order.module.css +++ b/src/styles/service-order.module.css @@ -3,28 +3,13 @@ * SPDX-FileCopyrightText: Huawei Inc. */ -.order-navigate { - display: flex; - border: 1px solid transparent; - color: rgb(24, 120, 255); - font-weight: bold; - padding: 10px; - width: 80px; -} - -.order-navigate:hover { - cursor: pointer; - font-weight: bold; - text-shadow: 0 0 1px rgb(24, 120, 255); - width: 80px; -} - .Line { height: 1px; border: 0 solid transparent; color: black; padding: 0; background: #f2f2f2; + width: 100%; } .order-select-migrate-target { @@ -72,16 +57,18 @@ } .order-param-submit { - float: left; - width: 450px; + text-align: right; + margin-top: 15px; + margin-bottom: 15px; +} + +.order-navigate { text-align: right; margin-top: 15px; margin-bottom: 15px; } .order-param-deploy { - float: left; - width: 600px; text-align: right; margin-top: 15px; margin-bottom: 15px; @@ -220,12 +207,22 @@ .order-form-selection-style { margin: 0 0 20px 0; - font-weight: bold; font-size: 14px; + padding-right: 20px; + place-content: center; +} + +.order-form-item-name { + font-weight: bold; +} + +.order-form-selection-first-in-group { + padding-top: 20px; } .select-box-class { box-sizing: border-box; + width: 450px; } .select-cloud-provider-class { @@ -238,6 +235,7 @@ .version-drop-down { width: fit-content; + margin-top: 15px; } .content-title-api { @@ -248,8 +246,8 @@ cursor: pointer; display: inline; padding: 0; - margin-left: 155px; margin-top: 10px; + float: right; } .services-loading-error { @@ -348,3 +346,24 @@ font-size: 14px; font-weight: normal; } + +.order-form-flex-elements { + display: flex; +} + +.order-form-group-items { + box-shadow: + 0 1px 1px 0 rgba(0, 0, 0, 0), + 0 6px 20px 0 rgba(0, 0, 0, 0.1); + padding-left: 50px; + margin-top: 20px; + padding-bottom: 20px; +} + +.order-params-first-param { + padding-top: 20px; +} + +.order-form-inline-display { + display: block; +} diff --git a/src/styles/table.module.css b/src/styles/table.module.css index 240a41bf..9e2299f1 100644 --- a/src/styles/table.module.css +++ b/src/styles/table.module.css @@ -5,6 +5,7 @@ .generic-table-container { padding: 24px; + display: grid; } .table-load-failure-alert {