From 46e0a2506950063d3ed7d983f19599bb6c3c6726 Mon Sep 17 00:00:00 2001 From: Gabor Apati-Nagy Date: Fri, 7 Nov 2014 14:16:28 +0000 Subject: [PATCH] CLOUDSTACK-3528: [UI] Fix list calls on accounts page Fix List calls in the processing state forever with invalid name provided with Account name search filter -Added error handling for Events, Instances, Network, Projects, Storage pages where an advanced search by an invalid account name was making the UI to show in progress state forever. --- ui/scripts/events.js | 8 +++++++- ui/scripts/instances.js | 8 +++++++- ui/scripts/network.js | 8 +++++++- ui/scripts/projects.js | 8 +++++++- ui/scripts/storage.js | 16 ++++++++++++++-- 5 files changed, 42 insertions(+), 6 deletions(-) diff --git a/ui/scripts/events.js b/ui/scripts/events.js index ea4b940b303..a15f996c6e2 100644 --- a/ui/scripts/events.js +++ b/ui/scripts/events.js @@ -343,7 +343,13 @@ args.response.success({ data: items }); - } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); + args.response.error(); + } }); }, detailView: { diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 21926eaa3c6..867cc76b987 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -355,7 +355,13 @@ args.response.success({ data: items }); - } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); + args.response.error(); + } }); }, diff --git a/ui/scripts/network.js b/ui/scripts/network.js index ca766416a1a..fa39179bbbc 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -5294,7 +5294,13 @@ args.response.success({ data: items }); - } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); + args.response.error(); + } }); }, actions: { diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js index 7453b535c0d..74812a12726 100644 --- a/ui/scripts/projects.js +++ b/ui/scripts/projects.js @@ -784,7 +784,13 @@ data: data.listprojectsresponse.project, actionFilter: projectsActionFilter }); - } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); + args.response.error(); + } }); }, diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 90720ac9914..bb27ae89745 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -489,7 +489,13 @@ actionFilter: volumeActionfilter, data: items }); - } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); + args.response.error(); + } }); }, @@ -1676,7 +1682,13 @@ actionFilter: snapshotActionfilter, data: items }); - } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: parseXMLHttpResponse(XMLHttpResponse) + }); + args.response.error(); + } }); },