Skip to content

Commit d20ff9a

Browse files
authored
Merge pull request #1440 from sgratch/rephrase-labels-for-presereve-static-ips-setting
MTV-1743: Rephrase preserve static ip's labels for clarity
2 parents 110e27a + b9328be commit d20ff9a

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

packages/forklift-console-plugin/locales/en/plugin__forklift-console-plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"Disk counter": "Disk counter",
141141
"Disk decryption passphrases": "Disk decryption passphrases",
142142
"Disk transfer": "Disk transfer",
143-
"Do not try to preserve the static IPs of virtual machines migrated from vSphere.": "Do not try to preserve the static IPs of virtual machines migrated from vSphere.",
143+
"Do not preserve static IPs": "Do not preserve static IPs",
144144
"Domain": "Domain",
145145
"Domain name": "Domain name",
146146
"Drag and drop a file or upload one": "Drag and drop a file or upload one",
@@ -378,6 +378,7 @@
378378
"Preserve CPU model": "Preserve CPU model",
379379
"Preserve static IPs": "Preserve static IPs",
380380
"Preserve the CPU model and flags the VM runs with in its oVirt cluster.": "Preserve the CPU model and flags the VM runs with in its oVirt cluster.",
381+
"Preserve the static IPs of the virtual machines migrated": "Preserve the static IPs of the virtual machines migrated",
381382
"Preserve the static IPs of virtual machines migrated from vSphere.": "Preserve the static IPs of virtual machines migrated from vSphere.",
382383
"Product": "Product",
383384
"Progress": "Progress",
@@ -567,7 +568,6 @@
567568
"Whether this is a warm migration": "Whether this is a warm migration",
568569
"Whether this is a warm migration.": "Whether this is a warm migration.",
569570
"Whether to preserve the CPU model": "Whether to preserve the CPU model",
570-
"Whether to preserve the static IPs": "Whether to preserve the static IPs",
571571
"YAML": "YAML",
572572
"You can always bring this welcome card back into view by clicking 'Show the welcome card' in the page heading.": "You can always bring this welcome card back into view by clicking 'Show the welcome card' in the page heading.",
573573
"You can cancel virtual machines from a running migration plan.": "You can cancel virtual machines from a running migration plan.",

packages/forklift-console-plugin/src/modules/Plans/views/details/components/SettingsSection/components/PreserveStaticIPsDetailsItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export const PreserveStaticIPsDetailsItem: React.FC<PlanDetailsItemProps> = ({
2424

2525
const trueLabel = (
2626
<Label isCompact color={'green'}>
27-
Preserve static IPs
27+
{t('Preserve static IPs')}
2828
</Label>
2929
);
3030
const falseLabel = (
3131
<Label isCompact color={'blue'}>
32-
Use system default
32+
{t('Do not preserve static IPs')}
3333
</Label>
3434
);
3535

packages/forklift-console-plugin/src/modules/Plans/views/details/components/SettingsSection/modals/EditPlanPreserveStaticIPs/EditPlanPreserveStaticIPs.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { Switch } from '@patternfly/react-core';
1313

1414
const onConfirm: OnConfirmHookType = async ({ resource, model, newValue }) => {
1515
const plan = resource as V1beta1Plan;
16-
1716
const resourceValue = plan?.spec?.preserveStaticIPs;
1817
const op = resourceValue ? 'replace' : 'add';
1918

@@ -49,12 +48,10 @@ const PreserveStaticIPsInputFactory: () => ModalInputComponentType = () => {
4948

5049
return (
5150
<Switch
52-
id="simple-switch"
53-
label={t('Preserve the static IPs of virtual machines migrated from vSphere.')}
54-
labelOff={t(
55-
'Do not try to preserve the static IPs of virtual machines migrated from vSphere.',
56-
)}
51+
id="preserve-static-ip-switch"
52+
label={t('Preserve the static IPs of the virtual machines migrated')}
5753
isChecked={value === 'true'}
54+
hasCheckIcon
5855
onChange={(e, v) => onChangeInternal(v, e)}
5956
/>
6057
);
@@ -71,10 +68,9 @@ const EditPlanPreserveStaticIPs_: React.FC<EditPlanPreserveStaticIPsProps> = (pr
7168
{...props}
7269
jsonPath={(obj: V1beta1Plan) => (obj.spec.preserveStaticIPs ? 'true' : 'false')}
7370
title={props?.title || t('Set to preserve the static IPs')}
74-
label={props?.label || t('Whether to preserve the static IPs')}
71+
label={props?.label ?? ''}
7572
model={PlanModel}
7673
onConfirmHook={onConfirm}
77-
body={t(`Preserve the static IPs of virtual machines migrated from vSphere.`)}
7874
InputComponent={PreserveStaticIPsInputFactory()}
7975
/>
8076
);

0 commit comments

Comments
 (0)