UI: Fix the Add / Remove Vmware DC button on Zone detail view (#8781)

* UI: Fix the Add / Remove Vmware DC button on Zone detail view

* hide the button for non vmware envs
This commit is contained in:
Pearl Dsilva 2024-04-30 09:20:41 -04:00 committed by GitHub
parent 027149487b
commit 981310c2fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -989,6 +989,12 @@ export default {
}
this.itemCount = apiItemCount
if (this.dataView && this.$route.path.includes('/zone/') && 'listVmwareDcs' in this.$store.getters.apis) {
api('listVmwareDcs', { zoneid: this.items[0].id }).then(response => {
this.items[0].vmwaredc = response.listvmwaredcsresponse.VMwareDC
})
}
if (['listTemplates', 'listIsos'].includes(this.apiName) && this.items.length > 1) {
this.items = [...new Map(this.items.map(x => [x.id, x])).values()]
}