mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
add third party storage UI change
Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
@@ -62,6 +62,10 @@ export default class HciStorageClass extends StorageClass {
|
||||
return this.parameters?.encrypted === 'true';
|
||||
}
|
||||
|
||||
get isLonghornV1() {
|
||||
return this.provisioner === LONGHORN_DRIVER && this.longhornVersion === DATA_ENGINE_V1;
|
||||
}
|
||||
|
||||
get isLonghornV2() {
|
||||
return this.provisioner === LONGHORN_DRIVER && this.longhornVersion === DATA_ENGINE_V2;
|
||||
}
|
||||
|
||||
@@ -199,6 +199,10 @@ export default class HciVmImage extends HarvesterResource {
|
||||
return `${ this.metadata.namespace }/${ this.spec.displayName }`;
|
||||
}
|
||||
|
||||
get imageStorageClass() {
|
||||
return this?.metadata?.annotations[HCI_ANNOTATIONS.STORAGE_CLASS] || '';
|
||||
}
|
||||
|
||||
get imageMessage() {
|
||||
if (this.uploadError) {
|
||||
return ucFirst(this.uploadError);
|
||||
@@ -239,8 +243,8 @@ export default class HciVmImage extends HarvesterResource {
|
||||
return formatSi(size, {
|
||||
increment: 1024,
|
||||
maxPrecision: 2,
|
||||
suffix: 'B',
|
||||
firstSuffix: 'B',
|
||||
suffix: 'iB',
|
||||
firstSuffix: 'iB',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -254,8 +258,8 @@ export default class HciVmImage extends HarvesterResource {
|
||||
return formatSi(virtualSize, {
|
||||
increment: 1024,
|
||||
maxPrecision: 2,
|
||||
suffix: 'B',
|
||||
firstSuffix: 'B',
|
||||
suffix: 'iB',
|
||||
firstSuffix: 'iB',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user