From: Ittay Stern Date: Mon, 11 May 2020 05:06:50 +0000 (+0300) Subject: Don't fetch scheduled tasks when there's no scheduler X-Git-Tag: 7.0.0~36 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F107430%2F2;p=vid.git Don't fetch scheduled tasks when there's no scheduler Change-Id: Idc78256615164f06d110c9847e90a9112fb1e2d5 Issue-ID: VID-825 Issue-ID: VID-174 Signed-off-by: Ittay Stern --- diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js index 6b45a7479..b90d417bb 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js @@ -21,9 +21,9 @@ (function () { 'use strict'; - appDS2.service('changeManagementService', ['$http', '$q', 'COMPONENT', 'VIDCONFIGURATION', changeManagementService]); + appDS2.service('changeManagementService', ['$http', '$q', 'COMPONENT', 'VIDCONFIGURATION', 'featureFlags', changeManagementService]); - function changeManagementService($http, $q, COMPONENT, VIDCONFIGURATION) { + function changeManagementService($http, $q, COMPONENT, VIDCONFIGURATION, featureFlags) { this.getWorkflows = function (vnfs) { var requestVnfs = _.map(vnfs, function (vnf) { return { @@ -68,13 +68,17 @@ this.getMSOChangeManagements = function() { var deferred = $q.defer(); - $http.get(COMPONENT.GET_MSO_WORKFLOWS) - .success(function (response) { - deferred.resolve({data: response}); - }) - .error(function(data, status, headers, config) { - deferred.reject({message: data, status: status}); - }); + if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_GUILIN_CHANGEMG_SUBMIT_TO_SO)) { + deferred.resolve({data: []}); // no scheduler + } else { + $http.get(COMPONENT.GET_MSO_WORKFLOWS) + .success(function (response) { + deferred.resolve({data: response}); + }) + .error(function (data, status, headers, config) { + deferred.reject({message: data, status: status}); + }); + } return deferred.promise; };