This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
commit 45a832b1fe9ad52dee029cebc794b7f0483fdc1d Author: Rohit Yadav <[email protected]> AuthorDate: Thu Mar 5 15:22:06 2020 +0530 infra: fix actions to disable/enable pods Fixes #183 Signed-off-by: Rohit Yadav <[email protected]> --- src/config/section/infra/pods.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/config/section/infra/pods.js b/src/config/section/infra/pods.js index 67f1976..c46ad2e 100644 --- a/src/config/section/infra/pods.js +++ b/src/config/section/infra/pods.js @@ -52,7 +52,13 @@ export default { icon: 'play-circle', label: 'label.action.enable.pod', dataView: true, - show: (record) => { return record.allocationstate === 'Disabled' } + show: (record) => { return record.allocationstate === 'Disabled' }, + args: ['allocationstate'], + mapping: { + allocationstate: { + value: (record) => 'Enabled' + } + } }, { api: 'updatePod', @@ -60,7 +66,12 @@ export default { label: 'label.action.disable.pod', dataView: true, show: (record) => { return record.allocationstate === 'Enabled' }, - defaultArgs: { allocationstate: 'Disabled' } + args: ['allocationstate'], + mapping: { + allocationstate: { + value: (record) => 'Disabled' + } + } }, { api: 'deletePod',
