diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 07f471fcc9f..1bbfad6383f 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -450,6 +450,12 @@ export default { delete params.treeView } + if (['listTemplates', 'listIsos'].includes(this.apiName) && !this.dataView) { + if (['Admin'].includes(this.$store.getters.userInfo.roletype)) { + params.templatefilter = 'all' + } + } + api(this.apiName, params).then(json => { var responseName var objectName @@ -472,6 +478,9 @@ export default { if (!this.items || this.items.length === 0) { this.items = [] } + if (['listTemplates', 'listIsos'].includes(this.apiName) && this.items.length > 1) { + this.items = [...new Map(this.items.map(x => [x.id, x])).values()] + } if (this.treeView) { this.treeData = this.generateTreeData(this.items) } else {