mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
project restructuring and initial refactoring
This commit is contained in:
1 parent
5af12bdbbd
commit
aa0eca2dc4
807 files changed
+11848
-22947
No files matched your search
@@ -0,0 +1,16 @@
|
||||
export default {
|
||||
computed: {
|
||||
clusters: function() {
|
||||
return this.$store.getters.clusters
|
||||
},
|
||||
newContexts: function() {
|
||||
const seenContexts = this.seenContexts || this.$store.getters.seenContexts
|
||||
const contextNamesFromKubeconfig = this.availableContexts.map(item => item.currentContext)
|
||||
return contextNamesFromKubeconfig.filter((item) => seenContexts.indexOf(item) < 0)
|
||||
},
|
||||
availableContexts: function() {
|
||||
// read available kubeconfigs from store on filter out configs already found in added clusters
|
||||
return this.$store.getters.availableKubeContexts.filter(item => !this.clusters.find((cluster) => cluster.contextName == item.currentContext));
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user