UploadLoadBalancer API has been changed to disallow private port to be updated. Here is corresponding UI change.

This commit is contained in:
Jessica Wang 2010-12-10 20:04:39 -08:00
parent 4ea8424332
commit b9491fc439
2 changed files with 6 additions and 10 deletions

View File

@ -388,11 +388,10 @@
<div id="name_errormsg" class="errormsg" style="display: none;">Error msg will appear here</div>
</div>
<div class="grid_row_cell" style="width: 15%;">
<div class="row_celltitles" id="public_port">8080</div>
<div class="row_celltitles" id="public_port"></div>
</div>
<div class="grid_row_cell" style="width: 15%;">
<input id="private_port" class="text" style="width: 70%;" type="text" />
<div id="private_port_errormsg" class="errormsg" style="display: none;">Error msg will appear here</div>
<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%;">

View File

@ -1277,7 +1277,7 @@ function loadBalancerJsonToTemplate(jsonObj, $template) {
$template.find("#row_container_edit #public_port").text(fromdb(jsonObj.publicport));
$template.find("#row_container #private_port").text(fromdb(jsonObj.privateport));
$template.find("#row_container_edit #private_port").val(fromdb(jsonObj.privateport));
$template.find("#row_container_edit #private_port").text(fromdb(jsonObj.privateport));
$template.find("#row_container #algorithm").text(fromdb(jsonObj.algorithm));
$template.find("#row_container_edit #algorithm").val(fromdb(jsonObj.algorithm));
@ -1382,8 +1382,7 @@ function loadBalancerJsonToTemplate(jsonObj, $template) {
$template.find("#save_link").unbind("click").bind("click", function(event){
var isValid = true;
isValid &= validateString("Name", $rowContainerEdit.find("#name"), $rowContainerEdit.find("#name_errormsg"));
isValid &= validateNumber("Private Port", $rowContainerEdit.find("#private_port"), $rowContainerEdit.find("#private_port_errormsg"), 1, 65535);
isValid &= validateString("Name", $rowContainerEdit.find("#name"), $rowContainerEdit.find("#name_errormsg"));
if (!isValid)
return;
@ -1391,14 +1390,12 @@ function loadBalancerJsonToTemplate(jsonObj, $template) {
$spinningWheel.find("#description").text("Saving load balancer rule....");
$spinningWheel.show();
var name = $rowContainerEdit.find("#name").val();
var privatePort = $rowContainerEdit.find("#private_port").val();
var name = $rowContainerEdit.find("#name").val();
var algorithm = $rowContainerEdit.find("#algorithm_select").val();
var array1 = [];
array1.push("&id=" + loadBalancerId);
array1.push("&name=" + name);
array1.push("&privateport=" + privatePort);
array1.push("&name=" + name);
array1.push("&algorithm=" + algorithm);
$.ajax({