From 0d04bd621fbf8d2358d3e504587d0ae4d084136d Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 12 Feb 2021 12:50:32 +0530 Subject: [PATCH] ui: fix tags selection for add disk offering (#4665) Signed-off-by: Abhishek Kumar --- ui/src/views/offering/AddDiskOffering.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ui/src/views/offering/AddDiskOffering.vue b/ui/src/views/offering/AddDiskOffering.vue index 1cd1dd84b52..267c5eff87f 100644 --- a/ui/src/views/offering/AddDiskOffering.vue +++ b/ui/src/views/offering/AddDiskOffering.vue @@ -334,8 +334,8 @@ :loading="storageTagLoading" :placeholder="this.$t('label.tags')" v-if="this.isAdmin()"> - - {{ opt.name || opt.description }} + + {{ opt }} @@ -530,13 +530,10 @@ export default { params.listAll = true this.storageTagLoading = true api('listStorageTags', params).then(json => { - const tags = json.liststoragetagsresponse.storagetag - if (this.arrayHasItems(tags)) { - for (var i in tags) { - var tag = {} - tag.id = tags[i].name - tag.name = tags[i].name - this.storageTags.push(tag) + const tags = json.liststoragetagsresponse.storagetag || [] + for (const tag of tags) { + if (!this.storageTags.includes(tag.name)) { + this.storageTags.push(tag.name) } } }).finally(() => {