mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
IP Address page - Edit load balancer rule - populate algorithm dropdown with network data instead of hard-coding.
This commit is contained in:
parent
5577e0c9ca
commit
0356b80b3c
@ -427,10 +427,12 @@
|
||||
<div class="row_celltitles" id="private_port"></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 15%;">
|
||||
<select id="algorithm_select" class="select" style="width: 70%;">
|
||||
<select id="algorithm_select" class="select" style="width: 70%;">
|
||||
<!--
|
||||
<option value="roundrobin">roundrobin</option>
|
||||
<option value="leastconn">leastconn</option>
|
||||
<option value="source">source</option>
|
||||
-->
|
||||
</select>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 29%;">
|
||||
|
||||
@ -438,9 +438,12 @@ function ipJsonToLoadBalancerTab() {
|
||||
if(networkObj.service[6].name == "Lb" && networkObj.service[6].capability[0].name == "SupportedLbAlgorithms") {
|
||||
var algorithms = networkObj.service[6].capability[0].value; //e.g. "roundrobin,leastconn,sourceip"
|
||||
var array1 = algorithms.split(",");
|
||||
var $algorithmField = $("#create_load_balancer_row").find("#algorithm_select").empty();
|
||||
for(var i=0; i<array1.length; i++)
|
||||
$algorithmField.append("<option value='"+array1[i]+"'>"+array1[i]+"</option>")
|
||||
var $algorithmField1 = $("#create_load_balancer_row").find("#algorithm_select").empty();
|
||||
var $algorithmField2 = $("#load_balancer_template").find("#row_container_edit").find("#algorithm_select").empty();
|
||||
for(var i=0; i<array1.length; i++) {
|
||||
$algorithmField1.append("<option value='"+array1[i]+"'>"+array1[i]+"</option>");
|
||||
$algorithmField2.append("<option value='"+array1[i]+"'>"+array1[i]+"</option>");
|
||||
}
|
||||
}
|
||||
refreshCreateLoadBalancerRow();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user