mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-03-22 05:01:45 +00:00
(cherry picked from commit a9c392c13feb3cfe4100843eb41e0501e6708aaf) Signed-off-by: Tim Liou <tim.liou@suse.com> Co-authored-by: Tim Liou <tim.liou@suse.com>
This commit is contained in:
parent
6d627f82e9
commit
b8111f0ad7
@ -428,7 +428,7 @@ harvester:
|
|||||||
volume:
|
volume:
|
||||||
upperType: Volume name
|
upperType: Volume name
|
||||||
lowerType: volume name
|
lowerType: volume name
|
||||||
needImageOrExisting: 'At least an image volume or an existing root-disk volume is required!'
|
needAtLeastOneBootable: 'At least one bootable volume is required!'
|
||||||
image:
|
image:
|
||||||
ruleTip: 'The URL you have entered ends in an extension that we do not support. We only accept image files that end in .img, .iso, .qcow, .qcow2, .raw.'
|
ruleTip: 'The URL you have entered ends in an extension that we do not support. We only accept image files that end in .img, .iso, .qcow, .qcow2, .raw.'
|
||||||
ruleFileTip: 'The file you have chosen ends in an extension that we do not support. We only accept image files that end in .img, .iso, .qcow, .qcow2, .raw.'
|
ruleFileTip: 'The file you have chosen ends in an extension that we do not support. We only accept image files that end in .img, .iso, .qcow, .qcow2, .raw.'
|
||||||
@ -1356,7 +1356,7 @@ harvester:
|
|||||||
clusterRegistrationUrl:
|
clusterRegistrationUrl:
|
||||||
url: URL
|
url: URL
|
||||||
insecureSkipTLSVerify: Insecure Skip TLS Verify
|
insecureSkipTLSVerify: Insecure Skip TLS Verify
|
||||||
tip:
|
tip:
|
||||||
prefix: Harvester secures cluster registration via TLS by default. If opt out "Insecure SKip TLS Verify", you must provide custom CA certificates using the
|
prefix: Harvester secures cluster registration via TLS by default. If opt out "Insecure SKip TLS Verify", you must provide custom CA certificates using the
|
||||||
middle: 'additional-ca'
|
middle: 'additional-ca'
|
||||||
suffix: setting.
|
suffix: setting.
|
||||||
@ -2190,12 +2190,12 @@ typeLabel:
|
|||||||
other { VMware Sources }
|
other { VMware Sources }
|
||||||
}
|
}
|
||||||
migration.harvesterhci.io.ovasource: |-
|
migration.harvesterhci.io.ovasource: |-
|
||||||
{count, plural,
|
{count, plural,
|
||||||
one { OVA Source }
|
one { OVA Source }
|
||||||
other { OVA Sources }
|
other { OVA Sources }
|
||||||
}
|
}
|
||||||
migration.harvesterhci.io.virtualmachineimport: |-
|
migration.harvesterhci.io.virtualmachineimport: |-
|
||||||
{count, plural,
|
{count, plural,
|
||||||
one { Virtual Machine Import }
|
one { Virtual Machine Import }
|
||||||
other { Virtual Machine Imports }
|
other { Virtual Machine Imports }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ export function vmDisks(spec, getters, errors, validatorArgs, displayKey, value)
|
|||||||
validName(getters, errors, D.name, diskNames, prefix, type, lowerType, upperType);
|
validName(getters, errors, D.name, diskNames, prefix, type, lowerType, upperType);
|
||||||
});
|
});
|
||||||
|
|
||||||
let requiredVolume = false;
|
let hasBootableVolume = false;
|
||||||
|
|
||||||
_volumes.forEach((V, idx) => {
|
_volumes.forEach((V, idx) => {
|
||||||
const { type, typeValue } = getVolumeType(getters, V, _volumeClaimTemplates, value);
|
const { type, typeValue } = getVolumeType(getters, V, _volumeClaimTemplates, value);
|
||||||
@ -77,7 +77,7 @@ export function vmDisks(spec, getters, errors, validatorArgs, displayKey, value)
|
|||||||
const prefix = V.name || idx + 1;
|
const prefix = V.name || idx + 1;
|
||||||
|
|
||||||
if ([SOURCE_TYPE.IMAGE, SOURCE_TYPE.ATTACH_VOLUME, SOURCE_TYPE.CONTAINER].includes(type)) {
|
if ([SOURCE_TYPE.IMAGE, SOURCE_TYPE.ATTACH_VOLUME, SOURCE_TYPE.CONTAINER].includes(type)) {
|
||||||
requiredVolume = true;
|
hasBootableVolume = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === SOURCE_TYPE.NEW || type === SOURCE_TYPE.IMAGE) {
|
if (type === SOURCE_TYPE.NEW || type === SOURCE_TYPE.IMAGE) {
|
||||||
@ -137,10 +137,10 @@ export function vmDisks(spec, getters, errors, validatorArgs, displayKey, value)
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* At least one volume must be create. (Verify only when create.)
|
* At least one bootable volume must be provided. (Verify only when create.)
|
||||||
*/
|
*/
|
||||||
if ((!requiredVolume || _volumes.length === 0) && !value.links) {
|
if (!hasBootableVolume && !value.links) {
|
||||||
errors.push(getters['i18n/t']('harvester.validation.vm.volume.needImageOrExisting'));
|
errors.push(getters['i18n/t']('harvester.validation.vm.volume.needAtLeastOneBootable'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors;
|
return errors;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user