davidjumani commented on a change in pull request #587:
URL: https://github.com/apache/cloudstack-primate/pull/587#discussion_r472866294



##########
File path: src/config/section/storage.js
##########
@@ -325,6 +326,16 @@ export default {
       details: ['name', 'id', 'displayname', 'description', 'type', 'current', 
'parentName', 'virtualmachineid', 'account', 'domain', 'created'],
       searchFilters: ['name', 'domainid', 'account', 'tags'],
       actions: [
+        {
+          api: 'createSnapshotFromVMSnapshot',
+          icon: 'camera',
+          label: 'label.action.create.snapshot.from.vmsnapshot',
+          message: 'message.action.create.snapshot.from.vmsnapshot',
+          dataView: true,
+          popup: true,
+          show: (record) => { return record.state === 'Ready' },

Review comment:
       @ravening That might not work since api calls are async and will return 
after the `show` method has completed execution. It would be better to alter 
the API response in the backend to include the vm's hypervisor which could be 
done quite easily without calling further apis.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to