From 4808e597bfe3507482a1eedc74c781f0ddc24990 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 10 Jan 2012 17:04:35 -0800 Subject: [PATCH] bug 12964: fix a JS error => "args is undefined" --- ui/scripts/system.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index d1119e05b8f..eedb9897e91 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -2773,11 +2773,10 @@ } else { $("body").stopTime(timerKey); - if (result.jobstatus == 1) { - //debugger; + if (result.jobstatus == 1) { trafficTypeCount++; if(trafficTypeCount == 3) //3 traffic types(Public, Management, Guest) have been added to this physical network - afterCreateZonePhysicalNetworkTrafficTypes(newZoneObj, newPhysicalnetwork); + afterCreateZonePhysicalNetworkTrafficTypes(args, newZoneObj, newPhysicalnetwork); } else if (result.jobstatus == 2) { alert("addTrafficType&trafficType=Public failed. Error: " + fromdb(result.jobresult.errortext)); @@ -2810,11 +2809,10 @@ } else { $("body").stopTime(timerKey); - if (result.jobstatus == 1) { - //debugger; + if (result.jobstatus == 1) { trafficTypeCount++; if(trafficTypeCount == 3) //3 traffic types(Public, Management, Guest) have been added to this physical network - afterCreateZonePhysicalNetworkTrafficTypes(newZoneObj, newPhysicalnetwork); + afterCreateZonePhysicalNetworkTrafficTypes(args, newZoneObj, newPhysicalnetwork); } else if (result.jobstatus == 2) { alert("addTrafficType&trafficType=Management failed. Error: " + fromdb(result.jobresult.errortext)); @@ -2847,11 +2845,10 @@ } else { $("body").stopTime(timerKey); - if (result.jobstatus == 1) { - //debugger; + if (result.jobstatus == 1) { trafficTypeCount++; if(trafficTypeCount == 3) //3 traffic types(Public, Management, Guest) have been added to this physical network - afterCreateZonePhysicalNetworkTrafficTypes(newZoneObj, newPhysicalnetwork); + afterCreateZonePhysicalNetworkTrafficTypes(args, newZoneObj, newPhysicalnetwork); } else if (result.jobstatus == 2) { alert("addTrafficType&trafficType=Guest failed. Error: " + fromdb(result.jobresult.errortext)); @@ -6772,7 +6769,7 @@ }); } - var afterCreateZonePhysicalNetworkTrafficTypes = function(newZoneObj, newPhysicalnetwork) { + var afterCreateZonePhysicalNetworkTrafficTypes = function(args, newZoneObj, newPhysicalnetwork) { $.ajax({ url: createURL("updatePhysicalNetwork&state=Enabled&id=" + newPhysicalnetwork.id), dataType: "json",