From a32bd464b6b4bb39b0330def2904964bd9d64a7b Mon Sep 17 00:00:00 2001 From: ernjvr Date: Tue, 31 Jul 2018 09:33:50 +0200 Subject: [PATCH] ui: show reset SSH key for VM in running state (#2778) In the UI, on the Instances screen, the Quickview popup window and the Details window do not display the 'Reset SSH Key Pair' button for VMs in a running state. They only display when the VM is in a stopped state. This is inconsistent with the 'Reset Password' button behaviour, where it displays in both VM states: running and stopped. This fixes the issue so that the 'Reset SSH Key Pair' button also displays in both VM states. Expected Behaviour: In the UI, on the Instances screen, the Quickview popup window and the Details window must display the 'Reset SSH Key Pair' button in both VM states: running and stopped. When a user clicks on the 'Reset SSH Key Pair' button and a VM is in a running state, it will display a message "Vm xxx should be stopped to do SSH Key reset". Actual Behaviour: In the UI, on the Instances screen, the Quickview popup window and the Details window do not display the 'Reset SSH Key Pair' button for VMs in a running state. It only displays when the VM is in a stopped state. --- ui/scripts/instances.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 84d60033045..4e89cdb1d80 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -3243,6 +3243,7 @@ } allowedActions.push("viewConsole"); + allowedActions.push("resetSSHKeyForVirtualMachine"); } else if (jsonObj.state == 'Stopped') { allowedActions.push("edit"); if (isAdmin())