mirror of https://github.com/rancher/dashboard.git
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:
parent
f93af46513
commit
df6ab9644c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue