diff --git a/ui/src/components/view/DetailSettings.vue b/ui/src/components/view/DetailSettings.vue
index bb3945ae977..1e9fc8ca899 100644
--- a/ui/src/components/view/DetailSettings.vue
+++ b/ui/src/components/view/DetailSettings.vue
@@ -47,6 +47,7 @@
:dataSource="detailOptions[newKey]"
:placeholder="$t('label.value')"
@change="e => onAddInputChange(e, 'newValue')" />
+
{{ $t(error) }}
{{ $t('label.add.setting') }}
{{ $t('label.cancel') }}
@@ -118,7 +119,8 @@ export default {
newKey: '',
newValue: '',
loading: false,
- resourceType: 'UserVm'
+ resourceType: 'UserVm',
+ error: false
}
},
watch: {
@@ -217,6 +219,11 @@ export default {
})
},
addDetail () {
+ if (this.newKey === '' || this.newValue === '') {
+ this.error = 'Must provide a valid key and value for setting'
+ return
+ }
+ this.error = false
this.details.push({ name: this.newKey, value: this.newValue })
this.runApi()
},
diff --git a/ui/src/config/section/image.js b/ui/src/config/section/image.js
index 7703d78fb97..cdf83ca6b3a 100644
--- a/ui/src/config/section/image.js
+++ b/ui/src/config/section/image.js
@@ -42,7 +42,7 @@ export default {
}
return fields
},
- details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created'],
+ details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'sshkeyenabled', 'directdownload', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created'],
searchFilters: ['name', 'zoneid', 'tags'],
related: [{
name: 'vm',
diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index c2815a6c50a..33d532b217a 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -500,7 +500,7 @@ export default {
}
if (['listTemplates', 'listIsos', 'listVirtualMachinesMetrics'].includes(this.apiName) && !this.dataView) {
- if (['Admin'].includes(this.$store.getters.userInfo.roletype) || this.apiName === 'listVirtualMachinesMetrics') {
+ if (['Admin', 'DomainAdmin'].includes(this.$store.getters.userInfo.roletype) || this.apiName === 'listVirtualMachinesMetrics') {
this.filters = ['all', ...this.filters]
if (this.selectedFilter === '') {
this.selectedFilter = 'all'