infra: fix actions to disable/enable pods

Fixes #183

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-03-05 15:22:06 +05:30
parent 34f6a7c25b
commit 42b0af6c32
1 changed files with 13 additions and 2 deletions

View File

@ -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',