You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2024/01/16 01:21:09 UTC
(cloudstack) branch nsx-k8s-network-list-dedup created (now 818ef2b2df9)
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a change to branch nsx-k8s-network-list-dedup
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
at 818ef2b2df9 NSX,UI: Deduplicate network list when creating kubernetes clusters
This branch includes the following new commits:
new 818ef2b2df9 NSX,UI: Deduplicate network list when creating kubernetes clusters
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(cloudstack) 01/01: NSX,UI: Deduplicate network list when creating kubernetes clusters
Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch nsx-k8s-network-list-dedup
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 818ef2b2df96e92fb98dfd440d48f71c3c310571
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Mon Jan 15 20:21:01 2024 -0500
NSX,UI: Deduplicate network list when creating kubernetes clusters
---
ui/src/views/compute/CreateKubernetesCluster.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/src/views/compute/CreateKubernetesCluster.vue b/ui/src/views/compute/CreateKubernetesCluster.vue
index 1240531ddd7..eb1c6c0d2b9 100644
--- a/ui/src/views/compute/CreateKubernetesCluster.vue
+++ b/ui/src/views/compute/CreateKubernetesCluster.vue
@@ -421,7 +421,8 @@ export default {
var listNetworks = json.listnetworksresponse.network
if (this.arrayHasItems(listNetworks)) {
listNetworks = listNetworks.filter(n => n.type !== 'L2')
- this.networks = this.networks.concat(listNetworks)
+ var ids = new Set(this.networks.map(n => n.id))
+ this.networks = [...this.networks, ...listNetworks.filter(n => !ids.has(n.id))]
}
}).finally(() => {
this.networkLoading = false