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 * ===================================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
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',
51 .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
53 cfpLoadingBarProvider.includeBar = true;
54 cfpLoadingBarProvider.includeSpinner = true;
57 function($httpProvider) {
59 $httpProvider.responseInterceptors
60 .push('myHttpInterceptor');
62 var spinnerFunction = function spinnerFunction(data,
68 $httpProvider.defaults.transformRequest
69 .push(spinnerFunction);
76 'cfpLoadingBarProvider',
77 function($routeProvider, $locationProvider,
78 cfpLoadingBarProvider, $timeout, dialogs,
81 .log("$routeProvider','$locationProvider', '$compileProvider','cfpLoadingBarProvider','md5'")
82 $locationProvider.html5Mode(false);
87 templateUrl: 'please_wait.html',
88 controller: QueryParamsHandlerCtrl
91 // when('/dashboard_submit', { templateUrl:
92 // 'partials/portfolios/dashboard_submit.html',
93 // controller: CreateNewPrjCtrl }).
96 templateUrl: 'partials/portfolios/clds_modelling.html',
97 controller: DashboardCtrl
100 // when('/dashboard_upload', { templateUrl:
101 // 'partials/portfolios/dashboard_upload.html',
102 // controller: DashboardCtrl }).
104 '/activity_modelling', {
105 templateUrl: 'partials/portfolios/clds_modelling.html',
106 controller: DashboardCtrl
107 }).when('/authenticate', {
108 templateUrl: 'authenticate.html',
109 controller: AuthenticateCtrl
110 }).when('/invalidlogin', {
111 templateUrl: 'invalid_login.html',
112 controller: PageUnderConstructionCtrl
114 redirectTo: '/otherwise'
121 function($scope, $rootScope, $timeout, dialogs) {
125 $scope.lang = 'en-US';
126 $scope.language = 'English';
131 $scope.confirmed = 'No confirmation yet!';
137 // -- Listeners & Watchers --//
139 $scope.$watch('lang', function(val, old) {
143 $scope.language = 'English';
146 $scope.language = 'Spanish';
152 $rootScope.testCaseRequirements = [];
153 $rootScope.validTestRequirements = [];
154 /* $rootScope.testCaseValue=[]; */
155 $scope.setLanguage = function(lang) {
158 $translate.use(lang);
161 $rootScope.launch = function(which) {
169 // dialogs.wait(undefined,undefined,_progress);
170 // _fakeWaitProgress();
173 // var dlg = dialogs.wait('Custom Wait
174 // Header','Custom Wait Message',_progress);
175 // _fakeWaitProgress();
181 var dlg = dialogs.confirm();
182 dlg.result.then(function(btn) {
184 $scope.confirmed = 'You confirmed "Yes."';
187 $scope.confirmed = 'You confirmed "No."';
191 var dlg = dialogs.create('/dialogs/custom.html',
192 'customDialogCtrl', {}, {
196 windowClass: 'my-class'
206 if (angular.equals($scope.name,
208 $scope.name = 'You did not enter in your name!';
212 var dlg = dialogs.create('/dialogs/custom2.html',
213 'customDialogCtrl2', $scope.custom, {
221 'All is not supported, Please select interface(s)/version(s) to fetch real time federated coverage report.');
227 'You are about to fetch real time federated coverage report.This may take sometime!!!.');
228 dlg.result.then(function(btn) {
230 $scope.confirmed = 'You confirmed "Yes."';
233 $scope.confirmed = 'You confirmed "No."';
237 var dlg = dialogs.notify('Success',
238 'Request has been successfully processed.');
241 var dlg = dialogs.notify('Message',
242 'Please type Testscenario Name');
247 var _fakeWaitProgress = function() {
249 $timeout(function() {
251 if (_progress < 100) {
253 $rootScope.$broadcast('dialogs.wait.progress', {
254 'progress': _progress
258 $rootScope.$broadcast('dialogs.wait.complete');
273 'userPreferencesService',
275 'extraUserInfoService',
276 function($scope, $rootScope, $timeout, dialogs,
277 $location, MenuService, Datafactory,
278 userPreferencesService, cldsModelService, extraUserInfoService) {
279 console.log("MenuCtrl");
280 $rootScope.screenName = "Universal Test Modeler";
281 $rootScope.testSet = null;
282 var testingType = "";
283 $rootScope.contactUs = function() {
284 console.log("contactUs");
285 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.";
286 window.location.href = link;
293 $scope.userInfo = pars;
294 if (!($scope.userInfo["permissionUpdateCl"])) {
299 $scope.emptyMenuClick = function(value, name) {
300 if ($rootScope.isNewClosed &&
302 name != "Close Model" &&
303 name != "Properties CL") {
304 saveConfirmationNotificationPopUp();
309 function saveConfirmationNotificationPopUp() {
311 .saveConfirmationNotificationPopUp(function(
314 if ($rootScope.isNewClosed) {
315 isSaveCheck("Save CL");
317 $rootScope.isNewClosed = false;
324 function isSaveCheck(name) {
325 if (name == "User Info") {
326 $scope.extraUserInfo();
327 } else if (name == "Wiki") {
329 } else if (name == "Contact Us") {
330 $rootScope.contactUs();
331 } else if (name == "Log Out") {
333 } else if (name == "Revert Model Changes") {
334 $scope.cldsRevertModel();
335 } else if (name == "Close Model") {
337 } else if (name == "Refresh ASDC") {
338 $scope.cldsRefreshASDC();
339 } else if (name == "Create CL") {
340 $rootScope.isNewClosed = true;
341 $scope.cldsCreateModel();
342 } else if (name == "Open CL") {
343 $scope.cldsOpenModel();
344 } else if (name == "Save CL") {
345 $rootScope.isNewClosed = false;
346 $scope.cldsPerformAction("SAVE");
347 } else if (name == "Validation Test") {
348 $scope.cldsPerformAction("TEST");
349 } else if (name == "Submit") {
351 .cldsConfirmPerformAction("SUBMIT");
352 } else if (name == "Resubmit") {
354 .cldsConfirmPerformAction("RESUBMIT");
355 } else if (name == "Update") {
357 .cldsConfirmPerformAction("UPDATE");
358 } else if (name.toLowerCase() == "delete") {
360 .manageConfirmPerformAction("DELETE");
361 } else if (name == "Stop") {
362 $scope.cldsConfirmPerformAction("STOP");
363 } else if (name == "Restart") {
365 .cldsConfirmPerformAction("RESTART");
366 } else if (name == "Refresh Status") {
367 $scope.refreshStatus();
368 } else if (name == "Properties CL") {
369 $scope.cldsOpenModelProperties();
370 } else if (name == "Deploy") {
372 .cldsAskDeployParametersPerformAction();
373 } else if (name == "UnDeploy") {
375 .cldsConfirmToggleDeployPerformAction("UnDeploy");
377 $rootScope.screenName = name;
378 $scope.updatebreadcrumb(value);
379 $location.path(value);
384 $rootScope.impAlerts = function() {
390 link: "/cldsCreateModel",
393 link: "/cldsOpenModel",
396 link: "/cldsSaveModel",
399 link: "/cldsOpenModelProperties",
400 name: "Properties CL"
402 link: "/RevertChanges",
403 name: "Revert Model Changes"
409 link: "/cldsTestActivate",
410 name: "Validation Test"
415 link: "/cldsResubmit",
424 link: "/cldsRestart",
433 link: "/cldsUnDeploy",
437 link: "/refreshStatus",
438 name: "Refresh Status"
440 link: "/cldsRefreshASDC",
444 link: "http://wiki.onap.org",
450 link: "/extraUserInfo",
454 link: "/log_out.html",
460 Object.keys = function(obj) {
464 if (obj.hasOwnProperty(i)) {
471 $scope.keyList = Object.keys($scope.tabs);
473 $scope.keyList = Object.keys($scope.tabs);
476 $scope.updatebreadcrumb = function(path) {
478 var currentURL = $location.path();
479 if (path != undefined) {
483 if (currentURL == "/dashboard") {
484 $rootScope.screenName = "Universal Test Modeler";
485 $rootScope.parentMenu = "Home";
486 $rootScope.rightTabName = "UTM Build Configuration";
489 * else if(currentURL=="/quicksearch") {
490 * $rootScope.screenName = "Quick Search";
491 * $rootScope.parentMenu = "Home"; }
499 function(value, key) {
502 $rootScope.parentMenu = value;
511 if (currentURL == value.link) {
512 $rootScope.screenName = value.name;
521 $scope.updatebreadcrumb();
523 $scope.createNewProject = function() {
525 if ($rootScope.projectName != null) {
528 'Do you want to over-write the project ?');
534 $scope.clearProject();
537 'partials/portfolios/create_new_project.html',
538 'CreateNewPrjCtrl', {}, {
542 windowClass: 'my-class'
552 // if(angular.equals($scope.name,''))
563 // $modalInstance.close("closed");
569 'partials/portfolios/create_new_project.html',
570 'CreateNewPrjCtrl', {}, {
574 windowClass: 'my-class'
576 dlg.result.then(function(name) {
578 // $scope.name = name;
581 // if(angular.equals($scope.name,''))
582 // $scope.name = 'You did not enter in
589 $scope.clearProject = function() {
591 $rootScope.projectName = null;
592 $rootScope.revision = -1;
593 // $rootScope.models.length=0;
594 $rootScope.utmModels = $rootScope.$new(true);
595 $rootScope.serviceInfo = $rootScope.$new(true);
596 $rootScope.serviceInfo = null;
597 $rootScope.serviceInputPartInfo = $rootScope
599 $rootScope.serviceOutputPartInfo = $rootScope
601 $rootScope.servicefaultPartInfo = $rootScope
603 $rootScope.isModel = false;
604 $("#paletteDiv").load(
605 './modeler/dist/index.html');
606 $rootScope.isPalette = false;
607 $rootScope.isTestset = false;
608 $rootScope.isRequirementCoverage = false;
609 $rootScope.ispropertyExplorer = false;
610 // $("#propertyDiv").load('./partials/portfolios/Property_Explorer.html');
611 $rootScope.modelName = "";
612 // document.getElementById('propertyExplorer').classList.remove('visible');
613 document.getElementById("modeler_name").textContent = "Activity Modeler";
614 // $( "#propertyExplorer" ).prev().css(
615 // "display", "block" );
616 $("#activity_modeler").prev().css("display",
618 $('div').find('.k-expand-next').click();
624 $scope.homePage = function() {
626 $location.path('/dashboard');
628 $scope.propertyExplorerErrorMessage = function(msg) {
630 var dlg = dialogs.notify('Error', msg);
633 // $scope.fromTstMultipleFlag=false;
634 /* onclicking of review testset / generate testset */
636 $scope.reviewTestSet = function() {
638 $rootScope.modeltestset = list_model_test_sets[selected_model];
640 $rootScope.isPalette = false;
641 $rootScope.isTestset = true;
642 $rootScope.isRequirementCoverage = false;
643 document.getElementById("modeler_name").textContent = "UTM Test Set";
644 // document.getElementById('propertyExplorer').classList.add('visible');
646 // $( "#propertyExplorer" ).prev().css(
647 // "display", "none" );
648 $('div').find('.k-collapse-next').click();
650 // $rootScope.$apply();
653 $scope.requirementCoverage = function() {
655 $rootScope.testCaseRequirements = [];
656 $rootScope.validTestRequirementArray = [];
657 $rootScope.validTestRequirements = {};
658 $rootScope.modeltestset = list_model_test_sets[selected_model];
659 var allPathDetails = [];
660 $scope.currentSelectedModel = {};
661 // $scope.getPathDetails($rootScope.utmModels,selected_model);
662 // $scope.populatePathDetails(allPathDetails,$scope.currentSelectedModel);
663 $rootScope.pathDetailsList = list_model_path_details[selected_model];
665 * for(var p=0;p<100;p++){
666 * $rootScope.testCaseRequirements.push("Requirement"+p); }
667 * for(var p=0;p<100;p++){
668 * $rootScope.testCaseValue.push("TestCase"+p); }
670 for (var x = 0; x < allPathDetails.length; x++) {
671 var tempPathDetails = allPathDetails[x];
672 if (tempPathDetails != null) {
673 for (var i = 0; i < tempPathDetails.length; i++) {
674 var pathDetails = tempPathDetails[i];
675 if (pathDetails.requirement !== '' &&
676 pathDetails.requirement !== null) {
677 $rootScope.testCaseRequirements
678 .push(pathDetails.requirement);
682 * for (var j = 0; j <
683 * pathDetails.decisionIdentifiers.length;
685 * if(pathDetails.decisionIdentifiers[j].requirement
687 * pathDetails.decisionIdentifiers[j].requirement
689 * $rootScope.testCaseRequirements.push(pathDetails.decisionIdentifiers[j].requirement); } }
695 for (var p = 0; p < $rootScope.modeltestset.activityTestCases.length; p++) {
696 var activityTestCases = $rootScope.modeltestset.activityTestCases[p];
697 if (activityTestCases.mappedRequirements != null) {
698 for (var i = 0; i < activityTestCases.mappedRequirements.length; i++) {
699 // $rootScope.testCaseRequirements
700 // .push(activityTestCases.mappedRequirements[i]);
701 var testCaseNames = $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]];
702 if (testCaseNames == null) {
705 if (activityTestCases.version != null)
706 var testCase = activityTestCases.testCaseName +
708 activityTestCases.version;
710 var testCase = activityTestCases.testCaseName;
711 testCaseNames.push(testCase);
712 $rootScope.validTestRequirements[activityTestCases.mappedRequirements[i]] = testCaseNames;
717 $rootScope.isPalette = false;
718 $rootScope.isTestset = false;
719 $rootScope.isRequirementCoverage = true;
720 document.getElementById("modeler_name").textContent = "Test Case / Requirement Coverage";
721 // document.getElementById('propertyExplorer').classList.add('visible');
722 // console.log("modeltestset"+JSON.stringify($rootScope.modeltestset));
723 // $( "#propertyExplorer" ).prev().css(
724 // "display", "none" );
725 $('div').find('.k-collapse-next').click();
726 // $rootScope.$apply();
730 $scope.activityModelling = function() {
732 // window.open("./bpmn-js-examples-master/modeler/dist/index.html",
734 // $location.path('/activity_modelling');
737 * $scope.openProject = function(){
738 * $location.path('/dashboard_upload'); };
741 $scope.cldsClose = function() {
745 'partials/portfolios/confirmation_window.html',
746 'CldsOpenModelCtrl', {
753 windowClass: 'my-class'
756 dlg.result.then(function(name) {
758 // $scope.name = name;
761 // if(angular.equals($scope.name,''))
762 // $scope.name = 'You did not enter in your
766 $scope.saveConfirmationNotificationPopUp = function(
771 'partials/portfolios/save_confirmation.html',
772 'saveConfirmationModalPopUpCtrl', {
779 windowClass: 'my-class'
782 dlg.result.then(function(name) {
790 $scope.cldsRefreshASDC = function() {
794 'partials/portfolios/refresh_asdc.html',
795 'CldsOpenModelCtrl', {
802 windowClass: 'my-class'
804 dlg.result.then(function(name) {
806 // $scope.name = name;
809 // if(angular.equals($scope.name,''))
810 // $scope.name = 'You did not enter in your
814 $scope.cldsRevertModel = function() {
818 'partials/portfolios/ConfirmRevertChanges.html',
819 'CldsOpenModelCtrl', {
826 windowClass: 'my-class'
829 dlg.result.then(function(name) {
831 // $scope.name = name;
834 // if(angular.equals($scope.name,''))
835 // $scope.name = 'You did not enter in your
841 $rootScope.cldsOpenModelProperties = function() {
845 'partials/portfolios/global_properties.html',
846 'GlobalPropertiesCtrl', {}, {
850 windowClass: 'my-class'
853 dlg.result.then(function(name) {}, function() {});
856 $scope.cldsOpenModel = function() {
860 'partials/portfolios/clds_open_model.html',
861 'CldsOpenModelCtrl', {
868 windowClass: 'my-class'
871 dlg.result.then(function(name) {
873 // $scope.name = name;
876 // if(angular.equals($scope.name,''))
877 // $scope.name = 'You did not enter in your
881 $scope.cldsCreateModel = function() {
885 'partials/portfolios/clds_create_model_off_Template.html',
886 'CldsOpenModelCtrl', {
893 windowClass: 'my-class'
896 dlg.result.then(function(name) {
898 // $scope.name = name;
901 // if(angular.equals($scope.name,''))
902 // $scope.name = 'You did not enter in your
907 $scope.extraUserInfo = function() {
911 'partials/portfolios/extra_user_info.html',
912 'ExtraUserInfoCtrl', {
919 windowClass: 'my-class'
922 dlg.result.then(function(name) {}, function() {});
925 $scope.cldsPerformAction = function(uiAction) {
927 var modelName = selected_model;
928 var controlNamePrefix = "ClosedLoop-";
929 var bpmnText = modelXML;
930 // serialize model properties
931 var propText = JSON.stringify(elementMap);
932 var templateName = selected_template
934 var svgXml = $("#svgContainer").html();
936 console.log("cldsPerformAction: " + uiAction +
937 " modelName=" + modelName);
938 console.log("cldsPerformAction: " + uiAction +
939 " controlNamePrefix=" +
941 console.log("cldsPerformAction: " + uiAction +
942 " bpmnText=" + bpmnText);
943 console.log("cldsPerformAction: " + uiAction +
944 " propText=" + propText);
945 console.log("cldsPerformAction: " + uiAction +
946 " typeID=" + typeID);
947 console.log("cldsPerformAction: " + uiAction +
948 " deploymentId=" + deploymentId);
950 .processAction(uiAction, modelName,
951 controlNamePrefix, bpmnText,
952 propText, svgXml, templateName,
953 typeID, deploymentId)
957 .log("cldsPerformAction: pars=" +
960 .processRefresh(pars);
964 // alert("setModel failed: "
968 $scope.refreshStatus = function() {
969 var modelName = selected_model;
970 var svgXml = $("#svgContainer").html();
971 console.log("refreStatus modelName=" + modelName);
977 .log("refreStatus: pars=" +
980 .processRefresh(pars);
985 $scope.cldsConfirmPerformAction = function(uiAction) {
986 var dlg = dialogs.confirm('Message',
988 uiAction.toLowerCase() +
989 ' the closed loop?');
990 dlg.result.then(function(btn) {
992 $scope.cldsPerformAction(uiAction);
995 // $modalInstance.close("closed");
999 $scope.cldsAskDeployParametersPerformAction = function() {
1000 var dlg = dialogs.create('partials/portfolios/deploy_parameters.html',
1002 {}, {keyboard: true, backdrop: true, windowClass: 'deploy-parameters'});
1003 dlg.result.then(function() {
1004 var confirm = dialogs.confirm('Deploy', 'Are you sure you want to deploy the closed loop?');
1005 confirm.result.then(function() {
1006 cldsToggleDeploy("deploy");
1011 $scope.cldsConfirmToggleDeployPerformAction = function(
1014 var dlg = dialogs.confirm('Message',
1016 uiAction.toLowerCase() +
1017 ' the closed loop?');
1018 dlg.result.then(function(btn) {
1019 cldsToggleDeploy(uiAction.toLowerCase());
1022 // $modalInstance.close("closed");
1026 function cldsToggleDeploy(uiAction) {
1027 var modelName = selected_model;
1028 var controlNamePrefix = "ClosedLoop-";
1029 var bpmnText = modelXML;
1030 // serialize model properties
1031 var propText = JSON.stringify(elementMap);
1032 var templateName = selected_template;
1033 var svgXml = $("#svgContainer").html();
1035 console.log("cldsPerformAction: " + uiAction +
1036 " modelName=" + modelName);
1037 console.log("cldsPerformAction: " + uiAction +
1038 " controlNamePrefix=" +
1040 console.log("cldsPerformAction: " + uiAction +
1041 " bpmnText=" + bpmnText);
1042 console.log("cldsPerformAction: " + uiAction +
1043 " propText=" + propText);
1044 console.log("cldsPerformAction: " + uiAction +
1045 " modelEventService=" +
1047 console.log("cldsPerformAction: " + uiAction +
1048 " typeID=" + typeID);
1049 console.log("cldsPerformAction: " + uiAction +
1050 " deploymentId=" + deploymentId);
1052 .toggleDeploy(uiAction, modelName,
1053 controlNamePrefix, bpmnText,
1054 propText, svgXml, templateName,
1055 typeID, controlNameUuid,
1056 modelEventService, deploymentId)
1059 typeID = pars.typeId;
1060 controlNameUuid = pars.controlNameUuid;
1061 selected_template = pars.templateName;
1062 modelEventService = pars.event;
1064 // pars.event.actionCd;
1065 actionStateCd = pars.event.actionStateCd;
1066 deploymentId = pars.deploymentId;
1068 .processActionResponse(
1077 $scope.managePerformAction = function(action) {
1078 if (action.toLowerCase() === "delete") {
1082 "805b9f83-261f-48d9-98c7-8011fc2cc8e8",
1083 "ClosedLoop-ABCD-0000.yml")
1084 .then(function(pars) {
1088 // alert("setModel failed: " +
1093 $scope.manageConfirmPerformAction = function(
1096 var dlg = dialogs.confirm('Message',
1098 uiAction.toLowerCase() +
1099 ' the closed loop?');
1100 dlg.result.then(function(btn) {
1102 $scope.managePerformAction(uiAction);
1105 // $modalInstance.close("closed");
1108 $scope.VesCollectorWindow = function(vesCollector) {
1112 'partials/portfolios/vesCollector_properties.html',
1113 'ImportSchemaCtrl', {
1120 windowClass: 'my-class'
1123 dlg.result.then(function(name) {
1132 $scope.HolmesWindow = function(holmes) {
1134 var partial = 'partials/portfolios/holmes_properties.html'
1147 windowClass: 'my-class'
1151 $scope.TCAWindow = function(tca) {
1155 'partials/portfolios/tca_properties.html',
1156 'ImportSchemaCtrl', {
1163 windowClass: 'my-class'
1166 dlg.result.then(function(name) {
1167 // $scope.name = name;
1169 // if(angular.equals($scope.name,''))
1170 // $scope.name = 'You did not enter in
1176 $scope.PolicyWindow = function(policy) {
1179 'partials/portfolios/PolicyWindow_properties.html',
1180 'ImportSchemaCtrl', {
1187 windowClass: 'my-class'
1190 dlg.result.then(function(name) {
1192 // $scope.name = name;
1195 // if(angular.equals($scope.name,''))
1196 // $scope.name = 'You did not enter in
1205 app.service('MenuService', ['$http', '$q', function($http, $q) {
1208 * this.generateMDTTestSet = function(utmMDTRequest, generateTestSetMDTURL){
1210 * console.log("generateMDTTestSet"); //alert("In generateMDTTestSet :: " +
1211 * JSON.stringify(utmMDTRequest)); var def = $q.defer(); var sets = [];
1213 * $http.post(generateTestSetMDTURL, utmMDTRequest) .success(function(data){
1214 * console.log("success"); sets = data; def.resolve(data); })
1215 * .error(function(data){ console.log("error");
1216 * def.reject("GenerateMDTTestSet not successful"); });
1218 * return def.promise; };
1222 app.directive('focus', function($timeout) {
1228 link: function(scope, element) {
1229 scope.$watch('trigger', function(value) {
1231 if (value === "true") {
1232 $timeout(function() {
1241 app.directive('draggable', function($document) {
1243 return function(scope, element, attr) {
1250 position: 'relative',
1252 backgroundColor: 'white',
1257 element.on('mousedown', function(event) {
1259 // Prevent default dragging of selected content
1260 // event.preventDefault();
1261 startX = event.screenX - x;
1262 startY = event.screenY - y;
1263 $document.on('mousemove', mousemove);
1264 $document.on('mouseup', mouseup);
1267 function mousemove(event) {
1269 y = event.screenY - startY;
1270 x = event.screenX - startX;
1277 function mouseup() {
1279 $document.off('mousemove', mousemove);
1280 $document.off('mouseup', mouseup);
1285 app.factory('myHttpInterceptor', function($q, $window) {
1287 return function(promise) {
1289 return promise.then(function(response) {
1292 }, function(response) {
1294 return $q.reject(response);
1299 app.run(['$route', function($route) {
1304 function TestCtrl($scope) {
1306 $scope.msg = "Hello from a controller method.";
1307 $scope.returnHello = function() {
1313 function importshema() {
1315 angular.element(document.getElementById('navbar')).scope().importSchema();
1319 function VesCollectorWindow(vesCollectorWin) {
1320 angular.element(document.getElementById('navbar')).scope()
1321 .VesCollectorWindow(vesCollectorWin);
1324 function HolmesWindow(holmesWin) {
1325 angular.element(document.getElementById('navbar')).scope()
1326 .HolmesWindow(holmesWin);
1329 function F5Window() {
1331 angular.element(document.getElementById('navbar')).scope().F5Window();
1335 function TCAWindow(tca) {
1337 angular.element(document.getElementById('navbar')).scope().TCAWindow(tca);
1341 function GOCWindow() {
1343 angular.element(document.getElementById('navbar')).scope().GOCWindow();
1347 function PolicyWindow(PolicyWin) {
1349 angular.element(document.getElementById('navbar')).scope().PolicyWindow(
1354 function pathDetails(bpmnElementID, bpmnElementName, pathIdentifiers) {
1356 angular.element(document.getElementById('navbar')).scope().pathDetails(
1357 bpmnElementID, bpmnElementName, pathIdentifiers);
1361 function setdefaultvalue() {
1363 angular.element(document.getElementById('navbar')).scope()
1368 function upgradeSchemaVersion() {
1370 angular.element(document.getElementById('navbar')).scope()
1371 .upgradeSchemaVersion();
1375 function saveProject() {
1377 angular.element(document.getElementById('navbar')).scope().saveProject();
1381 function modifySchema() {
1383 angular.element(document.getElementById('navbar')).scope().modifySchema();
1387 function definePID() {
1389 angular.element(document.getElementById('navbar')).scope().definePID();
1393 function defineServiceAcronym() {
1395 angular.element(document.getElementById('navbar')).scope()
1396 .defineServiceAcronym();
1400 function errorProperty(msg) {
1402 angular.element(document.getElementById('navbar')).scope()
1403 .propertyExplorerErrorMessage(msg);
1406 function invisiblepropertyExplorer() {
1408 angular.element(document.getElementById('navbar')).scope()
1409 .invisibleproperty();
1412 function updateDecisionLabel(originalLabel, newLabel) {
1414 angular.element(document.getElementById('navbar')).scope()
1415 .updateDecisionLabels(originalLabel, newLabel);
1418 // Used to logout the session , when browser window was closed
1419 window.onunload = function() {
1420 window.localStorage.removeItem("isAuth");
1421 window.localStorage.removeItem("loginuser");