From deae1a2d34dbdd95d49837b13ff73b24c01dbd59 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 3 Jan 2014 14:55:53 -0800 Subject: [PATCH] CLOUDSTACK-5771: UI > Infrastructure > SystemVMs page > listView Search > fix a bug that UI kept spinning when there was no matching result. --- ui/scripts/system.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 87946efad05..bf347420b45 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7314,7 +7314,7 @@ data: data, success: function(json) { var systemvmObjs = json.listsystemvmsresponse.systemvm; - if (systemvmObjs != null) { + if (systemvmObjs != undefined) { $.ajax({ url: createURL("listHosts&listAll=true"), success: function(json) { @@ -7330,15 +7330,13 @@ args.response.success({ data: systemvmObjs }); - }, - error: function(json) { - args.response.error(parseXMLHttpResponse(json)); } }); + } else { + args.response.success({ + data: [] + }); } - }, - error: function(json) { - args.response.error(parseXMLHttpResponse(json)); } }); },