mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
bugfix: usability issue fixes (#506)
Fixes #502 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
a2be4abd8b
commit
f00d3f9623
@ -47,6 +47,7 @@
|
||||
:dataSource="detailOptions[newKey]"
|
||||
:placeholder="$t('label.value')"
|
||||
@change="e => onAddInputChange(e, 'newValue')" />
|
||||
<p v-if="error" style="color: red"> {{ $t(error) }} </p>
|
||||
<a-button type="primary" style="width: 25%" icon="plus" @click="addDetail">{{ $t('label.add.setting') }}</a-button>
|
||||
<a-button type="dashed" style="width: 25%" icon="close" @click="showAddDetail = false">{{ $t('label.cancel') }}</a-button>
|
||||
</div>
|
||||
@ -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()
|
||||
},
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user