From f4d6750200b3e37513d10fd70d0fc6ad5b8e39aa Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 8 Feb 2021 18:51:39 +0530 Subject: [PATCH] ui: fix tags selection for add disk offering 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 1cd1dd84b52f..267c5eff87f8 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(() => {