diff options
author | golabek <tomasz.golabek@nokia.com> | 2019-03-08 13:05:24 +0100 |
---|---|---|
committer | golabek <tomasz.golabek@nokia.com> | 2019-03-11 11:37:33 +0100 |
commit | 1cb4db0a9820f65064dde0120dae00fb67cec446 (patch) | |
tree | 194c67c9a4c4c355150d1324cfb7f2e7f568efed /vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js | |
parent | e2617e9d5b82f2605e1660750a0dae96a077d83f (diff) |
Introduced feature toggle for workflows API
FLAG_HANDLE_SO_WORKFLOWS was added to list of flags and used in js
Change-Id: I720cd01b001fd1be75ec49628d7bb4b04f883384
Issue-ID: VID-398
Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js index 8a7d59a62..88caef29e 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js @@ -634,16 +634,20 @@ }; vm.loadWorkFlows = function () { - // Should be corrected when VID-397 will be closed. At the moment there is a need - // to merge local and remote workflows not to broke current functionality. - return vm.loadLocalWorkFlows() - .then(vm.loadLocalWorkFlowsParameters) - .then(vm.loadRemoteWorkFlows) - .then(function () { - vm.workflows = vm.localWorkflows.concat(vm.remoteWorkflows.map(item => item.name)); - }).then(function () { - vm.loadRemoteWorkFlowsParameters(); - }); + if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_HANDLE_SO_WORKFLOWS)) { + return vm.loadRemoteWorkFlows() + .then(function () { + vm.workflows = vm.remoteWorkflows.map(item => item.name); + }).then(function () { + vm.loadRemoteWorkFlowsParameters(); + }); + }else{ + return vm.loadLocalWorkFlows() + .then(vm.loadLocalWorkFlowsParameters) + .then(function () { + vm.workflows = vm.localWorkflows; + }) + } }; vm.loadLocalWorkFlows = function () { |