mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	config: add actions for image, projects, monitor and iam
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
		
							parent
							
								
									7b78f4d427
								
							
						
					
					
						commit
						b903d20d84
					
				| @ -28,6 +28,8 @@ | ||||
|     </a> | ||||
|     <a slot="ipaddress" slot-scope="text, record" href="javascript:;"> | ||||
|       <router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link> | ||||
|         | ||||
|       <a-tag v-if="record.issourcenat">source-nat</a-tag> | ||||
|     </a> | ||||
|     <a slot="vmname" slot-scope="text, record" href="javascript:;"> | ||||
|       <router-link :to="{ path: '/vm/' + record.virtualmachineid }">{{ text }}</router-link> | ||||
|  | ||||
| @ -61,7 +61,7 @@ export default { | ||||
|           label: 'label.action.stop.instance', | ||||
|           dataView: true, | ||||
|           groupAction: true, | ||||
|           args: ['podid', 'clusterid', 'hostid'], | ||||
|           args: ['id'], | ||||
|           show: (record) => { return ['Running'].includes(record.state) } | ||||
|         }, | ||||
|         { | ||||
| @ -69,6 +69,7 @@ export default { | ||||
|           icon: 'reload', | ||||
|           label: 'label.action.reboot.instance', | ||||
|           dataView: true, | ||||
|           args: ['id'], | ||||
|           show: (record) => { return ['Running'].includes(record.state) } | ||||
|         }, | ||||
|         { | ||||
| @ -76,13 +77,14 @@ export default { | ||||
|           icon: 'sync', | ||||
|           label: 'label.reinstall.vm', | ||||
|           dataView: true, | ||||
|           args: ['virtualmachineid'] | ||||
|           args: ['virtualmachineid', 'templateid'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'createVMSnapshot', | ||||
|           icon: 'camera', | ||||
|           label: 'Create VM Snapshot', | ||||
|           dataView: true, | ||||
|           args: ['virtualmachineid', 'name', 'description', 'snapshotmemory', 'quiescevm'], | ||||
|           show: (record) => { return ['Running'].includes(record.state) } | ||||
|         }, | ||||
|         { | ||||
|  | ||||
| @ -17,65 +17,51 @@ export default { | ||||
|           icon: 'plus', | ||||
|           label: 'label.add.user', | ||||
|           listView: true, | ||||
|           args: [ | ||||
|             'username', 'password', 'email', 'firstname', 'lastname', 'timezone', 'domainid', 'account', 'accounttype' | ||||
|           ] | ||||
|           args: ['username', 'password', 'password', 'email', 'firstname', 'lastname', 'timezone', 'account', 'domainid'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateUser', | ||||
|           icon: 'edit', | ||||
|           label: 'label.edit', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', 'username', 'email', 'firstname', 'lastname', 'timezone' | ||||
|           ] | ||||
|           args: ['id', 'username', 'email', 'firstname', 'lastname', 'timezone'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateUser', | ||||
|           icon: 'plus', | ||||
|           label: 'Change password', | ||||
|           icon: 'key', | ||||
|           label: 'Change Password', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', 'currentPassword', 'password' | ||||
|           ] | ||||
|           args: ['id', 'password', 'password'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'registerUserKeys', | ||||
|           icon: 'register', | ||||
|           label: 'Register user keys', | ||||
|           icon: 'file-protect', | ||||
|           label: 'Generate Keys', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id' | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           api: 'disableUser', | ||||
|           icon: 'disabled', | ||||
|           label: 'Disable user', | ||||
|           dataView: true, | ||||
|           hidden: (record) => { return record.resourcestate === 'Disabled' }, | ||||
|           args: [ | ||||
|             'id' | ||||
|           ] | ||||
|           args: ['id'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'enableUser', | ||||
|           icon: 'enabled', | ||||
|           label: 'Enable user', | ||||
|           icon: 'play-circle', | ||||
|           label: 'Enable User', | ||||
|           dataView: true, | ||||
|           hidden: (record) => { return record.resourcestate === 'Enabled' }, | ||||
|           args: [ | ||||
|             'id' | ||||
|           ] | ||||
|           show: (record) => { return record.state === 'disabled' }, | ||||
|           args: ['id'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'disableUser', | ||||
|           icon: 'pause-circle', | ||||
|           label: 'Disable User', | ||||
|           dataView: true, | ||||
|           args: ['id'], | ||||
|           show: (record) => { return record.state === 'enabled' } | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteUser', | ||||
|           icon: 'delete', | ||||
|           label: 'Delete user', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id' | ||||
|           ] | ||||
|           args: ['id'] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
| @ -92,57 +78,47 @@ export default { | ||||
|           icon: 'plus', | ||||
|           label: 'label.add.account', | ||||
|           listView: true, | ||||
|           args: [ | ||||
|             'username', 'email', 'firstname', 'lastname', 'password', 'domainid', 'account', 'roleid', 'timezone', 'networkdomain' | ||||
|           ] | ||||
|           args: ['username', 'password', 'password', 'email', 'firstname', 'lastname', 'domainid', 'account', 'roleid', 'timezone', 'networkdomain'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateResourceLimit', | ||||
|           icon: 'plus', | ||||
|           label: 'Update resource limit', | ||||
|           api: 'updateAccount', | ||||
|           icon: 'edit', | ||||
|           label: 'label.update.account', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'resourceType', 'max', 'domainid', 'account' | ||||
|           ] | ||||
|           args: ['id', 'newname', 'domainid', 'roleid', 'networkdomain', 'details'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateResourceCount', | ||||
|           icon: 'plus', | ||||
|           label: 'Update resource count', | ||||
|           icon: 'sync', | ||||
|           label: 'Update Resource Count', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'domainid', 'account' | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           api: 'disableAccount', | ||||
|           icon: 'plus', | ||||
|           label: 'Disable account', | ||||
|           dataView: true, | ||||
|           hidden: (record) => { return record.resourcestate === 'Disabled' }, | ||||
|           args: [ | ||||
|             'lock', 'domainid', 'account' | ||||
|           ] | ||||
|           args: ['account', 'domainid'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'enableAccount', | ||||
|           icon: 'plus', | ||||
|           label: 'Enable account', | ||||
|           icon: 'play-circle', | ||||
|           label: 'Enable Account', | ||||
|           dataView: true, | ||||
|           hidden: (record) => { return record.resourcestate === 'Enabled' }, | ||||
|           args: [ | ||||
|             'domainid', 'account' | ||||
|           ] | ||||
|           show: (record) => { return record.state === 'disabled' || record.state === 'locked' }, | ||||
|           args: ['id'], | ||||
|           params: { 'lock': 'false' } | ||||
|         }, | ||||
|         { | ||||
|           api: 'disableAccount', | ||||
|           icon: 'plus', | ||||
|           icon: 'pause-circle', | ||||
|           label: 'Disable Account', | ||||
|           dataView: true, | ||||
|           show: (record) => { return record.state === 'enabled' }, | ||||
|           args: ['id'], | ||||
|           params: { 'lock': 'false' } | ||||
|         }, | ||||
|         { | ||||
|           api: 'disableAccount', | ||||
|           icon: 'lock', | ||||
|           label: 'Lock account', | ||||
|           dataView: true, | ||||
|           hidden: (record) => { return record.resourcestate === 'Disabled' }, | ||||
|           args: [ | ||||
|             'lock', 'domainid', 'account' | ||||
|           ] | ||||
|           show: (record) => { return record.state === 'enabled' }, | ||||
|           args: ['id', 'lock'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteAccount', | ||||
| @ -170,39 +146,29 @@ export default { | ||||
|           icon: 'plus', | ||||
|           label: 'label.add.domain', | ||||
|           listView: true, | ||||
|           args: [ | ||||
|             'parentdomainid', 'name', 'networkdomain', 'domainid' | ||||
|           ] | ||||
|           args: ['parentdomainid', 'name', 'networkdomain', 'domainid'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateDomain', | ||||
|           icon: 'edit', | ||||
|           label: 'label.action.edit.domain', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', | ||||
|             'networkdomain' | ||||
|           ] | ||||
|           args: ['id', 'name', 'networkdomain'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateResourceCount', | ||||
|           icon: 'updateresourcecount', | ||||
|           icon: 'sync', | ||||
|           label: 'label.action.update.resource.count', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'domainid' | ||||
|           ] | ||||
|           args: ['domainid'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteDomain', | ||||
|           icon: 'delete', | ||||
|           label: 'label.delete.domain', | ||||
|           dataView: true, | ||||
|           hidden: (record) => { return record.level === 0 }, | ||||
|           args: [ | ||||
|             'id', | ||||
|             'cleanup' | ||||
|           ] | ||||
|           show: (record) => { return record.level !== 0 }, | ||||
|           args: ['id', 'cleanup'] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
| @ -219,27 +185,21 @@ export default { | ||||
|           icon: 'plus', | ||||
|           label: 'Create Role', | ||||
|           listView: true, | ||||
|           args: [ | ||||
|             'name', 'description', 'type', 'tags', 'state', 'status', 'allocationstate' | ||||
|           ] | ||||
|           args: ['name', 'description', 'type'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateRole', | ||||
|           icon: 'edit', | ||||
|           label: 'Edit role', | ||||
|           label: 'Edit Role', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', 'name', 'description' | ||||
|           ] | ||||
|           args: ['id', 'name', 'description', 'type'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteRole', | ||||
|           icon: 'delete', | ||||
|           label: 'label.delete.role', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id' | ||||
|           ] | ||||
|           args: ['id'] | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|  | ||||
| @ -18,34 +18,51 @@ export default { | ||||
|           icon: 'plus', | ||||
|           label: 'Create template', | ||||
|           listView: true, | ||||
|           args: ['displaytext', 'format', 'hypervisor', 'name', 'ostypeid', 'url', 'account', 'bits', 'checksum', 'details', 'directdownload', 'domainid', 'isdynamicallyscalable', 'isextractable', 'isfeatured', 'ispublic', 'isrouting', 'passwordenabled', 'projectid', 'requireshvm', 'sshkeyenabled', 'templatetag', 'zoneid', 'zoneids'] | ||||
|           args: ['url', 'name', 'displaytext', 'directdownload', 'zoneids', 'hypervisor', 'format', 'ostypeid', 'checksum', 'isextractable', 'passwordenabled', 'sshkeyenabled', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'isrouting', 'requireshvm'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateTemplatePermissions', | ||||
|           api: 'getUploadParamsForVolume', | ||||
|           icon: 'upload', | ||||
|           label: 'Upload Local Template', | ||||
|           listView: true, | ||||
|           popup: true, | ||||
|           component: () => import('@/views/storage/UploadLocalTemplate.vue') | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateTemplate', | ||||
|           icon: 'edit', | ||||
|           label: 'label.edit', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', 'ispublic', 'isfeatured', 'isextractable' | ||||
|           ] | ||||
|           args: ['id', 'name', 'displaytext', 'passwordenabled', 'sshkeyenabled', 'ostypeid', 'isdynamicallyscalable', 'isrouting'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'extractTemplate', | ||||
|           icon: 'plus', | ||||
|           label: 'Extract template', | ||||
|           icon: 'cloud-download', | ||||
|           label: 'Download Template', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'mode', 'id', 'zoneid' | ||||
|           ] | ||||
|           args: ['id', 'zoneid', 'mode'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateTemplatePermissions', | ||||
|           icon: 'plus', | ||||
|           icon: 'reconciliation', | ||||
|           label: 'Update template permissions', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', 'op', 'accounts' | ||||
|           ] | ||||
|           args: ['id', 'op', 'accounts', 'projectids'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'copyTemplate', | ||||
|           icon: 'copy', | ||||
|           label: 'Copy Template', | ||||
|           args: ['id', 'sourcezoneid', 'destzoneids'], | ||||
|           dataView: true | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteTemplate', | ||||
|           icon: 'delete', | ||||
|           label: 'Delete Template', | ||||
|           args: ['id', 'zoneid'], | ||||
|           dataView: true, | ||||
|           groupAction: true | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
| @ -63,27 +80,51 @@ export default { | ||||
|           icon: 'plus', | ||||
|           label: 'Register ISO', | ||||
|           listView: true, | ||||
|           args: [ | ||||
|             'name', 'displayText', 'url', 'zoneid', 'isextractable', 'bootable', 'directdownload', 'osTypeId', 'ispublic', 'isfeatured', 'checksum' | ||||
|           ] | ||||
|           args: ['url', 'name', 'displaytext', 'directdownload', 'zoneid', 'bootable', 'ostypeid', 'isextractable', 'ispublic', 'isfeatured'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateIsoPermissions', | ||||
|           api: 'getUploadParamsForIso', | ||||
|           icon: 'upload', | ||||
|           label: 'Upload Local Iso', | ||||
|           listView: true, | ||||
|           popup: true, | ||||
|           component: () => import('@/views/storage/UploadLocalIso.vue') | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateIso', | ||||
|           icon: 'edit', | ||||
|           label: 'label.edit.iso', | ||||
|           label: 'label.edit', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'id', 'ispublic', 'isfeatured', 'isextractable' | ||||
|           ] | ||||
|           args: ['id', 'name', 'displaytext', 'bootable', 'ostypeid', 'isdynamicallyscalable', 'isrouting'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'extractIso', | ||||
|           icon: 'plus', | ||||
|           label: 'label.extract.iso', | ||||
|           icon: 'cloud-download', | ||||
|           label: 'Download ISO', | ||||
|           dataView: true, | ||||
|           args: [ | ||||
|             'mode', 'id' | ||||
|           ] | ||||
|           args: ['id', 'zoneid', 'mode'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'updateIsoPermissions', | ||||
|           icon: 'reconciliation', | ||||
|           label: 'Update ISO Permissions', | ||||
|           dataView: true, | ||||
|           args: ['id', 'op', 'accounts', 'projectids'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'copyIso', | ||||
|           icon: 'copy', | ||||
|           label: 'Copy ISO', | ||||
|           args: ['id', 'sourcezoneid', 'destzoneids'], | ||||
|           dataView: true | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteIso', | ||||
|           icon: 'delete', | ||||
|           label: 'Delete ISO', | ||||
|           args: ['id', 'zoneid'], | ||||
|           dataView: true, | ||||
|           groupAction: true | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|  | ||||
| @ -10,7 +10,23 @@ export default { | ||||
|       icon: 'schedule', | ||||
|       permission: [ 'listEvents' ], | ||||
|       columns: ['username', 'description', 'state', 'level', 'type', 'account', 'domain', 'created'], | ||||
|       details: ['username', 'id', 'description', 'state', 'level', 'type', 'account', 'domain', 'created'] | ||||
|       details: ['username', 'id', 'description', 'state', 'level', 'type', 'account', 'domain', 'created'], | ||||
|       actions: [ | ||||
|         { | ||||
|           api: 'archiveEvents', | ||||
|           icon: 'book', | ||||
|           label: 'Archive Event', | ||||
|           dataView: true, | ||||
|           args: ['ids'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteEvents', | ||||
|           icon: 'delete', | ||||
|           label: 'Delete Event', | ||||
|           dataView: true, | ||||
|           args: ['ids'] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       name: 'alert', | ||||
| @ -18,7 +34,23 @@ export default { | ||||
|       icon: 'flag', | ||||
|       permission: [ 'listAlerts' ], | ||||
|       columns: ['name', 'description', 'type', 'sent'], | ||||
|       details: ['name', 'id', 'type', 'sent', 'description'] | ||||
|       details: ['name', 'id', 'type', 'sent', 'description'], | ||||
|       actions: [ | ||||
|         { | ||||
|           api: 'archiveAlerts', | ||||
|           icon: 'book', | ||||
|           label: 'Archive Alert', | ||||
|           dataView: true, | ||||
|           args: ['ids'] | ||||
|         }, | ||||
|         { | ||||
|           api: 'deleteAlerts', | ||||
|           icon: 'delete', | ||||
|           label: 'Delete Alert', | ||||
|           dataView: true, | ||||
|           args: ['ids'] | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|  | ||||
| @ -114,7 +114,7 @@ export default { | ||||
|       icon: 'environment', | ||||
|       permission: [ 'listPublicIpAddresses' ], | ||||
|       resourceType: 'PublicIpAddress', | ||||
|       columns: ['ipaddress', 'state', 'issourcenat', 'associatednetworkname', 'virtualmachinename', 'allocated', 'account', 'zonename'], | ||||
|       columns: ['ipaddress', 'state', 'associatednetworkname', 'virtualmachinename', 'allocated', 'account', 'zonename'], | ||||
|       details: ['ipaddress', 'id', 'associatednetworkname', 'virtualmachinename', 'networkid', 'issourcenat', 'isstaticnat', 'virtualmachinename', 'vmipaddress', 'vlan', 'allocated', 'account', 'zonename'], | ||||
|       actions: [ | ||||
|         { | ||||
| @ -126,7 +126,7 @@ export default { | ||||
|         }, | ||||
|         { | ||||
|           api: 'enableStaticNat', | ||||
|           icon: 'check-circle', | ||||
|           icon: 'plus-circle', | ||||
|           label: 'Enable Static NAT', | ||||
|           dataView: true, | ||||
|           args: ['ipaddressid', 'virtualmachineid', 'vmguestip'], | ||||
| @ -134,7 +134,7 @@ export default { | ||||
|         }, | ||||
|         { | ||||
|           api: 'disableStaticNat', | ||||
|           icon: 'close-circle', | ||||
|           icon: 'minus-circle', | ||||
|           label: 'Disable Static NAT', | ||||
|           dataView: true, | ||||
|           args: ['ipaddressid'], | ||||
|  | ||||
| @ -5,5 +5,44 @@ export default { | ||||
|   permission: [ 'listProjects' ], | ||||
|   resourceType: 'Project', | ||||
|   columns: ['name', 'state', 'displaytext', 'account', 'domain'], | ||||
|   details: ['name', 'id', 'displaytext', 'projectaccountname', 'vmtotal', 'cputotal', 'memorytotal', 'volumetotal', 'iptotal', 'vpctotal', 'templatetotal', 'primarystoragetotal', 'account', 'domain'] | ||||
|   details: ['name', 'id', 'displaytext', 'projectaccountname', 'vmtotal', 'cputotal', 'memorytotal', 'volumetotal', 'iptotal', 'vpctotal', 'templatetotal', 'primarystoragetotal', 'account', 'domain'], | ||||
|   actions: [ | ||||
|     { | ||||
|       api: 'createProject', | ||||
|       icon: 'plus', | ||||
|       label: 'New Project', | ||||
|       listView: true, | ||||
|       args: ['name', 'displaytext'] | ||||
|     }, | ||||
|     { | ||||
|       api: 'updateProject', | ||||
|       icon: 'edit', | ||||
|       label: 'Edit Project', | ||||
|       dataView: true, | ||||
|       args: ['id', 'displaytext'] | ||||
|     }, | ||||
|     { | ||||
|       api: 'activateProject', | ||||
|       icon: 'play-circle', | ||||
|       label: 'Activate Project', | ||||
|       dataView: true, | ||||
|       args: ['id'], | ||||
|       show: (record) => { return record.state === 'Suspended' } | ||||
|     }, | ||||
|     { | ||||
|       api: 'suspendProject', | ||||
|       icon: 'pause-circle', | ||||
|       label: 'Suspend Project', | ||||
|       dataView: true, | ||||
|       args: ['id'], | ||||
|       show: (record) => { return record.state !== 'Suspended' } | ||||
|     }, | ||||
|     { | ||||
|       api: 'deleteProject', | ||||
|       icon: 'delete', | ||||
|       label: 'Delete Project', | ||||
|       dataView: true, | ||||
|       args: ['id'] | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|  | ||||
| @ -10,7 +10,7 @@ export default { | ||||
|   multiTab: false, // enable to have tab/route history stuff
 | ||||
|   // CloudStack options
 | ||||
|   apiBase: '/client/api', | ||||
|   helpUrl: 'http://docs.cloudstack.apache.org', | ||||
|   helpUrl: 'http://docs.cloudstack.apache.org/en/latest/', | ||||
|   appTitle: 'CloudStack', | ||||
|   // vue-ls options
 | ||||
|   storageOptions: { | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <template> | ||||
|   <div> | ||||
|   TODO: create network form: L2, isolated and shared | ||||
|     TODO: create network form: L2, isolated and shared | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user