Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename migrate service to port service. #1445

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/components/content/deployedServices/myServices/MyServices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import { getExistingServiceParameters } from '../../order/common/utils/existingS
import DestroyServiceStatusAlert from '../../order/destroy/DestroyServiceStatusAlert';
import { useDestroyRequestSubmitQuery } from '../../order/destroy/useDestroyRequestSubmitQuery';
import { Locks } from '../../order/locks/Locks';
import { Migrate } from '../../order/migrate/Migrate';
import { Modify } from '../../order/modify/Modify';
import { PurgeServiceStatusAlert } from '../../order/purge/PurgeServiceStatusAlert.tsx';
import { usePurgeRequestStatusQuery } from '../../order/purge/usePurgeRequestStatusQuery.ts';
Expand All @@ -59,6 +58,7 @@ import { RetryServiceSubmit } from '../../order/retryDeployment/RetryServiceSubm
import useRedeployFailedDeploymentQuery from '../../order/retryDeployment/useRedeployFailedDeploymentQuery';
import { Scale } from '../../order/scale/Scale';
import { CurrentServiceConfiguration } from '../../order/serviceConfiguration/CurrentServiceConfiguration';
import { ServicePorting } from '../../order/servicePorting/ServicePorting.tsx';
import RestartServiceStatusAlert from '../../order/serviceState/restart/RestartServiceStatusAlert';
import { useServiceStateRestartQuery } from '../../order/serviceState/restart/useServiceStateRestartQuery';
import StartServiceStatusAlert from '../../order/serviceState/start/StartServiceStatusAlert';
Expand All @@ -73,7 +73,6 @@ import { DeployedServicesHostingType } from '../common/DeployedServicesHostingTy
import { DeployedServicesRunningStatus } from '../common/DeployedServicesRunningStatus';
import { DeployedServicesStatus } from '../common/DeployedServicesStatus';
import { LocksTitle } from './LocksTitle.tsx';
import { MigrationTitle } from './MigrationTitle.tsx';
import { MyServiceDetails } from './MyServiceDetails';
import { MyServiceHistory } from './MyServiceHistory';
import {
Expand All @@ -84,11 +83,11 @@ import {
isDisableDetails,
isDisabledStopOrRestartBtn,
isDisableLocksBtn,
isDisableMigrateBtn,
isDisableModifyBtn,
isDisableRecreateBtn,
isDisableRetryDeploymentBtn,
isDisableServiceConfigBtn,
isDisableServicePortingBtn,
isDisableStartBtn,
updateBillingModeFilters,
updateCategoryFilters,
Expand All @@ -104,6 +103,7 @@ import {
} from './myServiceProps.tsx';
import useGetOrderableServiceDetailsByServiceIdQuery from './query/useGetOrderableServiceDetailsByServiceIdQuery.ts';
import useListDeployedServicesDetailsQuery from './query/useListDeployedServicesDetailsQuery';
import { ServicePortingTitle } from './ServicePortingTitle.tsx';
import { TooltipWhenDetailsDisabled } from './TooltipWhenDetailsDisabled.tsx';

function MyServices(): React.JSX.Element {
Expand Down Expand Up @@ -146,7 +146,7 @@ function MyServices(): React.JSX.Element {
const [isMyServiceHistoryModalOpen, setIsMyServiceHistoryModalOpen] = useState(false);
const [isMyServiceConfigurationModalOpen, setIsMyServiceConfigurationModalOpen] = useState(false);

const [isMigrateModalOpen, setIsMigrateModalOpen] = useState<boolean>(false);
const [isServicePortingModalOpen, setIsServicePortingModalOpen] = useState<boolean>(false);
const [isModifyModalOpen, setIsModifyModalOpen] = useState<boolean>(false);
const [isScaleModalOpen, setIsScaleModalOpen] = useState<boolean>(false);
const [isLocksModalOpen, setIsLocksModalOpen] = useState<boolean>(false);
Expand Down Expand Up @@ -394,36 +394,36 @@ function MyServices(): React.JSX.Element {
),
},
{
key: 'migrate',
key: 'servicePorting',
label: (
<>
{record.lockConfig?.modifyLocked ? (
<Tooltip
placement={'left'}
style={{ maxWidth: '100%' }}
title={'migration has been locked for this service.'}
title={'service porting has been locked for this service.'}
>
<Button
className={myServicesStyles.buttonAsLink}
icon={<CopyOutlined />}
disabled={true}
type={'link'}
>
migrate
port service
</Button>
<LockOutlined />
</Tooltip>
) : (
<Button
onClick={() => {
migrate(record);
servicePorting(record);
}}
className={myServicesStyles.buttonAsLink}
icon={<CopyOutlined />}
disabled={isDisableMigrateBtn(record, activeRecord)}
disabled={isDisableServicePortingBtn(record, activeRecord)}
type={'link'}
>
migrate
port service
</Button>
)}
</>
Expand Down Expand Up @@ -1065,13 +1065,13 @@ function MyServices(): React.JSX.Element {
record.serviceState = serviceState.RESTARTING;
}

function migrate(record: DeployedService): void {
function servicePorting(record: DeployedService): void {
setActiveRecord(
record.serviceHostingType === serviceHostingType.SELF
? (record as DeployedServiceDetails)
: (record as VendorHostedDeployedServiceDetails)
);
setIsMigrateModalOpen(true);
setIsServicePortingModalOpen(true);
}

function modify(record: DeployedService): void {
Expand Down Expand Up @@ -1189,11 +1189,11 @@ function MyServices(): React.JSX.Element {
setIsMyServiceConfigurationModalOpen(false);
};

const handleCancelMigrateModel = () => {
const handleCancelServicePortingModel = () => {
setActiveRecord(undefined);
clearFormVariables();
refreshData();
setIsMigrateModalOpen(false);
setIsServicePortingModalOpen(false);
};

const handleCancelModifyModel = () => {
Expand Down Expand Up @@ -1337,18 +1337,18 @@ function MyServices(): React.JSX.Element {
) : null}
{activeRecord ? (
<Modal
key={`${activeRecord.serviceId}-migrate`}
open={isMigrateModalOpen}
title={<MigrationTitle record={activeRecord} />}
key={`${activeRecord.serviceId}-servicePorting`}
open={isServicePortingModalOpen}
title={<ServicePortingTitle record={activeRecord} />}
closable={true}
maskClosable={false}
destroyOnClose={true}
footer={null}
onCancel={handleCancelMigrateModel}
onCancel={handleCancelServicePortingModel}
width={1600}
mask={true}
>
<Migrate currentSelectedService={activeRecord} />
<ServicePorting currentSelectedService={activeRecord} />
</Modal>
) : null}

Expand All @@ -1371,7 +1371,7 @@ function MyServices(): React.JSX.Element {
{activeRecord ? (
<Modal
open={isScaleModalOpen}
title={<MigrationTitle record={activeRecord} />}
title={<ServicePortingTitle record={activeRecord} />}
closable={true}
maskClosable={false}
destroyOnClose={true}
Expand All @@ -1387,7 +1387,7 @@ function MyServices(): React.JSX.Element {
{activeRecord ? (
<Modal
open={isModifyModalOpen}
title={<MigrationTitle record={activeRecord} />}
title={<ServicePortingTitle record={activeRecord} />}
closable={true}
maskClosable={false}
destroyOnClose={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import appStyles from '../../../../styles/app.module.css';
import tableStyles from '../../../../styles/table.module.css';
import { DeployedService } from '../../../../xpanse-api/generated';

export const MigrationTitle = ({ record }: { record: DeployedService }): React.JSX.Element => {
export const ServicePortingTitle = ({ record }: { record: DeployedService }): React.JSX.Element => {
return (
<div className={tableStyles.genericTableContainer}>
<div className={appStyles.contentTitle}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export const isDisableModifyBtn = (
return false;
};

export const isDisableMigrateBtn = (
export const isDisableServicePortingBtn = (
record: DeployedService,
activeRecord: DeployedServiceDetails | VendorHostedDeployedServiceDetails | undefined
): boolean => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import serviceOrderStyles from '../../../../styles/service-order.module.css';
import { AvailabilityZoneConfig } from '../../../../xpanse-api/generated';

export const MigrateServiceSubmitAvailabilityZoneInfo = ({
export const PortServiceSubmitAvailabilityZoneInfo = ({
availabilityZoneConfigs,
availabilityZones,
}: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Col, Flex, Form, Radio, Row } from 'antd';
import React from 'react';
import serviceOrderStyles from '../../../../styles/service-order.module.css';

export const MigrateServiceSubmitBillingMode = ({ selectBillMode }: { selectBillMode: string }): React.JSX.Element => {
export const PortServiceSubmitBillingMode = ({ selectBillMode }: { selectBillMode: string }): React.JSX.Element => {
return (
<Row className={serviceOrderStyles.orderFormSelectionFirstInGroup}>
<Col className={serviceOrderStyles.orderFormLabel}>
Expand Down
148 changes: 0 additions & 148 deletions src/components/content/order/migrate/MigrateServiceStatusAlert.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/content/order/migrate/useMigrateServiceQuery.ts

This file was deleted.

Loading
Loading