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',
30 'angularjs-dropdown-multiselect',
31 'angularjs-dropdown-multiselect-new',
34 'angular-loading-bar',
38 'ui.grid.resizeColumns',
50 .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
52 cfpLoadingBarProvider.includeBar = true;
53 cfpLoadingBarProvider.includeSpinner = true;
56 function($httpProvider) {
58 $httpProvider.responseInterceptors
59 .push('myHttpInterceptor');
61 var spinnerFunction = function spinnerFunction(data,
67 $httpProvider.defaults.transformRequest
68 .push(spinnerFunction);
75 'cfpLoadingBarProvider',
76 function($routeProvider, $locationProvider,
77 cfpLoadingBarProvider, $timeout, dialogs,
79 $locationProvider.html5Mode(false);
84 templateUrl: 'please_wait.html',
85 controller: QueryParamsHandlerCtrl
88 // when('/dashboard_submit', { templateUrl:
89 // 'partials/portfolios/dashboard_submit.html',
90 // controller: CreateNewPrjCtrl }).
93 templateUrl: 'partials/portfolios/clds_modelling.html',
94 controller: DashboardCtrl
97 // when('/dashboard_upload', { templateUrl:
98 // 'partials/portfolios/dashboard_upload.html',
99 // controller: DashboardCtrl }).
101 '/activity_modelling', {
102 templateUrl: 'partials/portfolios/clds_modelling.html',
103 controller: DashboardCtrl
104 }).when('/authenticate', {
105 templateUrl: 'authenticate.html',
106 controller: AuthenticateCtrl
107 }).when('/invalidlogin', {
108 templateUrl: 'invalid_login.html',
109 controller: PageUnderConstructionCtrl
111 redirectTo: '/otherwise'
118 function($scope, $rootScope, $timeout, dialogs) {
122 $scope.lang = 'en-US';
123 $scope.language = 'English';
128 $scope.confirmed = 'No confirmation yet!';
134 // -- Listeners & Watchers --//
136 $scope.$watch('lang', function(val, old) {
140 $scope.language = 'English';
143 $scope.language = 'Spanish';
149 $rootScope.testCaseRequirements = [];
150 $rootScope.validTestRequirements = [];
151 /* $rootScope.testCaseValue=[]; */
152 $scope.setLanguage = function(lang) {
155 $translate.use(lang);
158 $rootScope.launch = function(which) {
166 // dialogs.wait(undefined,undefined,_progress);
167 // _fakeWaitProgress();
170 // var dlg = dialogs.wait('Custom Wait
171 // Header','Custom Wait Message',_progress);
172 // _fakeWaitProgress();
178 var dlg = dialogs.confirm();
179 dlg.result.then(function(btn) {
181 $scope.confirmed = 'You confirmed "Yes."';
184 $scope.confirmed = 'You confirmed "No."';
188 var dlg = dialogs.create('/dialogs/custom.html',
189 'customDialogCtrl', {}, {
193 windowClass: 'my-class'
203 if (angular.equals($scope.name,
205 $scope.name = 'You did not enter in your name!';
209 var dlg = dialogs.create('/dialogs/custom2.html',
210 'customDialogCtrl2', $scope.custom, {
218 'All is not supported, Please select interface(s)/version(s) to fetch real time federated coverage report.');
224 'You are about to fetch real time federated coverage report.This may take sometime!!!.');
225 dlg.result.then(function(btn) {
227 $scope.confirmed = 'You confirmed "Yes."';
230 $scope.confirmed = 'You confirmed "No."';
234 var dlg = dialogs.notify('Success',
235 'Request has been successfully processed.');
238 var dlg = dialogs.notify('Message',
239 'Please type Testscenario Name');
244 var _fakeWaitProgress = function() {
246 $timeout(function() {
248 if (_progress < 100) {
250 $rootScope.$broadcast('dialogs.wait.progress', {
251 'progress': _progress
255 $rootScope.$broadcast('dialogs.wait.complete');
270 'userPreferencesService',
272 'extraUserInfoService',
273 function($scope, $rootScope, $timeout, dialogs,
274 $location, MenuService, Datafactory,
275 userPreferencesService, cldsModelService, extraUserInfoService) {
276 console.log("MenuCtrl");
277 $rootScope.screenName = "Universal Test Modeler";
278 $rootScope.testSet = null;
279 var testingType = "";
280 $rootScope.contactUs = function() {
281 console.log("contactUs");
282 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.";
283 window.location.href = link;
290 $scope.userInfo = pars;
291 if (!($scope.userInfo["permissionUpdateCl"])) {
296 $scope.emptyMenuClick = function(value, name) {
297 if ($rootScope.isNewClosed &&
299 name != "Close Model" &&
300 name != "Properties CL") {
301 saveConfirmationNotificationPopUp();
306 function saveConfirmationNotificationPopUp() {
308 .saveConfirmationNotificationPopUp(function(
311 if ($rootScope.isNewClosed) {
312 isSaveCheck("Save CL");
314 $rootScope.isNewClosed = false;
321 function isSaveCheck(name) {
322 if (name == "User Info") {
323 $scope.extraUserInfo();
324 } else if (name == "Wiki") {
326 } else if (name == "Contact Us") {
327 $rootScope.contactUs();
328 } else if (name == "Revert Model Changes") {
329 $scope.cldsRevertModel();
330 } else if (name == "Close Model") {
332 } else if (name == "Refresh ASDC") {
333 $scope.cldsRefreshASDC();
334 } else if (name == "Create CL") {
335 $rootScope.isNewClosed = true;
336 $scope.cldsCreateModel();
337 } else if (name == "Open CL") {
338 $scope.cldsOpenModel();
339 } else if (name == "Save CL") {
340 $rootScope.isNewClosed = false;
341 $scope.cldsPerformAction("SAVE");
342 } else if (name == "Validation Test") {
343 $scope.cldsPerformAction("TEST");
344 } else if (name == "Submit") {
346 .cldsConfirmPerformAction("SUBMIT");
347 } else if (name == "Resubmit") {
349 .cldsConfirmPerformAction("RESUBMIT");
350 } else if (name == "Update") {
352 .cldsConfirmPerformAction("UPDATE");
353 } else if (name.toLowerCase() == "delete") {
355 .manageConfirmPerformAction("DELETE");
356 } else if (name == "Stop") {
357 $scope.cldsConfirmPerformAction("STOP");
358 } else if (name == "Restart") {
360 .cldsConfirmPerformAction("RESTART");
361 } else if (name == "Refresh Status") {
362 $scope.refreshStatus();
363 } else if (name == "Properties CL") {
364 $scope.cldsOpenModelProperties();
365 } else if (name == "Deploy") {
367 .cldsAskDeployParametersPerformAction();
368 } else if (name == "UnDeploy") {
370 .cldsConfirmToggleDeployPerformAction("UnDeploy");
372 $rootScope.screenName = name;
373 $scope.updatebreadcrumb(value);
374 $location.path(value);
379 $rootScope.impAlerts = function() {
385 link: "/cldsCreateModel",
388 link: "/cldsOpenModel",
391 link: "/cldsSaveModel",
394 link: "/cldsOpenModelProperties",
395 name: "Properties CL"
397 link: "/RevertChanges",
398 name: "Revert Model Changes"
404 link: "/cldsTestActivate",
405 name: "Validation Test"
410 link: "/cldsResubmit",
419 link: "/cldsRestart",
428 link: "/cldsUnDeploy",
432 link: "/refreshStatus",
433 name: "Refresh Status"
435 link: "/cldsRefreshASDC",
439 link: "http://wiki.onap.org",
445 link: "/extraUserInfo",
451 Object.keys = function(obj) {
455 if (obj.hasOwnProperty(i)) {
462 $scope.keyList = Object.keys($scope.tabs);
464 $scope.keyList = Object.keys($scope.tabs);
467 $scope.updatebreadcrumb = function(path) {
469 var currentURL = $location.path();
470 if (path != undefined) {
474 if (currentURL == "/dashboard") {
475 $rootScope.screenName = "Universal Test Modeler";
476 $rootScope.parentMenu = "Home";
477 $rootScope.rightTabName = "UTM Build Configuration";
480 * else if(currentURL=="/quicksearch") {
481 * $rootScope.screenName = "Quick Search";
482 * $rootScope.parentMenu = "Home"; }
490 function(value, key) {
493 $rootScope.parentMenu = value;
502 if (currentURL == value.link) {
503 $rootScope.screenName = value.name;
512 $scope.updatebreadcrumb();
514 $scope.createNewProject = function() {
516 if ($rootScope.projectName != null) {
519 'Do you want to over-write the project ?');
525 $scope.clearProject();
528 'partials/portfolios/create_new_project.html',
529 'CreateNewPrjCtrl', {}, {
533 windowClass: 'my-class'
543 // if(angular.equals($scope.name,''))
554 // $modalInstance.close("closed");
560 'partials/portfolios/create_new_project.html',
561 'CreateNewPrjCtrl', {}, {
565 windowClass: 'my-class'
567 dlg.result.then(function(name) {
569 // $scope.name = name;
572 // if(angular.equals($scope.name,''))
573 // $scope.name = 'You did not enter in
580 $scope.clearProject = function() {
582 $rootScope.projectName = null;
583 $rootScope.revision = -1;
584 // $rootScope.models.length=0;
585 $rootScope.utmModels = $rootScope.$new(true);
586 $rootScope.serviceInfo = $rootScope.$new(true);
587 $rootScope.serviceInfo = null;
588 $rootScope.serviceInputPartInfo = $rootScope
590 $rootScope.serviceOutputPartInfo = $rootScope
592 $rootScope.servicefaultPartInfo = $rootScope
594 $rootScope.isModel = false;
595 $("#paletteDiv").load(
596 './modeler/dist/index.html');
597 $rootScope.isPalette = false;
598 $rootScope.isTestset = false;
599 $rootScope.isRequirementCoverage = false;
600 $rootScope.ispropertyExplorer = false;
601 // $("#propertyDiv").load('./partials/portfolios/Property_Explorer.html');
602 $rootScope.modelName = "";
603 // document.getElementById('propertyExplorer').classList.remove('visible');
604 document.getElementById("modeler_name").textContent = "Activity Modeler";
605 // $( "#propertyExplorer" ).prev().css(
606 // "display", "block" );
607 $("#activity_modeler").prev().css("display",
609 $('div').find('.k-expand-next').click();
615 $scope.homePage = function() {
617 $location.path('/dashboard');
619 $scope.propertyExplorerErrorMessage = function(msg) {
621 var dlg = dialogs.notify('Error', msg);
624 // $scope.fromTstMultipleFlag=false;
625 /* onclicking of review testset / generate testset */
627 $scope.reviewTestSet = function() {
629 $rootScope.modeltestset = list_model_test_sets[selected_model];
631 $rootScope.isPalette = false;
632 $rootScope.isTestset = true;
633 $rootScope.isRequirementCoverage = false;
634 document.getElementById("modeler_name").textContent = "UTM Test Set";
635 // document.getElementById('propertyExplorer').classList.add('visible');
637 // $( "#propertyExplorer" ).prev().css(
638 // "display", "none" );
639 $('div').find('.k-collapse-next').click();
641 // $rootScope.$apply();
644 $scope.requirementCoverage = function() {
646 $rootScope.testCaseRequirements = [];
647 $rootScope.validTestRequirementArray = [];
648 $rootScope.validTestRequirements = {};
649 $rootScope.modeltestset = list_model_test_sets[selected_model];
650 var allPathDetails = [];
651 $scope.currentSelectedModel = {};
652 // $scope.getPathDetails($rootScope.utmModels,selected_model);
653 // $scope.populatePathDetails(allPathDetails,$scope.currentSelectedModel);
654 $rootScope.pathDetailsList = list_model_path_details[selected_model];
656 * for(var p=0;p<100;p++){
657 * $rootScope.testCaseRequirements.push("Requirement"+p); }
658 * for(var p=0;p<100;p++){
659 * $rootScope.testCaseValue.push("TestCase"+p); }
661 for (var x = 0; x < allPathDetails.length; x++) {
662 var tempPathDetails = allPathDetails[x];
663 if (tempPathDetails != null) {
664 for (var i = 0; i < tempPathDetails.length; i++) {
665 var pathDetails = tempPathDetails[i];
666 if (pathDetails.requirement !== '' &&
667 pathDetails.requirement !== null) {
668 $rootScope.testCaseRequirements
669 .push(pathDetails.requirement);
673 * for (var j = 0; j <
674 * pathDetails.decisionIdentifiers.length;
676 * if(pathDetails.decisionIdentifiers[j].requirement
678 * pathDetails.decisionIdentifiers[j].requirement
680 * $rootScope.testCaseRequirements.push(pathDetails.decisionIdentifiers[j].requirement); } }
686 for (var p = 0; p < $rootScope.modeltestset.activityTestCases.length; p++) {
687 var activityTestCases = $rootScope.modeltestset.activityTestCases[p];
688 if (activityTestCases.mappedRequirements != null) {
689 for (var i = 0; i < activityTestCases.mappedRequirements.length; i++) {
690 // $rootScope.testCaseRequirements
691 // .push(activityTestCases.mappedRequirements[i]);
692 var testCaseNames = $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]];
693 if (testCaseNames == null) {
696 if (activityTestCases.version != null)
697 var testCase = activityTestCases.testCaseName +
699 activityTestCases.version;
701 var testCase = activityTestCases.testCaseName;
702 testCaseNames.push(testCase);
703 $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]] = testCaseNames;
708 $rootScope.isPalette = false;
709 $rootScope.isTestset = false;
710 $rootScope.isRequirementCoverage = true;
711 document.getElementById("modeler_name").textContent = "Test Case / Requirement Coverage";
712 // document.getElementById('propertyExplorer').classList.add('visible');
713 // console.log("modeltestset"+JSON.stringify($rootScope.modeltestset));
714 // $( "#propertyExplorer" ).prev().css(
715 // "display", "none" );
716 $('div').find('.k-collapse-next').click();
717 // $rootScope.$apply();
721 $scope.activityModelling = function() {
723 // window.open("./bpmn-js-examples-master/modeler/dist/index.html",
725 // $location.path('/activity_modelling');
728 * $scope.openProject = function(){
729 * $location.path('/dashboard_upload'); };
732 $scope.cldsClose = function() {
736 'partials/portfolios/confirmation_window.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.saveConfirmationNotificationPopUp = function(
762 'partials/portfolios/save_confirmation.html',
763 'saveConfirmationModalPopUpCtrl', {
770 windowClass: 'my-class'
773 dlg.result.then(function(name) {
781 $scope.cldsRefreshASDC = function() {
785 'partials/portfolios/refresh_asdc.html',
786 'CldsOpenModelCtrl', {
793 windowClass: 'my-class'
795 dlg.result.then(function(name) {
797 // $scope.name = name;
800 // if(angular.equals($scope.name,''))
801 // $scope.name = 'You did not enter in your
805 $scope.cldsRevertModel = function() {
809 'partials/portfolios/ConfirmRevertChanges.html',
810 'CldsOpenModelCtrl', {
817 windowClass: 'my-class'
820 dlg.result.then(function(name) {
822 // $scope.name = name;
825 // if(angular.equals($scope.name,''))
826 // $scope.name = 'You did not enter in your
832 $rootScope.cldsOpenModelProperties = function() {
836 'partials/portfolios/global_properties.html',
837 'GlobalPropertiesCtrl', {}, {
841 windowClass: 'my-class'
844 dlg.result.then(function(name) {}, function() {});
847 $scope.cldsOpenModel = function() {
851 'partials/portfolios/clds_open_model.html',
852 'CldsOpenModelCtrl', {
859 windowClass: 'my-class'
862 dlg.result.then(function(name) {
864 // $scope.name = name;
867 // if(angular.equals($scope.name,''))
868 // $scope.name = 'You did not enter in your
872 $scope.cldsCreateModel = function() {
876 'partials/portfolios/clds_create_model_off_Template.html',
877 'CldsOpenModelCtrl', {
884 windowClass: 'my-class'
887 dlg.result.then(function(name) {
889 // $scope.name = name;
892 // if(angular.equals($scope.name,''))
893 // $scope.name = 'You did not enter in your
898 $scope.extraUserInfo = function() {
902 'partials/portfolios/extra_user_info.html',
903 'ExtraUserInfoCtrl', {
910 windowClass: 'my-class'
913 dlg.result.then(function(name) {}, function() {});
916 $scope.cldsPerformAction = function(uiAction) {
918 var modelName = selected_model;
919 var controlNamePrefix = "ClosedLoop-";
920 var bpmnText = modelXML;
921 // serialize model properties
922 var propText = JSON.stringify(elementMap);
923 var templateName = selected_template
925 var svgXml = $("#svgContainer").html();
927 console.log("cldsPerformAction: " + uiAction +
928 " modelName=" + modelName);
929 console.log("cldsPerformAction: " + uiAction +
930 " controlNamePrefix=" +
932 console.log("cldsPerformAction: " + uiAction +
933 " bpmnText=" + bpmnText);
934 console.log("cldsPerformAction: " + uiAction +
935 " propText=" + propText);
936 console.log("cldsPerformAction: " + uiAction +
937 " typeID=" + typeID);
938 console.log("cldsPerformAction: " + uiAction +
939 " deploymentId=" + deploymentId);
941 .processAction(uiAction, modelName,
942 controlNamePrefix, bpmnText,
943 propText, svgXml, templateName,
944 typeID, deploymentId)
948 .log("cldsPerformAction: pars=" +
951 .processRefresh(pars);
955 // alert("setModel failed: "
959 $scope.refreshStatus = function() {
960 var modelName = selected_model;
961 var svgXml = $("#svgContainer").html();
962 console.log("refreStatus modelName=" + modelName);
968 .log("refreStatus: pars=" +
971 .processRefresh(pars);
976 $scope.cldsConfirmPerformAction = function(uiAction) {
977 var dlg = dialogs.confirm('Message',
979 uiAction.toLowerCase() +
980 ' the closed loop?');
981 dlg.result.then(function(btn) {
983 $scope.cldsPerformAction(uiAction);
986 // $modalInstance.close("closed");
990 $scope.cldsAskDeployParametersPerformAction = function() {
991 var dlg = dialogs.create('partials/portfolios/deploy_parameters.html',
993 {}, {keyboard: true, backdrop: true, windowClass: 'deploy-parameters'});
994 dlg.result.then(function() {
995 var confirm = dialogs.confirm('Deploy', 'Are you sure you want to deploy the closed loop?');
996 confirm.result.then(function() {
997 cldsToggleDeploy("deploy");
1002 $scope.cldsConfirmToggleDeployPerformAction = function(
1005 var dlg = dialogs.confirm('Message',
1007 uiAction.toLowerCase() +
1008 ' the closed loop?');
1009 dlg.result.then(function(btn) {
1010 cldsToggleDeploy(uiAction.toLowerCase());
1013 // $modalInstance.close("closed");
1017 function cldsToggleDeploy(uiAction) {
1018 var modelName = selected_model;
1019 var controlNamePrefix = "ClosedLoop-";
1020 var bpmnText = modelXML;
1021 // serialize model properties
1022 var propText = JSON.stringify(elementMap);
1023 var templateName = selected_template;
1024 var svgXml = $("#svgContainer").html();
1026 console.log("cldsPerformAction: " + uiAction +
1027 " modelName=" + modelName);
1028 console.log("cldsPerformAction: " + uiAction +
1029 " controlNamePrefix=" +
1031 console.log("cldsPerformAction: " + uiAction +
1032 " bpmnText=" + bpmnText);
1033 console.log("cldsPerformAction: " + uiAction +
1034 " propText=" + propText);
1035 console.log("cldsPerformAction: " + uiAction +
1036 " modelEventService=" +
1038 console.log("cldsPerformAction: " + uiAction +
1039 " typeID=" + typeID);
1040 console.log("cldsPerformAction: " + uiAction +
1041 " deploymentId=" + deploymentId);
1043 .toggleDeploy(uiAction, modelName,
1044 controlNamePrefix, bpmnText,
1045 propText, svgXml, templateName,
1046 typeID, controlNameUuid,
1047 modelEventService, deploymentId)
1050 typeID = pars.typeId;
1051 controlNameUuid = pars.controlNameUuid;
1052 selected_template = pars.templateName;
1053 modelEventService = pars.event;
1055 // pars.event.actionCd;
1056 actionStateCd = pars.event.actionStateCd;
1057 deploymentId = pars.deploymentId;
1059 .processActionResponse(
1068 $scope.managePerformAction = function(action) {
1069 if (action.toLowerCase() === "delete") {
1073 "805b9f83-261f-48d9-98c7-8011fc2cc8e8",
1074 "ClosedLoop-ABCD-0000.yml")
1075 .then(function(pars) {
1079 // alert("setModel failed: " +
1084 $scope.manageConfirmPerformAction = function(
1087 var dlg = dialogs.confirm('Message',
1089 uiAction.toLowerCase() +
1090 ' the closed loop?');
1091 dlg.result.then(function(btn) {
1093 $scope.managePerformAction(uiAction);
1096 // $modalInstance.close("closed");
1099 $scope.VesCollectorWindow = function(vesCollector) {
1103 'partials/portfolios/vesCollector_properties.html',
1104 'ImportSchemaCtrl', {
1111 windowClass: 'my-class'
1114 dlg.result.then(function(name) {
1123 $scope.HolmesWindow = function(holmes) {
1125 var partial = 'partials/portfolios/holmes_properties.html'
1138 windowClass: 'my-class'
1142 $scope.TCAWindow = function(tca) {
1146 'partials/portfolios/tca_properties.html',
1147 'ImportSchemaCtrl', {
1154 windowClass: 'my-class'
1157 dlg.result.then(function(name) {
1158 // $scope.name = name;
1160 // if(angular.equals($scope.name,''))
1161 // $scope.name = 'You did not enter in
1167 $scope.PolicyWindow = function(policy) {
1170 'partials/portfolios/PolicyWindow_properties.html',
1171 'ImportSchemaCtrl', {
1178 windowClass: 'my-class'
1181 dlg.result.then(function(name) {
1183 // $scope.name = name;
1186 // if(angular.equals($scope.name,''))
1187 // $scope.name = 'You did not enter in
1196 app.service('MenuService', ['$http', '$q', function($http, $q) {
1199 * this.generateMDTTestSet = function(utmMDTRequest, generateTestSetMDTURL){
1201 * console.log("generateMDTTestSet"); //alert("In generateMDTTestSet :: " +
1202 * JSON.stringify(utmMDTRequest)); var def = $q.defer(); var sets = [];
1204 * $http.post(generateTestSetMDTURL, utmMDTRequest) .success(function(data){
1205 * console.log("success"); sets = data; def.resolve(data); })
1206 * .error(function(data){ console.log("error");
1207 * def.reject("GenerateMDTTestSet not successful"); });
1209 * return def.promise; };
1213 app.directive('focus', function($timeout) {
1219 link: function(scope, element) {
1220 scope.$watch('trigger', function(value) {
1222 if (value === "true") {
1223 $timeout(function() {
1232 app.directive('draggable', function($document) {
1234 return function(scope, element, attr) {
1241 position: 'relative',
1243 backgroundColor: 'white',
1248 element.on('mousedown', function(event) {
1250 // Prevent default dragging of selected content
1251 // event.preventDefault();
1252 startX = event.screenX - x;
1253 startY = event.screenY - y;
1254 $document.on('mousemove', mousemove);
1255 $document.on('mouseup', mouseup);
1258 function mousemove(event) {
1260 y = event.screenY - startY;
1261 x = event.screenX - startX;
1268 function mouseup() {
1270 $document.off('mousemove', mousemove);
1271 $document.off('mouseup', mouseup);
1276 app.factory('myHttpInterceptor', function($q, $window) {
1278 return function(promise) {
1280 return promise.then(function(response) {
1283 }, function(response) {
1285 return $q.reject(response);
1290 app.run(['$route', function($route) {
1295 function TestCtrl($scope) {
1297 $scope.msg = "Hello from a controller method.";
1298 $scope.returnHello = function() {
1304 function importshema() {
1306 angular.element(document.getElementById('navbar')).scope().importSchema();
1310 function VesCollectorWindow(vesCollectorWin) {
1311 angular.element(document.getElementById('navbar')).scope()
1312 .VesCollectorWindow(vesCollectorWin);
1315 function HolmesWindow(holmesWin) {
1316 angular.element(document.getElementById('navbar')).scope()
1317 .HolmesWindow(holmesWin);
1320 function F5Window() {
1322 angular.element(document.getElementById('navbar')).scope().F5Window();
1326 function TCAWindow(tca) {
1328 angular.element(document.getElementById('navbar')).scope().TCAWindow(tca);
1332 function GOCWindow() {
1334 angular.element(document.getElementById('navbar')).scope().GOCWindow();
1338 function PolicyWindow(PolicyWin) {
1340 angular.element(document.getElementById('navbar')).scope().PolicyWindow(
1345 function pathDetails(bpmnElementID, bpmnElementName, pathIdentifiers) {
1347 angular.element(document.getElementById('navbar')).scope().pathDetails(
1348 bpmnElementID, bpmnElementName, pathIdentifiers);
1352 function setdefaultvalue() {
1354 angular.element(document.getElementById('navbar')).scope()
1359 function upgradeSchemaVersion() {
1361 angular.element(document.getElementById('navbar')).scope()
1362 .upgradeSchemaVersion();
1366 function saveProject() {
1368 angular.element(document.getElementById('navbar')).scope().saveProject();
1372 function modifySchema() {
1374 angular.element(document.getElementById('navbar')).scope().modifySchema();
1378 function definePID() {
1380 angular.element(document.getElementById('navbar')).scope().definePID();
1384 function defineServiceAcronym() {
1386 angular.element(document.getElementById('navbar')).scope()
1387 .defineServiceAcronym();
1391 function errorProperty(msg) {
1393 angular.element(document.getElementById('navbar')).scope()
1394 .propertyExplorerErrorMessage(msg);
1397 function invisiblepropertyExplorer() {
1399 angular.element(document.getElementById('navbar')).scope()
1400 .invisibleproperty();
1403 function updateDecisionLabel(originalLabel, newLabel) {
1405 angular.element(document.getElementById('navbar')).scope()
1406 .updateDecisionLabels(originalLabel, newLabel);
1409 // Used to logout the session , when browser window was closed
1410 window.onunload = function() {
1411 window.localStorage.removeItem("isAuth");
1412 window.localStorage.removeItem("loginuser");
1413 window.localStorage.removeItem("invalidUser");