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.

Conflicts:
	webroot/config/services/instances/ui/js/views/svcInstListView.js

Change-Id: I6fa077cdd1945a15600bf07876948948ba55a3cd
(cherry picked from commit e37757c)
  • Loading branch information
biswajit-mandal committed Jun 13, 2016
1 parent ecd5946 commit 7b6a084
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 @@ -319,11 +319,11 @@ define([
},
successCallback: function(response, contrailListModel) {
self.svcInstanceDataObj.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 7b6a084

Please sign in to comment.