remove disabled for upgrade action (#340)

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee
2025-06-17 13:51:34 +08:00
committed by GitHub
parent bdcea54eeb
commit fb59b396d1
@@ -32,14 +32,11 @@ export default class HciSetting extends HarvesterResource {
const hasUpgradeAccess = !!schema?.collectionMethods.find((x) => ['post'].includes(x.toLowerCase())); const hasUpgradeAccess = !!schema?.collectionMethods.find((x) => ['post'].includes(x.toLowerCase()));
if (this.id === HCI_SETTING.SERVER_VERSION && hasUpgradeAccess) { if (this.id === HCI_SETTING.SERVER_VERSION && hasUpgradeAccess) {
const latestUpgrade = this.$getters['all'](HCI.UPGRADE).find((upgrade) => upgrade.isLatestUpgrade);
out.unshift({ out.unshift({
action: 'goToAirgapUpgrade', action: 'goToAirgapUpgrade',
enabled: true, enabled: true,
icon: 'icon icon-refresh', icon: 'icon icon-refresh',
label: this.t('harvester.upgradePage.upgrade'), label: this.t('harvester.upgradePage.upgrade'),
disabled: !!latestUpgrade && latestUpgrade?.isUpgradeSucceeded
}); });
} }