autogenview: fix showunique case for templates/isos and filter

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-07-15 15:38:11 +05:30
parent f05c79f9b5
commit c08e954717
1 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@
<a-select
v-if="!dataView && $route.meta.filters && $route.meta.filters.length > 0"
:placeholder="$t('label.filterby')"
:value="$route.query.filter"
:value="$route.query.filter || 'self'"
style="min-width: 100px; margin-left: 10px"
@change="changeFilter">
<a-icon slot="suffixIcon" type="filter" />
@ -534,6 +534,10 @@ export default {
})
}
if (['listTemplates', 'listIsos'].includes(this.apiName) && this.dataView) {
delete params.showunique
}
this.loading = true
if (this.$route.params && this.$route.params.id) {
params.id = this.$route.params.id
@ -571,10 +575,6 @@ export default {
this.items = []
}
if (['listTemplates', 'listIsos'].includes(this.apiName) && this.items.length > 1) {
this.items = [...new Map(this.items.map(x => [x.id, x])).values()]
}
for (let idx = 0; idx < this.items.length; idx++) {
this.items[idx].key = idx
for (const key in customRender) {