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',
46 .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
48 cfpLoadingBarProvider.includeBar = true;
49 cfpLoadingBarProvider.includeSpinner = true;
52 function($httpProvider) {
54 $httpProvider.responseInterceptors
55 .push('myHttpInterceptor');
57 var spinnerFunction = function spinnerFunction(data,
63 $httpProvider.defaults.transformRequest
64 .push(spinnerFunction);
71 'cfpLoadingBarProvider',
72 function($routeProvider, $locationProvider,
73 cfpLoadingBarProvider, $timeout, dialogs,
75 $locationProvider.html5Mode(false);
80 templateUrl: 'please_wait.html',
81 controller: QueryParamsHandlerCtrl
84 // when('/dashboard_submit', { templateUrl:
85 // 'partials/portfolios/dashboard_submit.html',
86 // controller: CreateNewPrjCtrl }).
89 templateUrl: 'partials/portfolios/clds_modelling.html',
90 controller: DashboardCtrl
93 // when('/dashboard_upload', { templateUrl:
94 // 'partials/portfolios/dashboard_upload.html',
95 // controller: DashboardCtrl }).
97 '/activity_modelling', {
98 templateUrl: 'partials/portfolios/clds_modelling.html',
99 controller: DashboardCtrl
100 }).when('/authenticate', {
101 templateUrl: 'authenticate.html',
102 controller: AuthenticateCtrl
103 }).when('/invalidlogin', {
104 templateUrl: 'invalid_login.html',
105 controller: PageUnderConstructionCtrl
107 redirectTo: '/otherwise'
114 function($scope, $rootScope, $timeout, dialogs) {
118 $scope.lang = 'en-US';
119 $scope.language = 'English';
124 $scope.confirmed = 'No confirmation yet!';
130 // -- Listeners & Watchers --//
132 $scope.$watch('lang', function(val, old) {
136 $scope.language = 'English';
139 $scope.language = 'Spanish';
145 $rootScope.testCaseRequirements = [];
146 $rootScope.validTestRequirements = [];
147 /* $rootScope.testCaseValue=[]; */
148 $scope.setLanguage = function(lang) {
151 $translate.use(lang);
154 $rootScope.launch = function(which) {
162 // dialogs.wait(undefined,undefined,_progress);
163 // _fakeWaitProgress();
166 // var dlg = dialogs.wait('Custom Wait
167 // Header','Custom Wait Message',_progress);
168 // _fakeWaitProgress();
174 var dlg = dialogs.confirm();
175 dlg.result.then(function(btn) {
177 $scope.confirmed = 'You confirmed "Yes."';
180 $scope.confirmed = 'You confirmed "No."';
184 var dlg = dialogs.create('/dialogs/custom.html',
185 'customDialogCtrl', {}, {
189 windowClass: 'my-class'
199 if (angular.equals($scope.name,
201 $scope.name = 'You did not enter in your name!';
205 var dlg = dialogs.create('/dialogs/custom2.html',
206 'customDialogCtrl2', $scope.custom, {
214 'All is not supported, Please select interface(s)/version(s) to fetch real time federated coverage report.');
220 'You are about to fetch real time federated coverage report.This may take sometime!!!.');
221 dlg.result.then(function(btn) {
223 $scope.confirmed = 'You confirmed "Yes."';
226 $scope.confirmed = 'You confirmed "No."';
230 var dlg = dialogs.notify('Success',
231 'Request has been successfully processed.');
234 var dlg = dialogs.notify('Message',
235 'Please type Testscenario Name');
240 var _fakeWaitProgress = function() {
242 $timeout(function() {
244 if (_progress < 100) {
246 $rootScope.$broadcast('dialogs.wait.progress', {
247 'progress': _progress
251 $rootScope.$broadcast('dialogs.wait.complete');
266 'userPreferencesService',
268 'extraUserInfoService',
269 function($scope, $rootScope, $timeout, dialogs,
270 $location, MenuService, Datafactory,
271 userPreferencesService, cldsModelService, extraUserInfoService) {
272 console.log("MenuCtrl");
273 $rootScope.screenName = "Universal Test Modeler";
274 $rootScope.testSet = null;
275 var testingType = "";
276 $rootScope.contactUs = function() {
277 console.log("contactUs");
278 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.";
279 window.location.href = link;
286 $scope.userInfo = pars;
287 if (!($scope.userInfo["permissionUpdateCl"])) {
292 $scope.emptyMenuClick = function(value, name) {
293 if ($rootScope.isNewClosed &&
295 name != "Close Model" &&
296 name != "Properties CL") {
297 saveConfirmationNotificationPopUp();
302 function saveConfirmationNotificationPopUp() {
304 .saveConfirmationNotificationPopUp(function(
307 if ($rootScope.isNewClosed) {
308 isSaveCheck("Save CL");
310 $rootScope.isNewClosed = false;
317 function isSaveCheck(name) {
318 if (name == "User Info") {
319 $scope.extraUserInfo();
320 } else if (name == "Wiki") {
322 } else if (name == "Contact Us") {
323 $rootScope.contactUs();
324 } else if (name == "Revert Model Changes") {
325 $scope.cldsRevertModel();
326 } else if (name == "Close Model") {
328 } else if (name == "Refresh ASDC") {
329 $scope.cldsRefreshASDC();
330 } else if (name == "Create CL") {
331 $rootScope.isNewClosed = true;
332 $scope.cldsCreateModel();
333 } else if (name == "Open CL") {
334 $scope.cldsOpenModel();
335 } else if (name == "Save CL") {
336 $rootScope.isNewClosed = false;
337 $scope.cldsPerformAction("SAVE");
338 } else if (name == "Validation Test") {
339 $scope.cldsPerformAction("TEST");
340 } else if (name == "Submit") {
342 .cldsConfirmPerformAction("SUBMIT");
343 } else if (name == "Resubmit") {
345 .cldsConfirmPerformAction("RESUBMIT");
346 } else if (name == "Update") {
348 .cldsConfirmPerformAction("UPDATE");
349 } else if (name.toLowerCase() == "delete") {
351 .manageConfirmPerformAction("DELETE");
352 } else if (name == "Stop") {
353 $scope.cldsConfirmPerformAction("STOP");
354 } else if (name == "Restart") {
356 .cldsConfirmPerformAction("RESTART");
357 } else if (name == "Refresh Status") {
358 $scope.refreshStatus();
359 } else if (name == "Properties CL") {
360 $scope.cldsOpenModelProperties();
361 } else if (name == "Deploy") {
363 .cldsAskDeployParametersPerformAction();
364 } else if (name == "UnDeploy") {
366 .cldsConfirmToggleDeployPerformAction("UnDeploy");
368 $rootScope.screenName = name;
369 $scope.updatebreadcrumb(value);
370 $location.path(value);
375 $rootScope.impAlerts = function() {
381 link: "/cldsCreateModel",
384 link: "/cldsOpenModel",
387 link: "/cldsSaveModel",
390 link: "/cldsOpenModelProperties",
391 name: "Properties CL"
393 link: "/RevertChanges",
394 name: "Revert Model Changes"
400 link: "/cldsTestActivate",
401 name: "Validation Test"
406 link: "/cldsResubmit",
415 link: "/cldsRestart",
424 link: "/cldsUnDeploy",
428 link: "/refreshStatus",
429 name: "Refresh Status"
431 link: "/cldsRefreshASDC",
435 link: "http://wiki.onap.org",
441 link: "/extraUserInfo",
447 Object.keys = function(obj) {
451 if (obj.hasOwnProperty(i)) {
458 $scope.keyList = Object.keys($scope.tabs);
460 $scope.keyList = Object.keys($scope.tabs);
463 $scope.updatebreadcrumb = function(path) {
465 var currentURL = $location.path();
466 if (path != undefined) {
470 if (currentURL == "/dashboard") {
471 $rootScope.screenName = "Universal Test Modeler";
472 $rootScope.parentMenu = "Home";
473 $rootScope.rightTabName = "UTM Build Configuration";
476 * else if(currentURL=="/quicksearch") {
477 * $rootScope.screenName = "Quick Search";
478 * $rootScope.parentMenu = "Home"; }
486 function(value, key) {
489 $rootScope.parentMenu = value;
498 if (currentURL == value.link) {
499 $rootScope.screenName = value.name;
508 $scope.updatebreadcrumb();
510 $scope.homePage = function() {
512 $location.path('/dashboard');
514 $scope.propertyExplorerErrorMessage = function(msg) {
516 var dlg = dialogs.notify('Error', msg);
519 // $scope.fromTstMultipleFlag=false;
520 /* onclicking of review testset / generate testset */
522 $scope.reviewTestSet = function() {
524 $rootScope.modeltestset = list_model_test_sets[selected_model];
526 $rootScope.isPalette = false;
527 $rootScope.isTestset = true;
528 $rootScope.isRequirementCoverage = false;
529 document.getElementById("modeler_name").textContent = "UTM Test Set";
530 // document.getElementById('propertyExplorer').classList.add('visible');
532 // $( "#propertyExplorer" ).prev().css(
533 // "display", "none" );
534 $('div').find('.k-collapse-next').click();
536 // $rootScope.$apply();
539 $scope.requirementCoverage = function() {
541 $rootScope.testCaseRequirements = [];
542 $rootScope.validTestRequirementArray = [];
543 $rootScope.validTestRequirements = {};
544 $rootScope.modeltestset = list_model_test_sets[selected_model];
545 var allPathDetails = [];
546 $scope.currentSelectedModel = {};
547 // $scope.getPathDetails($rootScope.utmModels,selected_model);
548 // $scope.populatePathDetails(allPathDetails,$scope.currentSelectedModel);
549 $rootScope.pathDetailsList = list_model_path_details[selected_model];
551 * for(var p=0;p<100;p++){
552 * $rootScope.testCaseRequirements.push("Requirement"+p); }
553 * for(var p=0;p<100;p++){
554 * $rootScope.testCaseValue.push("TestCase"+p); }
556 for (var x = 0; x < allPathDetails.length; x++) {
557 var tempPathDetails = allPathDetails[x];
558 if (tempPathDetails != null) {
559 for (var i = 0; i < tempPathDetails.length; i++) {
560 var pathDetails = tempPathDetails[i];
561 if (pathDetails.requirement !== '' &&
562 pathDetails.requirement !== null) {
563 $rootScope.testCaseRequirements
564 .push(pathDetails.requirement);
568 * for (var j = 0; j <
569 * pathDetails.decisionIdentifiers.length;
571 * if(pathDetails.decisionIdentifiers[j].requirement
573 * pathDetails.decisionIdentifiers[j].requirement
575 * $rootScope.testCaseRequirements.push(pathDetails.decisionIdentifiers[j].requirement); } }
581 for (var p = 0; p < $rootScope.modeltestset.activityTestCases.length; p++) {
582 var activityTestCases = $rootScope.modeltestset.activityTestCases[p];
583 if (activityTestCases.mappedRequirements != null) {
584 for (var i = 0; i < activityTestCases.mappedRequirements.length; i++) {
585 // $rootScope.testCaseRequirements
586 // .push(activityTestCases.mappedRequirements[i]);
587 var testCaseNames = $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]];
588 if (testCaseNames == null) {
591 if (activityTestCases.version != null)
592 var testCase = activityTestCases.testCaseName +
594 activityTestCases.version;
596 var testCase = activityTestCases.testCaseName;
597 testCaseNames.push(testCase);
598 $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]] = testCaseNames;
603 $rootScope.isPalette = false;
604 $rootScope.isTestset = false;
605 $rootScope.isRequirementCoverage = true;
606 document.getElementById("modeler_name").textContent = "Test Case / Requirement Coverage";
608 $('div').find('.k-collapse-next').click();
613 $scope.activityModelling = function() {
617 $scope.cldsClose = function() {
621 'partials/portfolios/confirmation_window.html',
622 'CldsOpenModelCtrl', {
629 windowClass: 'my-class'
632 dlg.result.then(function(name) {
634 // $scope.name = name;
637 // if(angular.equals($scope.name,''))
638 // $scope.name = 'You did not enter in your
642 $scope.saveConfirmationNotificationPopUp = function(
647 'partials/portfolios/save_confirmation.html',
648 'saveConfirmationModalPopUpCtrl', {
655 windowClass: 'my-class'
658 dlg.result.then(function(name) {
666 $scope.cldsRefreshASDC = function() {
670 'partials/portfolios/refresh_asdc.html',
671 'CldsOpenModelCtrl', {
678 windowClass: 'my-class'
680 dlg.result.then(function(name) {
682 // $scope.name = name;
685 // if(angular.equals($scope.name,''))
686 // $scope.name = 'You did not enter in your
690 $scope.cldsRevertModel = function() {
694 'partials/portfolios/ConfirmRevertChanges.html',
695 'CldsOpenModelCtrl', {
702 windowClass: 'my-class'
705 dlg.result.then(function(name) {
707 // $scope.name = name;
710 // if(angular.equals($scope.name,''))
711 // $scope.name = 'You did not enter in your
717 $rootScope.cldsOpenModelProperties = function() {
721 'partials/portfolios/global_properties.html',
722 'GlobalPropertiesCtrl', {}, {
726 windowClass: 'my-class'
729 dlg.result.then(function(name) {}, function() {});
732 $scope.cldsOpenModel = function() {
736 'partials/portfolios/clds_open_model.html',
737 'CldsOpenModelCtrl', {
744 windowClass: 'my-class'
747 dlg.result.then(function(name) {
749 // $scope.name = name;
752 // if(angular.equals($scope.name,''))
753 // $scope.name = 'You did not enter in your
757 $scope.cldsCreateModel = function() {
761 'partials/portfolios/clds_create_model_off_Template.html',
762 'CldsOpenModelCtrl', {
769 windowClass: 'my-class'
772 dlg.result.then(function(name) {
774 // $scope.name = name;
777 // if(angular.equals($scope.name,''))
778 // $scope.name = 'You did not enter in your
783 $scope.extraUserInfo = function() {
787 'partials/portfolios/extra_user_info.html',
788 'ExtraUserInfoCtrl', {
795 windowClass: 'my-class'
798 dlg.result.then(function(name) {}, function() {});
801 $scope.cldsPerformAction = function(uiAction) {
803 var modelName = selected_model;
804 var controlNamePrefix = "ClosedLoop-";
805 var bpmnText = modelXML;
806 // serialize model properties
807 var propText = JSON.stringify(elementMap);
808 var templateName = selected_template
810 var svgXml = $("#svgContainer").html();
812 console.log("cldsPerformAction: " + uiAction +
813 " modelName=" + modelName);
814 console.log("cldsPerformAction: " + uiAction +
815 " controlNamePrefix=" +
817 console.log("cldsPerformAction: " + uiAction +
818 " bpmnText=" + bpmnText);
819 console.log("cldsPerformAction: " + uiAction +
820 " propText=" + propText);
821 console.log("cldsPerformAction: " + uiAction +
822 " typeID=" + typeID);
823 console.log("cldsPerformAction: " + uiAction +
824 " deploymentId=" + deploymentId);
826 .processAction(uiAction, modelName,
827 controlNamePrefix, bpmnText,
828 propText, svgXml, templateName,
829 typeID, deploymentId)
833 .log("cldsPerformAction: pars=" +
836 .processRefresh(pars);
840 // alert("setModel failed: "
844 $scope.refreshStatus = function() {
845 var modelName = selected_model;
846 var svgXml = $("#svgContainer").html();
847 console.log("refreStatus modelName=" + modelName);
853 .log("refreStatus: pars=" +
856 .processRefresh(pars);
861 $scope.cldsConfirmPerformAction = function(uiAction) {
862 var dlg = dialogs.confirm('Message',
864 uiAction.toLowerCase() +
865 ' the closed loop?');
866 dlg.result.then(function(btn) {
868 $scope.cldsPerformAction(uiAction);
871 // $modalInstance.close("closed");
875 $scope.cldsAskDeployParametersPerformAction = function() {
876 var dlg = dialogs.create('partials/portfolios/deploy_parameters.html',
878 {}, {keyboard: true, backdrop: true, windowClass: 'deploy-parameters'});
879 dlg.result.then(function() {
880 var confirm = dialogs.confirm('Deploy', 'Are you sure you want to deploy the closed loop?');
881 confirm.result.then(function() {
882 cldsToggleDeploy("deploy");
887 $scope.cldsConfirmToggleDeployPerformAction = function(
890 var dlg = dialogs.confirm('Message',
892 uiAction.toLowerCase() +
893 ' the closed loop?');
894 dlg.result.then(function(btn) {
895 cldsToggleDeploy(uiAction.toLowerCase());
898 // $modalInstance.close("closed");
902 function cldsToggleDeploy(uiAction) {
903 var modelName = selected_model;
904 var controlNamePrefix = "ClosedLoop-";
905 var bpmnText = modelXML;
906 // serialize model properties
907 var propText = JSON.stringify(elementMap);
908 var templateName = selected_template;
909 var svgXml = $("#svgContainer").html();
911 console.log("cldsPerformAction: " + uiAction +
912 " modelName=" + modelName);
913 console.log("cldsPerformAction: " + uiAction +
914 " controlNamePrefix=" +
916 console.log("cldsPerformAction: " + uiAction +
917 " bpmnText=" + bpmnText);
918 console.log("cldsPerformAction: " + uiAction +
919 " propText=" + propText);
920 console.log("cldsPerformAction: " + uiAction +
921 " modelEventService=" +
923 console.log("cldsPerformAction: " + uiAction +
924 " typeID=" + typeID);
925 console.log("cldsPerformAction: " + uiAction +
926 " deploymentId=" + deploymentId);
928 .toggleDeploy(uiAction, modelName,
929 controlNamePrefix, bpmnText,
930 propText, svgXml, templateName,
931 typeID, controlNameUuid,
932 modelEventService, deploymentId)
935 typeID = pars.typeId;
936 controlNameUuid = pars.controlNameUuid;
937 selected_template = pars.templateName;
938 modelEventService = pars.event;
940 // pars.event.actionCd;
941 actionStateCd = pars.event.actionStateCd;
942 deploymentId = pars.deploymentId;
944 .processActionResponse(
953 $scope.managePerformAction = function(action) {
954 if (action.toLowerCase() === "delete") {
958 "805b9f83-261f-48d9-98c7-8011fc2cc8e8",
959 "ClosedLoop-ABCD-0000.yml")
960 .then(function(pars) {
964 // alert("setModel failed: " +
969 $scope.manageConfirmPerformAction = function(
972 var dlg = dialogs.confirm('Message',
974 uiAction.toLowerCase() +
975 ' the closed loop?');
976 dlg.result.then(function(btn) {
978 $scope.managePerformAction(uiAction);
981 // $modalInstance.close("closed");
984 $scope.VesCollectorWindow = function(vesCollector) {
988 'partials/portfolios/vesCollector_properties.html',
989 'ImportSchemaCtrl', {
996 windowClass: 'my-class'
999 dlg.result.then(function(name) {
1008 $scope.HolmesWindow = function(holmes) {
1010 var partial = 'partials/portfolios/holmes_properties.html'
1023 windowClass: 'my-class'
1027 $scope.TCAWindow = function(tca) {
1031 'partials/portfolios/tca_properties.html',
1032 'ImportSchemaCtrl', {
1039 windowClass: 'my-class'
1042 dlg.result.then(function(name) {
1043 // $scope.name = name;
1045 // if(angular.equals($scope.name,''))
1046 // $scope.name = 'You did not enter in
1052 $scope.PolicyWindow = function(policy) {
1055 'partials/portfolios/PolicyWindow_properties.html',
1056 'ImportSchemaCtrl', {
1063 windowClass: 'my-class'
1066 dlg.result.then(function(name) {
1068 // $scope.name = name;
1071 // if(angular.equals($scope.name,''))
1072 // $scope.name = 'You did not enter in
1081 app.service('MenuService', ['$http', '$q', function($http, $q) {
1084 * this.generateMDTTestSet = function(utmMDTRequest, generateTestSetMDTURL){
1086 * console.log("generateMDTTestSet"); //alert("In generateMDTTestSet :: " +
1087 * JSON.stringify(utmMDTRequest)); var def = $q.defer(); var sets = [];
1089 * $http.post(generateTestSetMDTURL, utmMDTRequest) .success(function(data){
1090 * console.log("success"); sets = data; def.resolve(data); })
1091 * .error(function(data){ console.log("error");
1092 * def.reject("GenerateMDTTestSet not successful"); });
1094 * return def.promise; };
1098 app.directive('focus', function($timeout) {
1104 link: function(scope, element) {
1105 scope.$watch('trigger', function(value) {
1107 if (value === "true") {
1108 $timeout(function() {
1117 app.directive('draggable', function($document) {
1119 return function(scope, element, attr) {
1126 position: 'relative',
1128 backgroundColor: 'white',
1133 element.on('mousedown', function(event) {
1135 // Prevent default dragging of selected content
1136 // event.preventDefault();
1137 startX = event.screenX - x;
1138 startY = event.screenY - y;
1139 $document.on('mousemove', mousemove);
1140 $document.on('mouseup', mouseup);
1143 function mousemove(event) {
1145 y = event.screenY - startY;
1146 x = event.screenX - startX;
1153 function mouseup() {
1155 $document.off('mousemove', mousemove);
1156 $document.off('mouseup', mouseup);
1161 app.factory('myHttpInterceptor', function($q, $window) {
1163 return function(promise) {
1165 return promise.then(function(response) {
1168 }, function(response) {
1170 return $q.reject(response);
1175 app.run(['$route', function($route) {
1180 function TestCtrl($scope) {
1182 $scope.msg = "Hello from a controller method.";
1183 $scope.returnHello = function() {
1189 function importshema() {
1191 angular.element(document.getElementById('navbar')).scope().importSchema();
1195 function VesCollectorWindow(vesCollectorWin) {
1196 angular.element(document.getElementById('navbar')).scope()
1197 .VesCollectorWindow(vesCollectorWin);
1200 function HolmesWindow(holmesWin) {
1201 angular.element(document.getElementById('navbar')).scope()
1202 .HolmesWindow(holmesWin);
1205 function F5Window() {
1207 angular.element(document.getElementById('navbar')).scope().F5Window();
1211 function TCAWindow(tca) {
1213 angular.element(document.getElementById('navbar')).scope().TCAWindow(tca);
1217 function GOCWindow() {
1219 angular.element(document.getElementById('navbar')).scope().GOCWindow();
1223 function PolicyWindow(PolicyWin) {
1225 angular.element(document.getElementById('navbar')).scope().PolicyWindow(
1230 function pathDetails(bpmnElementID, bpmnElementName, pathIdentifiers) {
1232 angular.element(document.getElementById('navbar')).scope().pathDetails(
1233 bpmnElementID, bpmnElementName, pathIdentifiers);
1237 function setdefaultvalue() {
1239 angular.element(document.getElementById('navbar')).scope()
1244 function upgradeSchemaVersion() {
1246 angular.element(document.getElementById('navbar')).scope()
1247 .upgradeSchemaVersion();
1251 function saveProject() {
1253 angular.element(document.getElementById('navbar')).scope().saveProject();
1257 function modifySchema() {
1259 angular.element(document.getElementById('navbar')).scope().modifySchema();
1263 function definePID() {
1265 angular.element(document.getElementById('navbar')).scope().definePID();
1269 function defineServiceAcronym() {
1271 angular.element(document.getElementById('navbar')).scope()
1272 .defineServiceAcronym();
1276 function errorProperty(msg) {
1278 angular.element(document.getElementById('navbar')).scope()
1279 .propertyExplorerErrorMessage(msg);
1282 function invisiblepropertyExplorer() {
1284 angular.element(document.getElementById('navbar')).scope()
1285 .invisibleproperty();
1288 function updateDecisionLabel(originalLabel, newLabel) {
1290 angular.element(document.getElementById('navbar')).scope()
1291 .updateDecisionLabels(originalLabel, newLabel);
1294 // Used to logout the session , when browser window was closed
1295 window.onunload = function() {
1296 window.localStorage.removeItem("isAuth");
1297 window.localStorage.removeItem("loginuser");
1298 window.localStorage.removeItem("invalidUser");