mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-03-21 20:51:45 +00:00
fix: reword the error message to focus on bootable volume (#736)
Signed-off-by: Tim Liou <tim.liou@suse.com>
This commit is contained in:
parent
888ec7a50f
commit
a9c392c13f
@ -428,7 +428,7 @@ harvester:
|
||||
volume:
|
||||
upperType: 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:
|
||||
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.'
|
||||
@ -1356,7 +1356,7 @@ harvester:
|
||||
clusterRegistrationUrl:
|
||||
url: URL
|
||||
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
|
||||
middle: 'additional-ca'
|
||||
suffix: setting.
|
||||
@ -2190,12 +2190,12 @@ typeLabel:
|
||||
other { VMware Sources }
|
||||
}
|
||||
migration.harvesterhci.io.ovasource: |-
|
||||
{count, plural,
|
||||
{count, plural,
|
||||
one { OVA Source }
|
||||
other { OVA Sources }
|
||||
}
|
||||
}
|
||||
migration.harvesterhci.io.virtualmachineimport: |-
|
||||
{count, plural,
|
||||
one { Virtual Machine Import }
|
||||
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);
|
||||
});
|
||||
|
||||
let requiredVolume = false;
|
||||
let hasBootableVolume = false;
|
||||
|
||||
_volumes.forEach((V, idx) => {
|
||||
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;
|
||||
|
||||
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) {
|
||||
@ -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) {
|
||||
errors.push(getters['i18n/t']('harvester.validation.vm.volume.needImageOrExisting'));
|
||||
if (!hasBootableVolume && !value.links) {
|
||||
errors.push(getters['i18n/t']('harvester.validation.vm.volume.needAtLeastOneBootable'));
|
||||
}
|
||||
|
||||
return errors;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user