new UI - load balancer page - fix a bug that new template was attched to wrong grid.

This commit is contained in:
Jessica Wang 2010-09-19 11:55:08 -07:00
parent 5db0b651ec
commit ed6fbfa958
2 changed files with 4 additions and 4 deletions

View File

@ -346,7 +346,7 @@
Assigning instance to load balancer rule &hellip;</p>
</div>
</div>
<div id="grid_content" class="ip_description_managearea">
<div id="subgrid_content" class="ip_description_managearea">
</div>
</div>
</div>

View File

@ -112,7 +112,7 @@ function afterLoadIpJSP() {
dataType: "json",
success: function(json) {
var items = json.createloadbalancerruleresponse.loadbalancerrule;
loadBalancerJsonToTemplate(items[0],$template);
loadBalancerJsonToTemplate(items[0], $template);
$spinningWheel.hide();
refreshCreateLoadBalancerRow();
},
@ -431,7 +431,7 @@ function loadBalancerJsonToTemplate(jsonObj, $template) {
$template.find("#manage_link").unbind("click").bind("click", function(event){
var $managementArea = $template.find("#management_area");
var $vmSubgrid = $managementArea.find("#grid_content");
var $vmSubgrid = $managementArea.find("#subgrid_content");
if($managementArea.css("display") == "none") {
$vmSubgrid.empty();
$.ajax({
@ -631,7 +631,7 @@ function loadBalancerJsonToTemplate(jsonObj, $template) {
var $lbVmTemplate = $("#load_balancer_vm_template").clone();
var obj = {"loadBalancerId": loadBalancerId, "vmId": vmId, "vmName": vmName, "vmPrivateIp": vmPrivateIp};
lbVmObjToTemplate(obj, $lbVmTemplate);
$template.find("#management_area #grid_content").append($lbVmTemplate.show());
$template.find("#management_area #subgrid_content").append($lbVmTemplate.show());
refreshLbVmSelect($template, loadBalancerId);
$spinningWheel.hide();
} else if (result.jobstatus == 2) { // Failed