2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
28 var app = angular.module('clds-app', ['ngRoute',
31 'angular-loading-bar',
35 'ui.grid.resizeColumns',
45 .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
47 cfpLoadingBarProvider.includeBar = true;
48 cfpLoadingBarProvider.includeSpinner = true;
51 function($httpProvider) {
53 $httpProvider.responseInterceptors
54 .push('myHttpInterceptor');
56 var spinnerFunction = function spinnerFunction(data,
62 $httpProvider.defaults.transformRequest
63 .push(spinnerFunction);
70 'cfpLoadingBarProvider',
71 function($routeProvider, $locationProvider,
72 cfpLoadingBarProvider, $timeout, dialogs,
74 $locationProvider.html5Mode(false);
79 templateUrl: 'please_wait.html',
80 controller: QueryParamsHandlerCtrl
83 // when('/dashboard_submit', { templateUrl:
84 // 'partials/portfolios/dashboard_submit.html',
85 // controller: CreateNewPrjCtrl }).
88 templateUrl: 'partials/portfolios/clds_modelling.html',
89 controller: DashboardCtrl
92 // when('/dashboard_upload', { templateUrl:
93 // 'partials/portfolios/dashboard_upload.html',
94 // controller: DashboardCtrl }).
96 '/activity_modelling', {
97 templateUrl: 'partials/portfolios/clds_modelling.html',
98 controller: DashboardCtrl
99 }).when('/authenticate', {
100 templateUrl: 'authenticate.html',
101 controller: AuthenticateCtrl
102 }).when('/invalidlogin', {
103 templateUrl: 'invalid_login.html',
104 controller: PageUnderConstructionCtrl
106 redirectTo: '/otherwise'
113 function($scope, $rootScope, $timeout, dialogs) {
117 $scope.lang = 'en-US';
118 $scope.language = 'English';
123 $scope.confirmed = 'No confirmation yet!';
129 // -- Listeners & Watchers --//
131 $scope.$watch('lang', function(val, old) {
135 $scope.language = 'English';
138 $scope.language = 'Spanish';
144 $rootScope.testCaseRequirements = [];
145 $rootScope.validTestRequirements = [];
146 /* $rootScope.testCaseValue=[]; */
147 $scope.setLanguage = function(lang) {
150 $translate.use(lang);
153 $rootScope.launch = function(which) {
161 // dialogs.wait(undefined,undefined,_progress);
162 // _fakeWaitProgress();
165 // var dlg = dialogs.wait('Custom Wait
166 // Header','Custom Wait Message',_progress);
167 // _fakeWaitProgress();
173 var dlg = dialogs.confirm();
174 dlg.result.then(function(btn) {
176 $scope.confirmed = 'You confirmed "Yes."';
179 $scope.confirmed = 'You confirmed "No."';
183 var dlg = dialogs.create('/dialogs/custom.html',
184 'customDialogCtrl', {}, {
188 windowClass: 'my-class'
198 if (angular.equals($scope.name,
200 $scope.name = 'You did not enter in your name!';
204 var dlg = dialogs.create('/dialogs/custom2.html',
205 'customDialogCtrl2', $scope.custom, {
213 'All is not supported, Please select interface(s)/version(s) to fetch real time federated coverage report.');
219 'You are about to fetch real time federated coverage report.This may take sometime!!!.');
220 dlg.result.then(function(btn) {
222 $scope.confirmed = 'You confirmed "Yes."';
225 $scope.confirmed = 'You confirmed "No."';
229 var dlg = dialogs.notify('Success',
230 'Request has been successfully processed.');
233 var dlg = dialogs.notify('Message',
234 'Please type Testscenario Name');
239 var _fakeWaitProgress = function() {
241 $timeout(function() {
243 if (_progress < 100) {
245 $rootScope.$broadcast('dialogs.wait.progress', {
246 'progress': _progress
250 $rootScope.$broadcast('dialogs.wait.complete');
265 'userPreferencesService',
267 'extraUserInfoService',
268 function($scope, $rootScope, $timeout, dialogs,
269 $location, MenuService, Datafactory,
270 userPreferencesService, cldsModelService, extraUserInfoService) {
271 console.log("MenuCtrl");
272 $rootScope.screenName = "Universal Test Modeler";
273 $rootScope.testSet = null;
274 var testingType = "";
275 $rootScope.contactUs = function() {
276 console.log("contactUs");
277 var link = "mailto:onap-discuss@lists.onap.org?subject=CLAMP&body=Please send us suggestions or feature enhancements or defect. If possible, please send us the steps to replicate any defect.";
278 window.location.href = link;
285 $scope.userInfo = pars;
286 if (!($scope.userInfo["permissionUpdateCl"])) {
291 $scope.emptyMenuClick = function(value, name) {
292 if ($rootScope.isNewClosed &&
294 name != "Close Model" &&
295 name != "Properties CL") {
296 saveConfirmationNotificationPopUp();
301 function saveConfirmationNotificationPopUp() {
303 .saveConfirmationNotificationPopUp(function(
306 if ($rootScope.isNewClosed) {
307 isSaveCheck("Save CL");
309 $rootScope.isNewClosed = false;
316 function isSaveCheck(name) {
317 if (name == "User Info") {
318 $scope.extraUserInfo();
319 } else if (name == "Wiki") {
321 } else if (name == "Contact Us") {
322 $rootScope.contactUs();
323 } else if (name == "Revert Model Changes") {
324 $scope.cldsRevertModel();
325 } else if (name == "Close Model") {
327 } else if (name == "Refresh ASDC") {
328 $scope.cldsRefreshASDC();
329 } else if (name == "Create CL") {
330 $rootScope.isNewClosed = true;
331 $scope.cldsCreateModel();
332 } else if (name == "Open CL") {
333 $scope.cldsOpenModel();
334 } else if (name == "Save CL") {
335 $rootScope.isNewClosed = false;
336 $scope.cldsPerformAction("SAVE");
337 } else if (name == "Validation Test") {
338 $scope.cldsPerformAction("TEST");
339 } else if (name == "Submit") {
341 .cldsConfirmPerformAction("SUBMIT");
342 } else if (name == "Resubmit") {
344 .cldsConfirmPerformAction("RESUBMIT");
345 } else if (name == "Update") {
347 .cldsConfirmPerformAction("UPDATE");
348 } else if (name.toLowerCase() == "delete") {
350 .manageConfirmPerformAction("DELETE");
351 } else if (name == "Stop") {
352 $scope.cldsConfirmPerformAction("STOP");
353 } else if (name == "Restart") {
355 .cldsConfirmPerformAction("RESTART");
356 } else if (name == "Refresh Status") {
357 $scope.refreshStatus();
358 } else if (name == "Properties CL") {
359 $scope.cldsOpenModelProperties();
360 } else if (name == "Deploy") {
362 .cldsAskDeployParametersPerformAction();
363 } else if (name == "UnDeploy") {
365 .cldsConfirmToggleDeployPerformAction("UnDeploy");
367 $rootScope.screenName = name;
368 $scope.updatebreadcrumb(value);
369 $location.path(value);
374 $rootScope.impAlerts = function() {
380 link: "/cldsCreateModel",
383 link: "/cldsOpenModel",
386 link: "/cldsSaveModel",
389 link: "/cldsOpenModelProperties",
390 name: "Properties CL"
392 link: "/RevertChanges",
393 name: "Revert Model Changes"
399 link: "/cldsTestActivate",
400 name: "Validation Test"
405 link: "/cldsResubmit",
414 link: "/cldsRestart",
423 link: "/cldsUnDeploy",
427 link: "/refreshStatus",
428 name: "Refresh Status"
430 link: "/cldsRefreshASDC",
434 link: "http://wiki.onap.org",
440 link: "/extraUserInfo",
446 Object.keys = function(obj) {
450 if (obj.hasOwnProperty(i)) {
457 $scope.keyList = Object.keys($scope.tabs);
459 $scope.keyList = Object.keys($scope.tabs);
462 $scope.updatebreadcrumb = function(path) {
464 var currentURL = $location.path();
465 if (path != undefined) {
469 if (currentURL == "/dashboard") {
470 $rootScope.screenName = "Universal Test Modeler";
471 $rootScope.parentMenu = "Home";
472 $rootScope.rightTabName = "UTM Build Configuration";
475 * else if(currentURL=="/quicksearch") {
476 * $rootScope.screenName = "Quick Search";
477 * $rootScope.parentMenu = "Home"; }
485 function(value, key) {
488 $rootScope.parentMenu = value;
497 if (currentURL == value.link) {
498 $rootScope.screenName = value.name;
507 $scope.updatebreadcrumb();
509 $scope.homePage = function() {
511 $location.path('/dashboard');
513 $scope.propertyExplorerErrorMessage = function(msg) {
515 var dlg = dialogs.notify('Error', msg);
518 // $scope.fromTstMultipleFlag=false;
519 /* onclicking of review testset / generate testset */
521 $scope.reviewTestSet = function() {
523 $rootScope.modeltestset = list_model_test_sets[selected_model];
525 $rootScope.isPalette = false;
526 $rootScope.isTestset = true;
527 $rootScope.isRequirementCoverage = false;
528 document.getElementById("modeler_name").textContent = "UTM Test Set";
529 // document.getElementById('propertyExplorer').classList.add('visible');
531 // $( "#propertyExplorer" ).prev().css(
532 // "display", "none" );
533 $('div').find('.k-collapse-next').click();
535 // $rootScope.$apply();
538 $scope.requirementCoverage = function() {
540 $rootScope.testCaseRequirements = [];
541 $rootScope.validTestRequirementArray = [];
542 $rootScope.validTestRequirements = {};
543 $rootScope.modeltestset = list_model_test_sets[selected_model];
544 var allPathDetails = [];
545 $scope.currentSelectedModel = {};
546 // $scope.getPathDetails($rootScope.utmModels,selected_model);
547 // $scope.populatePathDetails(allPathDetails,$scope.currentSelectedModel);
548 $rootScope.pathDetailsList = list_model_path_details[selected_model];
550 * for(var p=0;p<100;p++){
551 * $rootScope.testCaseRequirements.push("Requirement"+p); }
552 * for(var p=0;p<100;p++){
553 * $rootScope.testCaseValue.push("TestCase"+p); }
555 for (var x = 0; x < allPathDetails.length; x++) {
556 var tempPathDetails = allPathDetails[x];
557 if (tempPathDetails != null) {
558 for (var i = 0; i < tempPathDetails.length; i++) {
559 var pathDetails = tempPathDetails[i];
560 if (pathDetails.requirement !== '' &&
561 pathDetails.requirement !== null) {
562 $rootScope.testCaseRequirements
563 .push(pathDetails.requirement);
567 * for (var j = 0; j <
568 * pathDetails.decisionIdentifiers.length;
570 * if(pathDetails.decisionIdentifiers[j].requirement
572 * pathDetails.decisionIdentifiers[j].requirement
574 * $rootScope.testCaseRequirements.push(pathDetails.decisionIdentifiers[j].requirement); } }
580 for (var p = 0; p < $rootScope.modeltestset.activityTestCases.length; p++) {
581 var activityTestCases = $rootScope.modeltestset.activityTestCases[p];
582 if (activityTestCases.mappedRequirements != null) {
583 for (var i = 0; i < activityTestCases.mappedRequirements.length; i++) {
584 // $rootScope.testCaseRequirements
585 // .push(activityTestCases.mappedRequirements[i]);
586 var testCaseNames = $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]];
587 if (testCaseNames == null) {
590 if (activityTestCases.version != null)
591 var testCase = activityTestCases.testCaseName +
593 activityTestCases.version;
595 var testCase = activityTestCases.testCaseName;
596 testCaseNames.push(testCase);
597 $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]] = testCaseNames;
602 $rootScope.isPalette = false;
603 $rootScope.isTestset = false;
604 $rootScope.isRequirementCoverage = true;
605 document.getElementById("modeler_name").textContent = "Test Case / Requirement Coverage";
607 $('div').find('.k-collapse-next').click();
612 $scope.activityModelling = function() {
616 $scope.cldsClose = function() {
620 'partials/portfolios/confirmation_window.html',
621 'CldsOpenModelCtrl', {
628 windowClass: 'my-class'
631 dlg.result.then(function(name) {
633 // $scope.name = name;
636 // if(angular.equals($scope.name,''))
637 // $scope.name = 'You did not enter in your
641 $scope.saveConfirmationNotificationPopUp = function(
646 'partials/portfolios/save_confirmation.html',
647 'saveConfirmationModalPopUpCtrl', {
654 windowClass: 'my-class'
657 dlg.result.then(function(name) {
665 $scope.cldsRefreshASDC = function() {
669 'partials/portfolios/refresh_asdc.html',
670 'CldsOpenModelCtrl', {
677 windowClass: 'my-class'
679 dlg.result.then(function(name) {
681 // $scope.name = name;
684 // if(angular.equals($scope.name,''))
685 // $scope.name = 'You did not enter in your
689 $scope.cldsRevertModel = function() {
693 'partials/portfolios/ConfirmRevertChanges.html',
694 'CldsOpenModelCtrl', {
701 windowClass: 'my-class'
704 dlg.result.then(function(name) {
706 // $scope.name = name;
709 // if(angular.equals($scope.name,''))
710 // $scope.name = 'You did not enter in your
716 $rootScope.cldsOpenModelProperties = function() {
720 'partials/portfolios/global_properties.html',
721 'GlobalPropertiesCtrl', {}, {
725 windowClass: 'my-class'
728 dlg.result.then(function(name) {}, function() {});
731 $scope.cldsOpenModel = function() {
735 'partials/portfolios/clds_open_model.html',
736 'CldsOpenModelCtrl', {
743 windowClass: 'my-class'
746 dlg.result.then(function(name) {
748 // $scope.name = name;
751 // if(angular.equals($scope.name,''))
752 // $scope.name = 'You did not enter in your
756 $scope.cldsCreateModel = function() {
760 'partials/portfolios/clds_create_model_off_Template.html',
761 'CldsOpenModelCtrl', {
768 windowClass: 'my-class'
771 dlg.result.then(function(name) {
773 // $scope.name = name;
776 // if(angular.equals($scope.name,''))
777 // $scope.name = 'You did not enter in your
782 $scope.extraUserInfo = function() {
786 'partials/portfolios/extra_user_info.html',
787 'ExtraUserInfoCtrl', {
794 windowClass: 'my-class'
797 dlg.result.then(function(name) {}, function() {});
800 $scope.cldsPerformAction = function(uiAction) {
802 var modelName = selected_model;
803 var controlNamePrefix = "ClosedLoop-";
804 var bpmnText = modelXML;
805 // serialize model properties
806 var propText = JSON.stringify(elementMap);
807 var templateName = selected_template
809 var svgXml = $("#svgContainer").html();
811 console.log("cldsPerformAction: " + uiAction +
812 " modelName=" + modelName);
813 console.log("cldsPerformAction: " + uiAction +
814 " controlNamePrefix=" +
816 console.log("cldsPerformAction: " + uiAction +
817 " bpmnText=" + bpmnText);
818 console.log("cldsPerformAction: " + uiAction +
819 " propText=" + propText);
820 console.log("cldsPerformAction: " + uiAction +
821 " typeID=" + typeID);
822 console.log("cldsPerformAction: " + uiAction +
823 " deploymentId=" + deploymentId);
825 .processAction(uiAction, modelName,
826 controlNamePrefix, bpmnText,
827 propText, svgXml, templateName,
828 typeID, deploymentId)
832 .log("cldsPerformAction: pars=" +
835 .processRefresh(pars);
839 // alert("setModel failed: "
843 $scope.refreshStatus = function() {
844 var modelName = selected_model;
845 var svgXml = $("#svgContainer").html();
846 console.log("refreStatus modelName=" + modelName);
852 .log("refreStatus: pars=" +
855 .processRefresh(pars);
860 $scope.cldsConfirmPerformAction = function(uiAction) {
861 var dlg = dialogs.confirm('Message',
863 uiAction.toLowerCase() +
864 ' the closed loop?');
865 dlg.result.then(function(btn) {
867 $scope.cldsPerformAction(uiAction);
870 // $modalInstance.close("closed");
874 $scope.cldsAskDeployParametersPerformAction = function() {
875 var dlg = dialogs.create('partials/portfolios/deploy_parameters.html',
877 {}, {keyboard: true, backdrop: true, windowClass: 'deploy-parameters'});
878 dlg.result.then(function() {
879 var confirm = dialogs.confirm('Deploy', 'Are you sure you want to deploy the closed loop?');
880 confirm.result.then(function() {
881 cldsToggleDeploy("deploy");
886 $scope.cldsConfirmToggleDeployPerformAction = function(
889 var dlg = dialogs.confirm('Message',
891 uiAction.toLowerCase() +
892 ' the closed loop?');
893 dlg.result.then(function(btn) {
894 cldsToggleDeploy(uiAction.toLowerCase());
897 // $modalInstance.close("closed");
901 function cldsToggleDeploy(uiAction) {
902 var modelName = selected_model;
903 var controlNamePrefix = "ClosedLoop-";
904 var bpmnText = modelXML;
905 // serialize model properties
906 var propText = JSON.stringify(elementMap);
907 var templateName = selected_template;
908 var svgXml = $("#svgContainer").html();
910 console.log("cldsPerformAction: " + uiAction +
911 " modelName=" + modelName);
912 console.log("cldsPerformAction: " + uiAction +
913 " controlNamePrefix=" +
915 console.log("cldsPerformAction: " + uiAction +
916 " bpmnText=" + bpmnText);
917 console.log("cldsPerformAction: " + uiAction +
918 " propText=" + propText);
919 console.log("cldsPerformAction: " + uiAction +
920 " modelEventService=" +
922 console.log("cldsPerformAction: " + uiAction +
923 " typeID=" + typeID);
924 console.log("cldsPerformAction: " + uiAction +
925 " deploymentId=" + deploymentId);
927 .toggleDeploy(uiAction, modelName,
928 controlNamePrefix, bpmnText,
929 propText, svgXml, templateName,
930 typeID, controlNameUuid,
931 modelEventService, deploymentId)
934 typeID = pars.typeId;
935 controlNameUuid = pars.controlNameUuid;
936 selected_template = pars.templateName;
937 modelEventService = pars.event;
939 // pars.event.actionCd;
940 actionStateCd = pars.event.actionStateCd;
941 deploymentId = pars.deploymentId;
943 .processActionResponse(
952 $scope.managePerformAction = function(action) {
953 if (action.toLowerCase() === "delete") {
957 "805b9f83-261f-48d9-98c7-8011fc2cc8e8",
958 "ClosedLoop-ABCD-0000.yml")
959 .then(function(pars) {
963 // alert("setModel failed: " +
968 $scope.manageConfirmPerformAction = function(
971 var dlg = dialogs.confirm('Message',
973 uiAction.toLowerCase() +
974 ' the closed loop?');
975 dlg.result.then(function(btn) {
977 $scope.managePerformAction(uiAction);
980 // $modalInstance.close("closed");
983 $scope.VesCollectorWindow = function(vesCollector) {
987 'partials/portfolios/vesCollector_properties.html',
988 'ImportSchemaCtrl', {
995 windowClass: 'my-class'
998 dlg.result.then(function(name) {
1007 $scope.HolmesWindow = function(holmes) {
1009 var partial = 'partials/portfolios/holmes_properties.html'
1022 windowClass: 'my-class'
1026 $scope.TCAWindow = function(tca) {
1030 'partials/portfolios/tca_properties.html',
1031 'ImportSchemaCtrl', {
1038 windowClass: 'my-class'
1041 dlg.result.then(function(name) {
1042 // $scope.name = name;
1044 // if(angular.equals($scope.name,''))
1045 // $scope.name = 'You did not enter in
1051 $scope.PolicyWindow = function(policy) {
1054 'partials/portfolios/PolicyWindow_properties.html',
1055 'ImportSchemaCtrl', {
1062 windowClass: 'my-class'
1065 dlg.result.then(function(name) {
1067 // $scope.name = name;
1070 // if(angular.equals($scope.name,''))
1071 // $scope.name = 'You did not enter in
1080 app.service('MenuService', ['$http', '$q', function($http, $q) {
1083 * this.generateMDTTestSet = function(utmMDTRequest, generateTestSetMDTURL){
1085 * console.log("generateMDTTestSet"); //alert("In generateMDTTestSet :: " +
1086 * JSON.stringify(utmMDTRequest)); var def = $q.defer(); var sets = [];
1088 * $http.post(generateTestSetMDTURL, utmMDTRequest) .success(function(data){
1089 * console.log("success"); sets = data; def.resolve(data); })
1090 * .error(function(data){ console.log("error");
1091 * def.reject("GenerateMDTTestSet not successful"); });
1093 * return def.promise; };
1097 app.directive('focus', function($timeout) {
1103 link: function(scope, element) {
1104 scope.$watch('trigger', function(value) {
1106 if (value === "true") {
1107 $timeout(function() {
1116 app.directive('draggable', function($document) {
1118 return function(scope, element, attr) {
1125 position: 'relative',
1127 backgroundColor: 'white',
1132 element.on('mousedown', function(event) {
1134 // Prevent default dragging of selected content
1135 // event.preventDefault();
1136 startX = event.screenX - x;
1137 startY = event.screenY - y;
1138 $document.on('mousemove', mousemove);
1139 $document.on('mouseup', mouseup);
1142 function mousemove(event) {
1144 y = event.screenY - startY;
1145 x = event.screenX - startX;
1152 function mouseup() {
1154 $document.off('mousemove', mousemove);
1155 $document.off('mouseup', mouseup);
1160 app.factory('myHttpInterceptor', function($q, $window) {
1162 return function(promise) {
1164 return promise.then(function(response) {
1167 }, function(response) {
1169 return $q.reject(response);
1174 app.run(['$route', function($route) {
1179 function TestCtrl($scope) {
1181 $scope.msg = "Hello from a controller method.";
1182 $scope.returnHello = function() {
1188 function importshema() {
1190 angular.element(document.getElementById('navbar')).scope().importSchema();
1194 function VesCollectorWindow(vesCollectorWin) {
1195 angular.element(document.getElementById('navbar')).scope()
1196 .VesCollectorWindow(vesCollectorWin);
1199 function HolmesWindow(holmesWin) {
1200 angular.element(document.getElementById('navbar')).scope()
1201 .HolmesWindow(holmesWin);
1204 function F5Window() {
1206 angular.element(document.getElementById('navbar')).scope().F5Window();
1210 function TCAWindow(tca) {
1212 angular.element(document.getElementById('navbar')).scope().TCAWindow(tca);
1216 function GOCWindow() {
1218 angular.element(document.getElementById('navbar')).scope().GOCWindow();
1222 function PolicyWindow(PolicyWin) {
1224 angular.element(document.getElementById('navbar')).scope().PolicyWindow(
1229 function pathDetails(bpmnElementID, bpmnElementName, pathIdentifiers) {
1231 angular.element(document.getElementById('navbar')).scope().pathDetails(
1232 bpmnElementID, bpmnElementName, pathIdentifiers);
1236 function setdefaultvalue() {
1238 angular.element(document.getElementById('navbar')).scope()
1243 function upgradeSchemaVersion() {
1245 angular.element(document.getElementById('navbar')).scope()
1246 .upgradeSchemaVersion();
1250 function saveProject() {
1252 angular.element(document.getElementById('navbar')).scope().saveProject();
1256 function modifySchema() {
1258 angular.element(document.getElementById('navbar')).scope().modifySchema();
1262 function definePID() {
1264 angular.element(document.getElementById('navbar')).scope().definePID();
1268 function defineServiceAcronym() {
1270 angular.element(document.getElementById('navbar')).scope()
1271 .defineServiceAcronym();
1275 function errorProperty(msg) {
1277 angular.element(document.getElementById('navbar')).scope()
1278 .propertyExplorerErrorMessage(msg);
1281 function invisiblepropertyExplorer() {
1283 angular.element(document.getElementById('navbar')).scope()
1284 .invisibleproperty();
1287 function updateDecisionLabel(originalLabel, newLabel) {
1289 angular.element(document.getElementById('navbar')).scope()
1290 .updateDecisionLabels(originalLabel, newLabel);
1293 // Used to logout the session , when browser window was closed
1294 window.onunload = function() {
1295 window.localStorage.removeItem("isAuth");
1296 window.localStorage.removeItem("loginuser");
1297 window.localStorage.removeItem("invalidUser");