mirror of https://github.com/rancher/dashboard.git
33 lines
737 B
JavaScript
33 lines
737 B
JavaScript
import { MANAGEMENT } from '@/config/types';
|
|
|
|
export default {
|
|
|
|
roleTemplate() {
|
|
return this.$rootGetters['management/byId'](MANAGEMENT.ROLE_TEMPLATE, this.roleTemplateName);
|
|
},
|
|
|
|
cluster() {
|
|
return this.$rootGetters['management/byId'](MANAGEMENT.CLUSTER, this.clusterName);
|
|
},
|
|
|
|
clusterDisplayName() {
|
|
return this.cluster ? this.cluster.nameDisplay : this.clusterName;
|
|
},
|
|
|
|
clusterDetailLocation() {
|
|
if (this.cluster) {
|
|
return this.cluster.detailLocation;
|
|
}
|
|
|
|
const name = `c-cluster-product-resource-id`;
|
|
|
|
const params = {
|
|
resource: MANAGEMENT.CLUSTER_ROLE_TEMPLATE_BINDING,
|
|
id: this.clusterName,
|
|
product: 'explorer',
|
|
};
|
|
|
|
return { name, params };
|
|
},
|
|
};
|