ui: fix tags selection for add disk offering (#4665)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2021-02-12 12:50:32 +05:30 committed by GitHub
parent f5a44b3502
commit 0d04bd621f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 9 deletions

View File

@ -334,8 +334,8 @@
:loading="storageTagLoading"
:placeholder="this.$t('label.tags')"
v-if="this.isAdmin()">
<a-select-option v-for="(opt) in this.storageTags" :key="opt.name">
{{ opt.name || opt.description }}
<a-select-option v-for="(opt) in this.storageTags" :key="opt">
{{ opt }}
</a-select-option>
</a-select>
</a-form-item>
@ -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(() => {