mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
add harvester verison column
This commit is contained in:
@@ -5,12 +5,14 @@ import { SETTING } from '@shell/config/settings';
|
||||
import { colorForState, stateDisplay, STATES_ENUM } from '@shell/plugins/dashboard-store/resource-class';
|
||||
|
||||
export default class HciCluster extends ProvCluster {
|
||||
_isSupportedHarvester = undefined;
|
||||
|
||||
get isSupportedHarvester() {
|
||||
return this._isSupportedHarvester === undefined ? true : this._isSupportedHarvester;
|
||||
}
|
||||
|
||||
get harvesterVersion() {
|
||||
return this._harvesterVersion;
|
||||
}
|
||||
|
||||
get stateObj() {
|
||||
if (!this.isSupportedHarvester) {
|
||||
return { error: true, message: this.t('harvesterManager.cluster.supportMessage') };
|
||||
@@ -212,8 +214,10 @@ export default class HciCluster extends ProvCluster {
|
||||
try {
|
||||
const setting = await this.$dispatch('request', { url: `${ url }/${ HCI.SETTING }s/server-version` });
|
||||
|
||||
this._harvesterVersion = setting?.value;
|
||||
this._isSupportedHarvester = this.$rootGetters['harvester-common/getFeatureEnabled']('supportHarvesterClusterVersion', setting?.value);
|
||||
} catch (error) {
|
||||
console.error('unable to get harvester version from settings/server-version', error); // eslint-disable-line no-console
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user