replaced named func with anonymous func 52/76052/1
authorDriptaroop Das <driptaroop.das@in.ibm.com>
Mon, 21 Jan 2019 07:36:28 +0000 (13:06 +0530)
committerDriptaroop Das <driptaroop.das@in.ibm.com>
Mon, 21 Jan 2019 07:38:53 +0000 (13:08 +0530)
replaced named function with anonymous function. While named function expressions might be useful for debugging purposes, some browsers do not support them correctly (for example Internet Explorer 8).

Issue-ID: VID-389
Change-Id: Ia0943a1bd765b1b9d5909c68af97ae11b1060255
Signed-off-by: Driptaroop Das <driptaroop.das@in.ibm.com>
vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js

index 06622cf..366965c 100755 (executable)
@@ -3,6 +3,7 @@
  * VID\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Modifications Copyright (C) 2019 IBM.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -1368,11 +1369,11 @@ Private metthods
         function _setPnf(data) { // data is the $scope.service.instance object\r
             return PnfService.getPnfs(data)\r
                 .then(\r
-                    function success(response) {\r
+                    function (response) {\r
                         return response.data;\r
                         // * can add here changes on the data that are needed to the view ( filter, ect..)\r
                     },\r
-                    function error(error) {\r
+                    function (error) {\r
                         console.error(error);\r
                     }\r
                 );\r
@@ -1382,11 +1383,11 @@ Private metthods
         function _setCr(data) { // data is the $scope.service.instance object\r
             return CrService.getCr(data)\r
                 .then(\r
-                    function success(response) {\r
+                    function (response) {\r
                         return response.data.results;\r
                         // * can add here changes on the data that are needed to the view ( filter, ect..)\r
                     },\r
-                    function error(error) {\r
+                    function (error) {\r
                         console.error(error);\r
                     }\r
                 );\r
index f0a6ebd..6c4d290 100755 (executable)
@@ -3,6 +3,7 @@
  * VID\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Modifications Copyright (C) 2019 IBM.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -50,7 +51,7 @@
                        $scope.status = FIELD.STATUS.FETCHING_SERVICE_CATALOG_ASDC;\r
 \r
                        $http.get(pathQuery)\r
-                       .then(function successCallback(response) {\r
+                       .then(function (response) {\r
                                $scope.services = [];\r
                                if (response.data && angular.isArray(response.data.services)) {\r
                                        wholeData = response.data.services;\r
@@ -82,7 +83,7 @@
                                        $scope.isSpinnerVisible = false;\r
                                }\r
                                $scope.deployButtonType = response.data.readOnly ? 'disabled' : 'primary';\r
-                       }, function errorCallback(response) {\r
+                       }, function (response) {\r
                                console.log("Error: " + response);\r
                        });\r
                };\r
                        console.log("Instantiating SDC service " + service.uuid);\r
 \r
                        $http.get(COMPONENT.SERVICES_PATH + service.uuid)\r
-                               .then(function successCallback(getServiceResponse) {\r
+                               .then(function (getServiceResponse) {\r
 \r
                                        var serviceModel = getServiceResponse.data;\r
 \r
                                                }\r
                                            }\r
                                        });\r
-                               }, function errorCallback(response) {\r
+                               }, function (response) {\r
                                        console.log("Error: " + response);\r
                                });\r
                };\r
index ec4799b..bb3acad 100755 (executable)
@@ -3,6 +3,7 @@
  * VID\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Modifications Copyright (C) 2019 IBM.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -197,7 +198,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
             console.log("Instantiating ASDC service " + service.uuid);\r
 \r
             $http.get('rest/models/services/' + service.uuid)\r
-                .then(function successCallback(getServiceResponse) {\r
+                .then(function (getServiceResponse) {\r
                     getServiceResponse.data['service'].serviceTypeName = $scope.serviceTypeName;\r
                     getServiceResponse.data['service'].createSubscriberName = $scope.createSubscriberName;\r
                     var serviceModel = getServiceResponse.data;\r
@@ -278,7 +279,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
                         }\r
                     });\r
 \r
-                }, function errorCallback(response) {\r
+                }, function (response) {\r
                     $log.error("Error: ", response);\r
                 });\r
         };\r
@@ -661,7 +662,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
             return $http({\r
                 method: 'GET',\r
                 url: pathQuery\r
-            }).then(function successCallback(response) {\r
+            }).then(function (response) {\r
                 if (response.headers()['content-type'].includes('json')) {\r
                     vidService.setModel(response.data);\r
                     console.log("aaiSubscriber getAsdcModel DONE!!!!");\r
@@ -696,10 +697,10 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
 \r
         $scope.getTenants = function (globalCustomerId) {\r
             $http.get(FIELD.ID.AAI_GET_TENTANTS + globalCustomerId)\r
-                .then(function successCallback(response) {\r
+                .then(function (response) {\r
                     return response.data;\r
                     //$location.path("/instantiate");\r
-                }, function errorCallback(response) {\r
+                }, function (response) {\r
                     //TODO\r
                 });\r
         }\r