mirror of https://github.com/apache/cloudstack.git
ui: fix tags selection for add disk offering (#4665)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
f5a44b3502
commit
0d04bd621f
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue