mirror of https://github.com/apache/cloudstack.git
VMs in Error, Destroyed, or Creating state are no longer selectable as a VM during the application of a port forwarding rule in the UI.
This commit is contained in:
parent
9b191a8b4b
commit
696f3f5fcb
|
|
@ -384,8 +384,10 @@ function showNetworkingTab(p_domainId, p_account) {
|
|||
var vmSelect = createPortForwardingRow.find("#vm").empty();
|
||||
if (instances != null && instances.length > 0) {
|
||||
for (var i = 0; i < instances.length; i++) {
|
||||
var html = $("<option value='" + instances[i].id + "'>" + getVmName(instances[i].name, instances[i].displayname) + "</option>");
|
||||
vmSelect.append(html);
|
||||
if (instances[i].state != 'Destroyed' && instances[i].state != 'Error' && instances[i].state != 'Creating') {
|
||||
var html = $("<option value='" + instances[i].id + "'>" + getVmName(instances[i].name, instances[i].displayname) + "</option>");
|
||||
vmSelect.append(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -418,9 +420,11 @@ function showNetworkingTab(p_domainId, p_account) {
|
|||
var instances = json.listvirtualmachinesresponse.virtualmachine;
|
||||
var vmSelect = template.find("#row_container_edit #vm").empty();
|
||||
if (instances != null && instances.length > 0) {
|
||||
for (var i = 0; i < instances.length; i++) {
|
||||
var html = $("<option value='" + instances[i].id + "'>" + getVmName(instances[i].name, instances[i].displayname) + "</option>");
|
||||
vmSelect.append(html);
|
||||
for (var i = 0; i < instances.length; i++) {
|
||||
if (instances[i].state != 'Destroyed' && instances[i].state != 'Error' && instances[i].state != 'Creating') {
|
||||
var html = $("<option value='" + instances[i].id + "'>" + getVmName(instances[i].name, instances[i].displayname) + "</option>");
|
||||
vmSelect.append(html);
|
||||
}
|
||||
}
|
||||
vmSelect.val(virtualMachineId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue