mirror of https://github.com/rancher/dashboard.git
Merge pull request #3469 from nwmac/fix-duplicate-projects
Create namespace: Fix duplicate projects in dropdown
This commit is contained in:
commit
31990aec69
|
|
@ -51,7 +51,11 @@ export default {
|
|||
},
|
||||
|
||||
projectOpts() {
|
||||
const projects = this.$store.getters['management/all'](MANAGEMENT.PROJECT);
|
||||
const clusterId = this.$store.getters['currentCluster'].id;
|
||||
let projects = this.$store.getters['management/all'](MANAGEMENT.PROJECT);
|
||||
|
||||
// Filter out projects not for the current cluster
|
||||
projects = projects.filter(c => c.spec?.clusterName === clusterId);
|
||||
|
||||
const out = projects.map((project) => {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue