mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-06-13 13:32:20 +00:00
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:
parent
89e1484884
commit
a27e38fc81
@ -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
|
||||||
|
|||||||
@ -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() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user