diff options
author | Ittay Stern <ittay.stern@att.com> | 2020-05-11 08:06:50 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2020-05-13 06:35:40 +0000 |
commit | 6181112a4e5c876499edeba307662ef49995d5f4 (patch) | |
tree | 17f5c7f7bf756a3d8cf89d03513fdc8d1441bd05 /vid-app-common | |
parent | fc0d29339279109558dbf2484d7e9fe8f2d78113 (diff) |
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 <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js | 22 |
1 files changed, 13 insertions, 9 deletions
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; }; |