winterhazel commented on code in PR #13647:
URL: https://github.com/apache/cloudstack/pull/13647#discussion_r3626413302


##########
ui/src/components/view/ListView.vue:
##########
@@ -655,8 +655,7 @@
       <template v-if="column.key === 'usageType'">

Review Comment:
   @Chinmay048 please remove the unrelated changes from this file.



##########
ui/src/components/view/ActionButton.vue:
##########
@@ -177,6 +177,15 @@ export default {
   methods: {
     execAction (action) {
       action.resource = this.resource
+      const record = this.resource || this.item

Review Comment:
   Instead of changing this file, can we just hide the 
`disableOutOfBandManagementForHost` button in `hosts.js` when host HA is 
enabled?



##########
ui/src/config/section/infra/hosts.js:
##########
@@ -255,7 +255,12 @@ export default {
       message: 'label.ha.configure',
       docHelp: 'adminguide/reliability.html#ha-for-hosts',
       dataView: true,
-      show: (record) => { return ['KVM', 
'Simulator'].includes(record.hypervisor) },
+      show: (record) => {
+        if (record.hypervisor === 'KVM') {
+          return Boolean(record?.outofbandmanagement?.enabled)
+        }
+        return record.hypervisor === 'Simulator'
+      },

Review Comment:
   ```suggestion
         show: (record) => { return record?.outofbandmanagement?.enabled && 
['KVM', 'Simulator'].includes(record.hypervisor) },
   ```



##########
ui/src/config/section/infra/hosts.js:
##########
@@ -274,7 +279,13 @@ export default {
       docHelp: 'adminguide/reliability.html#ha-for-hosts',
       dataView: true,
       show: (record) => {
-        return record.hypervisor !== 'External' && !(record?.hostha?.haenable 
=== true)
+        if (record.hypervisor === 'External' || record?.hostha?.haenable === 
true) {
+          return false
+        }
+        if (record.hypervisor === 'KVM') {
+          return Boolean(record?.outofbandmanagement?.enabled)
+        }
+        return true

Review Comment:
   ```suggestion
           return record.hypervisor !== 'External' && 
record?.outofbandmanagement?.enabled === true && !(record?.hostha?.haenable === 
true)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to