Skip to content

Commit

Permalink
Closes-Bug: #1588165
Browse files Browse the repository at this point in the history
1. handle error cases if there is no service template in SI page.
2. If glance is down, then send image list as empty array.

Change-Id: I6fa077cdd1945a15600bf07876948948ba55a3cd
  • Loading branch information
biswajit-mandal committed Jun 2, 2016
1 parent c67dc40 commit e37757c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ define([
},
successCallback: function(response, contrailListModel) {
window.svcTmplsFormatted = [];
var svcTmpObjs = {};
if (('service_templates' in response) &&
(response['service_templates'].length > 0)) {
var svcTmps = response['service_templates'];
var respCnt = svcTmps.length;
var svcTmpObjs = {};
var svcTmplObjsByFqn ={};
if (!respCnt) {
var nullObj =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ function stSendResponse(error, stConfig, response)
*/
function listServiceTemplateImages(request, response, appData)
{
var emptyImageList = {images: []};
imageApi.getImageList(request, function (error, data) {
if (error) {
commonUtils.handleJSONResponse(error, response, null);
if ((null != error) || (null == data)) {
commonUtils.handleJSONResponse(null, response, emptyImageList);
} else {
commonUtils.handleJSONResponse(error, response, data);
}
Expand Down

0 comments on commit e37757c

Please sign in to comment.