config: HA and OOBM actions for host (#133)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Pearl Dsilva 2020-01-29 13:12:53 +05:30 committed by Rohit Yadav
parent b6e4536dc6
commit 2e50c068c7
1 changed files with 11 additions and 12 deletions

View File

@ -127,8 +127,8 @@ export default {
label: 'label.outofbandmanagement.enable',
dataView: true,
show: (record) => {
return !record.resourcedetails || !record.resourcedetails.outOfBandManagementEnabled ||
record.resourcedetails.outOfBandManagementEnabled === 'false'
return !record.outofbandmanagement || !record.outofbandmanagement.enabled ||
record.outofbandmanagement.enabled === false
},
args: ['hostid'],
mapping: {
@ -143,8 +143,8 @@ export default {
label: 'label.outofbandmanagement.disable',
dataView: true,
show: (record) => {
return record.resourcedetails && record.resourcedetails.outOfBandManagementEnabled &&
record.resourcedetails.outOfBandManagementEnabled === 'true'
return record.outofbandmanagement && record.outofbandmanagement.enabled &&
record.outofbandmanagement.enabled === true
},
args: ['hostid'],
mapping: {
@ -159,8 +159,8 @@ export default {
label: 'label.outofbandmanagement.action.issue',
dataView: true,
show: (record) => {
return record.resourcedetails && record.resourcedetails.outOfBandManagementEnabled &&
record.resourcedetails.outOfBandManagementEnabled === 'true'
return record.outofbandmanagement && record.outofbandmanagement.enabled &&
record.outofbandmanagement.enabled === true
},
args: ['hostid', 'action'],
mapping: {
@ -175,8 +175,8 @@ export default {
label: 'label.outofbandmanagement.changepassword',
dataView: true,
show: (record) => {
return record.resourcedetails && record.resourcedetails.outOfBandManagementEnabled &&
record.resourcedetails.outOfBandManagementEnabled === 'true'
return record.outofbandmanagement && record.outofbandmanagement.enabled &&
record.outofbandmanagement.enabled === true
},
args: ['hostid', 'password'],
mapping: {
@ -207,8 +207,7 @@ export default {
label: 'label.ha.enable',
dataView: true,
show: (record) => {
return !record.resourcedetails || !record.resourcedetails.resourceHAEnabled ||
record.resourcedetails.resourceHAEnabled === 'false'
return !record.hostha || !record.hostha.haenable || record.hostha.haenable === false
},
args: ['hostid'],
mapping: {
@ -223,8 +222,8 @@ export default {
label: 'label.ha.disable',
dataView: true,
show: (record) => {
return record.resourcedetails && record.resourcedetails.resourceHAEnabled &&
record.resourcedetails.resourceHAEnabled === 'true'
return record.hostha && record.hostha.haenable &&
record.hostha.haenable === true
},
args: ['hostid'],
mapping: {