mirror of https://github.com/apache/cloudstack.git
Allow changing template type by admin (#838)
* Allow changing template type by admin Currently the template has following types: 'BUILTIN', 'USER', 'SYSTEM', 'ROUTING', 'PERHOST' Provide ui support for admins os that they can change the template type * add extr afields * remove perhost Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com> Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
76f87ff179
commit
26566fa9d4
|
|
@ -43,7 +43,15 @@ export default {
|
|||
}
|
||||
return fields
|
||||
},
|
||||
details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
|
||||
details: () => {
|
||||
var fields = ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled',
|
||||
'directdownload', 'deployasis', 'ispublic', 'isfeatured', 'isextractable', 'isdynamicallyscalable', 'crosszones', 'type',
|
||||
'account', 'domain', 'created']
|
||||
if (['Admin'].includes(store.getters.userInfo.roletype)) {
|
||||
fields.push('templatetype', 'url')
|
||||
}
|
||||
return fields
|
||||
},
|
||||
searchFilters: ['name', 'zoneid', 'tags'],
|
||||
related: [{
|
||||
name: 'vm',
|
||||
|
|
@ -94,9 +102,14 @@ export default {
|
|||
args: (record, store) => {
|
||||
var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']
|
||||
if (['Admin'].includes(store.userInfo.roletype)) {
|
||||
fields.push('isrouting')
|
||||
fields.push('isrouting', 'templatetype')
|
||||
}
|
||||
return fields
|
||||
},
|
||||
mapping: {
|
||||
templatetype: {
|
||||
options: ['BUILTIN', 'USER', 'SYSTEM', 'ROUTING']
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2080,7 +2080,7 @@
|
|||
"label.templates": "Templates",
|
||||
"label.templatesubject": "Subject",
|
||||
"label.templatetotal": "Template",
|
||||
"label.templatetype": "Email Template",
|
||||
"label.templatetype": "Template Type",
|
||||
"label.tftp.dir": "TFTP Directory",
|
||||
"label.tftpdir": "Tftp root directory",
|
||||
"label.theme.default": "Default Theme",
|
||||
|
|
|
|||
Loading…
Reference in New Issue