cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [31/50] [abbrv] git commit: cloudstack 3.0 UI - (1) to distinguish between getUpdatedItem() and getUpdatedData(), rename getUpdatedData() to getUpdatedItemWhenAsyncJobFails() since it's being called only when async job fails. (2) fix the space problem (t
Date Fri, 29 Jun 2012 00:45:07 GMT
cloudstack 3.0 UI - (1) to distinguish between getUpdatedItem() and getUpdatedData(), rename
getUpdatedData() to getUpdatedItemWhenAsyncJobFails() since it's being called only when async
job fails. (2) fix the space problem (tab size is not 2) from patch.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/d03fb2a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/d03fb2a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/d03fb2a7

Branch: refs/heads/vpc
Commit: d03fb2a7e2af8d7b682445f42312797c7efa0f3d
Parents: 8197f1f
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Fri Jun 22 15:14:45 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Wed Jun 27 10:57:29 2012 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js           |   26 +++++++++++++-------------
 ui/scripts/sharedFunctions.js     |   16 ++++++++--------
 ui/scripts/ui/widgets/listView.js |   22 +++++++++++-----------
 3 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d03fb2a7/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 969a657..77688c9 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -541,7 +541,7 @@
                   dataType: "json",
                   success: function(json) {
                     var jid = json.deployvirtualmachineresponse.jobid;
-					var vmid = json.deployvirtualmachineresponse.id;
+					          var vmid = json.deployvirtualmachineresponse.id;
                     args.response.success(
                       {_custom:
                        {jobId: jid,
@@ -554,18 +554,18 @@
                         getActionFilter: function() {
                           return vmActionfilter;
                         },
-						getUpdatedData: function() {
-							var item;
-							$.ajax({
-							  url: createURL("listVirtualMachines&id="+vmid),
-							  dataType: "json",
-							  async: false,
-							  success: function(json) {
-								item = json.listvirtualmachinesresponse.virtualmachine[0];
-							  }
-							});
-							return item;
-						}
+												getUpdatedItemWhenAsyncJobFails: function() {
+													var item;
+													$.ajax({
+														url: createURL("listVirtualMachines&id="+vmid),
+														dataType: "json",
+														async: false,
+														success: function(json) {
+														item = json.listvirtualmachinesresponse.virtualmachine[0];
+														}
+													});
+													return item;
+												}
                        }
                       }
                     );

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d03fb2a7/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 8fc5c78..cf437af 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -86,14 +86,14 @@ var pollAsyncJobResult = function(args) {
         }
         else if (result.jobstatus == 2) { // Failed          
           var msg = (result.jobresult.errortext == null)? "": result.jobresult.errortext;
-		  if (args._custom.getUpdatedData != null && args._custom.getActionFilter != null)
{
-			args.error({message: msg, updatedData: args._custom.getUpdatedData(), actionFilter: args._custom.getActionFilter()});
-		  } else if (args._custom.getUpdatedData != null && args._custom.getActionFilter
== null) {
-			args.error({message: msg, updatedData: args._custom.getUpdatedData()});
-		  }
-		  else {
-			args.error({message: msg});
-		  }
+					if (args._custom.getUpdatedItemWhenAsyncJobFails != null && args._custom.getActionFilter
!= null) {
+					  args.error({message: msg, updatedData: args._custom.getUpdatedItemWhenAsyncJobFails(),
actionFilter: args._custom.getActionFilter()});
+					} else if (args._custom.getUpdatedItemWhenAsyncJobFails != null && args._custom.getActionFilter
== null) {
+					  args.error({message: msg, updatedData: args._custom.getUpdatedItemWhenAsyncJobFails()});
+					}
+					else {
+					  args.error({message: msg});
+					}
         }
       }
     },

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d03fb2a7/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index c893b1f..9ba5730 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -97,17 +97,17 @@
 
                 // Error
                 function(args) {
-					if (args && args.updatedData) {
-						if ($item.is(':visible') && !isHeader) {
-							replaceItem(
-							  $item,
-							  args.updatedData,
-							  args.actionFilter
-							);
-						}
-					} else {
-						$item.remove();
-					}
+									if (args && args.updatedData) {
+										if ($item.is(':visible') && !isHeader) {
+											replaceItem(
+												$item,
+												args.updatedData,
+												args.actionFilter
+											);
+										}
+									} else {
+										$item.remove();
+									}
                 }
               );
             }


Mime
View raw message