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


The following commit(s) were added to refs/heads/master by this push:
     new e9a0704  config: HA and OOBM actions for host (#133)
e9a0704 is described below

commit e9a0704709459b710cded7b3fbfed7db1538044c
Author: Pearl Dsilva <pearl1...@gmail.com>
AuthorDate: Wed Jan 29 13:12:53 2020 +0530

    config: HA and OOBM actions for host (#133)
---
 src/config/section/infra/hosts.js | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/config/section/infra/hosts.js 
b/src/config/section/infra/hosts.js
index 08c3cd6..36e9b76 100644
--- a/src/config/section/infra/hosts.js
+++ b/src/config/section/infra/hosts.js
@@ -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: {

Reply via email to