From 42b0af6c32bbcb9bfc403eb388c319e54a6de072 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Thu, 5 Mar 2020 15:22:06 +0530 Subject: [PATCH] infra: fix actions to disable/enable pods Fixes #183 Signed-off-by: Rohit Yadav --- ui/src/config/section/infra/pods.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ui/src/config/section/infra/pods.js b/ui/src/config/section/infra/pods.js index 67f1976b64a..c46ad2e672b 100644 --- a/ui/src/config/section/infra/pods.js +++ b/ui/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',