From 385f14e9ae542fa9bf21de09db58261c253e0800 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Sun, 19 Sep 2010 12:36:31 -0700 Subject: [PATCH] new UI - port forwarding - display vmname and vmdisplayname (defined by user). --- ui/new/scripts/cloud.core2.ipaddress.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/new/scripts/cloud.core2.ipaddress.js b/ui/new/scripts/cloud.core2.ipaddress.js index 4d5ba02a60b..c7a6e94d26c 100644 --- a/ui/new/scripts/cloud.core2.ipaddress.js +++ b/ui/new/scripts/cloud.core2.ipaddress.js @@ -232,8 +232,9 @@ function portForwardingJsonToTemplate(jsonObj, $template) { $template.find("#row_container #protocol").text(jsonObj.protocol); $template.find("#row_container_edit #protocol").text(jsonObj.protocol); - - $template.find("#row_container #vm_name").text(jsonObj.vmname); + + var vmName = getVmName(jsonObj.vmname, jsonObj.vmdisplayname); //jsonObj doesn't include vmdisplayname property(incorrect). Waiting for Bug 6241 to be fixed.... + $template.find("#row_container #vm_name").text(vmName); var virtualMachineId = jsonObj.virtualmachineid; var $detailsTab = $("#right_panel_content #tab_content_details"); @@ -674,11 +675,11 @@ function refreshCreateLoadBalancerRow() { function lbVmObjToTemplate(obj, $template) { $template.find("#vm_name").text(obj.vmName); - $template.find("#vm_private_ip").text(obj.vmPrivateIp); + $template.find("#vm_private_ip").text(obj.vmPrivateIp); + $template.find("#remove_link").bind("click", function(event){ var $spinningWheel = $template.find("#spinning_wheel"); - $spinningWheel.show(); - + $spinningWheel.show(); $.ajax({ data: createURL("command=removeFromLoadBalancerRule&id="+obj.loadBalancerId+"&virtualmachineid="+obj.vmId), dataType: "json", @@ -691,7 +692,7 @@ function lbVmObjToTemplate(obj, $template) { timerKey, function() { $.ajax({ - data: createURL("command=queryAsyncJobResult&jobId="+jobId), + data: createURL("command=queryAsyncJobResult&jobId="+jobId), dataType: "json", success: function(json) { var result = json.queryasyncjobresultresponse;