You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/06/03 08:36:17 UTC

[GitHub] [cloudstack-primate] rhtyd commented on a change in pull request #330: Add unmanage VM button

rhtyd commented on a change in pull request #330:
URL: https://github.com/apache/cloudstack-primate/pull/330#discussion_r434401407



##########
File path: src/config/section/compute.js
##########
@@ -319,6 +319,20 @@ export default {
           dataView: true,
           show: (record, store) => { return ['Destroyed'].includes(record.state) && store.features.allowuserexpungerecovervm }
         },
+        {
+          api: 'unmanageVirtualMachine',
+          icon: 'disconnect',
+          label: 'label.action.unmanage.virtualmachine',
+          args: ['id'],
+          dataView: true,
+          groupAction: true,
+          show: (record) => { return ['Running', 'Stopped'].includes(record.state) && record.hypervisor === 'VMware' },
+          mapping: {
+            id: {
+              value: (record, params) => { return record.id }

Review comment:
       we use mapping when the key is not the same as specified in the `args`, so this will still work without adding the mapping here




----------------------------------------------------------------
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:
users@infra.apache.org