feat: display message from MIG status and change the state to match the case (#879)

Signed-off-by: Jack Yu <jack.yu@suse.com>
This commit is contained in:
Jack Yu 2026-05-26 13:44:27 +08:00 committed by GitHub
parent 89e1484884
commit a27e38fc81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 3 deletions

View File

@ -1914,6 +1914,8 @@ harvester:
migconfiguration: migconfiguration:
label: vGPU MIG Configurations label: vGPU MIG Configurations
status:
outOfSync: Out of Sync
infoBanner: To configure the MIG configuration, please disable it first and re-enable after editing the configuration. infoBanner: To configure the MIG configuration, please disable it first and re-enable after editing the configuration.
profileSpec: Profile Specs profileSpec: Profile Specs
profileStatus: Profile Status profileStatus: Profile Status

View File

@ -63,13 +63,27 @@ export default class MIGCONFIGURATION extends HarvesterResource {
} }
get stateDisplay() { get stateDisplay() {
if (this.configStatus === 'out-of-sync') {
return this.t('harvester.migconfiguration.status.outOfSync');
}
return this.actualState; return this.actualState;
} }
get stateColor() { get stateDescription() {
const state = this.actualState; if (this.status?.message) {
return this.status.message;
}
return colorForState(state); return super.stateDescription;
}
get stateColor() {
if (this.configStatus === 'out-of-sync') {
return 'text-warning';
}
return colorForState(this.actualState);
} }
get isEnabled() { get isEnabled() {