Updated Branches: refs/heads/4.2-forward b96aefee2 -> 066d944c7
CLOUDSTACK-4688: UI > (1) Notifications widget - pollTimer() - error handling - check if args is null before trying to access args.message property (2) sharedFunctions.js - pollAsyncJobResult() - error handling - pass message argument to args.error(). Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/066d944c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/066d944c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/066d944c Branch: refs/heads/4.2-forward Commit: 066d944c7877f1b46edc1e96e74178769795960a Parents: b96aefe Author: Jessica Wang <[email protected]> Authored: Tue Sep 17 16:30:25 2013 -0700 Committer: Jessica Wang <[email protected]> Committed: Tue Sep 17 16:37:47 2013 -0700 ---------------------------------------------------------------------- ui/scripts/sharedFunctions.js | 4 +++- ui/scripts/ui/widgets/notifications.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/066d944c/ui/scripts/sharedFunctions.js ---------------------------------------------------------------------- diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 9287c1c..16ca41f 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -107,7 +107,9 @@ var pollAsyncJobResult = function(args) { } }, error: function(XMLHttpResponse) { - args.error(); + args.error({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); } }); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/066d944c/ui/scripts/ui/widgets/notifications.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui/widgets/notifications.js b/ui/scripts/ui/widgets/notifications.js index fec64c5..9b7fc4c 100644 --- a/ui/scripts/ui/widgets/notifications.js +++ b/ui/scripts/ui/widgets/notifications.js @@ -111,7 +111,7 @@ }, incomplete: function(args) {}, error: function(args) { - if (args.message) { + if (args && args.message) { cloudStack.dialog.notice({ message: _s(args.message) });
