project restructuring and initial refactoring

This commit is contained in:
Roman committed 2020-06-09 15:14:40 +03:00
1 parent 5af12bdbbd
commit aa0eca2dc4
807 files changed
+11848 -22947

No files matched your search

+16
View File
@@ -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));
},
}
}