Hide Mgmt Cluster type in Cluster Management Advanced group (#5840)

* Hide Mgmt Cluser type in Cluster Management Advanced group

* Update management.cattle.io.cluster.js
This commit is contained in:
Neil MacDougall 2022-05-17 12:07:19 +01:00 committed by GitHub
parent f93af46513
commit df6ab9644c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View File

@ -998,7 +998,7 @@ cluster:
note: '<b>Important:</b> Configure the vSphere Cloud Provider and Storage Provider options in the Add-On Config tab.'
harvester:
label: Harvester
copyConfig: Copy Config to Clipboard
copyConfig: Copy KubeConfig to Clipboard
custom:
nodeRole:
label: Node Role

View File

@ -2,7 +2,6 @@ import { AGE, NAME as NAME_COL, STATE } from '@shell/config/table-headers';
import {
CAPI,
CATALOG,
MANAGEMENT,
NORMAN,
HCI
} from '@shell/config/types';
@ -115,7 +114,6 @@ export function init(store) {
configureType(CATALOG.CLUSTER_REPO, { showListMasthead: false });
basicType([
MANAGEMENT.CLUSTER,
CAPI.MACHINE_DEPLOYMENT,
CAPI.MACHINE_SET,
CAPI.MACHINE,

View File

@ -62,7 +62,7 @@ export default class MgmtCluster extends HybridModel {
action: 'copyKubeConfig',
label: this.t('cluster.copyConfig'),
bulkable: false,
enabled: true,
enabled: this.$rootGetters['isRancher'] && this.hasAction('generateKubeconfig'),
icon: 'icon icon-copy',
});

View File

@ -75,6 +75,12 @@ export default class ProvCluster extends SteveModel {
icon: 'icon icon-download',
bulkable: true,
enabled: this.mgmt?.hasAction('generateKubeconfig') && ready,
}, {
action: 'copyKubeConfig',
label: this.t('cluster.copyConfig'),
bulkable: false,
enabled: this.mgmt?.hasAction('generateKubeconfig') && ready,
icon: 'icon icon-copy',
}, {
action: 'snapshotAction',
label: this.$rootGetters['i18n/t']('nav.takeSnapshot'),
@ -406,6 +412,10 @@ export default class ProvCluster extends SteveModel {
return this.mgmt?.generateKubeConfig();
}
copyKubeConfig() {
return this.mgmt?.copyKubeConfig();
}
downloadKubeConfig() {
return this.mgmt?.downloadKubeConfig();
}