mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
fix unable to add/delete new hard disk
Signed-off-by: andy.lee <andy.lee@suse.com> (cherry picked from commit cbb66175f6dda835f557dd098103fc1d78b53468)
This commit is contained in:
parent
e79f493cb6
commit
18bfbbaac1
@ -58,7 +58,7 @@ export default {
|
|||||||
const out = [];
|
const out = [];
|
||||||
|
|
||||||
blockDevices.map((b) => {
|
blockDevices.map((b) => {
|
||||||
if (b.metadata.state.error) {
|
if (b?.metadata?.state?.error) {
|
||||||
out.push(b.metadata.state.message);
|
out.push(b.metadata.state.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -64,4 +64,10 @@ export default class HciBlockDevice extends HarvesterResource {
|
|||||||
// spec.fileSystem.provisioned is deprecated
|
// spec.fileSystem.provisioned is deprecated
|
||||||
return this.spec?.fileSystem?.provisioned || this.spec?.provision;
|
return this.spec?.fileSystem?.provisioned || this.spec?.provision;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Overwrite cleanForSave() in shell/plugins/steve/steve-class.js as it deleted status object in harvesterhci.io.blockdevice CRD
|
||||||
|
// but /v1/harvester/harvesterhci.io.blockdevices/longhorn-system/{id} API requires status object
|
||||||
|
cleanForSave(data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user