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.
This commit is contained in:
ernjvr 2018-07-31 09:33:50 +02:00 committed by Rohit Yadav
parent 71bbbb7718
commit a32bd464b6

View File

@ -3243,6 +3243,7 @@
}
allowedActions.push("viewConsole");
allowedActions.push("resetSSHKeyForVirtualMachine");
} else if (jsonObj.state == 'Stopped') {
allowedActions.push("edit");
if (isAdmin())