From 981310c2fe7e4e2cd87b44097a79938e56d9a744 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Tue, 30 Apr 2024 09:20:41 -0400 Subject: [PATCH] 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 --- ui/src/views/AutogenView.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index be6c0f24cd1..6fa8a3e0848 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -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()] }