From a27e38fc8121df3fd04bdde3b8f0f10ac919e995 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Tue, 26 May 2026 13:44:27 +0800 Subject: [PATCH] feat: display message from MIG status and change the state to match the case (#879) Signed-off-by: Jack Yu --- pkg/harvester/l10n/en-us.yaml | 2 ++ ...evices.harvesterhci.io.migconfiguration.js | 20 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index 04fe4d30..91c91d9b 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -1914,6 +1914,8 @@ harvester: migconfiguration: 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. profileSpec: Profile Specs profileStatus: Profile Status diff --git a/pkg/harvester/models/devices.harvesterhci.io.migconfiguration.js b/pkg/harvester/models/devices.harvesterhci.io.migconfiguration.js index f0119e6a..ce0b2ecc 100644 --- a/pkg/harvester/models/devices.harvesterhci.io.migconfiguration.js +++ b/pkg/harvester/models/devices.harvesterhci.io.migconfiguration.js @@ -63,13 +63,27 @@ export default class MIGCONFIGURATION extends HarvesterResource { } get stateDisplay() { + if (this.configStatus === 'out-of-sync') { + return this.t('harvester.migconfiguration.status.outOfSync'); + } + return this.actualState; } - get stateColor() { - const state = this.actualState; + get stateDescription() { + 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() {