mirror of https://github.com/apache/cloudstack.git
NSX,UI: Deduplicate network list when creating kubernetes clusters
This commit is contained in:
parent
2b05dd93a1
commit
818ef2b2df
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue