mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 13:11:43 +00:00
fix: unable to attach Ti volume in create VM page (#513)
* fix: unable to attach Ti volume in create VM page Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: only consider Ti / Gi for attached volume Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
1b214b2b6f
commit
4e8cb31e9d
@ -704,7 +704,7 @@ export default {
|
||||
parseDiskRows(disk) {
|
||||
const disks = [];
|
||||
const volumes = [];
|
||||
const diskNameLables = [];
|
||||
const diskNameLabels = [];
|
||||
const volumeClaimTemplates = [];
|
||||
|
||||
disk.forEach( (R, index) => {
|
||||
@ -726,7 +726,7 @@ export default {
|
||||
|
||||
disks.push(_disk);
|
||||
volumes.push(_volume);
|
||||
diskNameLables.push(dataVolumeName);
|
||||
diskNameLabels.push(dataVolumeName);
|
||||
|
||||
if (R.source !== SOURCE_TYPE.CONTAINER) {
|
||||
volumeClaimTemplates.push(_dataVolumeTemplate);
|
||||
@ -1043,7 +1043,9 @@ export default {
|
||||
},
|
||||
|
||||
parseVolumeClaimTemplate(R, dataVolumeName) {
|
||||
if (!String(R.size).includes('Gi') && R.size) {
|
||||
const sizeString = String(R.size);
|
||||
|
||||
if (!(sizeString.includes('Gi') || sizeString.includes('Ti')) && R.size) {
|
||||
R.size = `${ R.size }${ GIBIBYTE }`;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user