Sonar Issue fixes for js

Resolved POLICY-SDK-APP js blockers and critical issues

Issue-Id: POLICY-184
Change-Id: I2ec99b4d48fcc2f833c6fd6140fed6d926c3fd9e
Signed-off-by: rb7147 <rb7147@att.com>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dashboardController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dashboardController.js
index 7d35211..8771ee9 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dashboardController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dashboardController.js
@@ -74,17 +74,17 @@
 		console.log("failed");
 	});
 	
-	$scope.availableGridHealthDatas = {
-			data : 'systemAlertsTableDatas',
-			    enableFiltering: true,
-			    columnDefs: [{ field: 'id'},
-			      { field: 'type'},
-			      { field: 'system'},
-			      {field: 'logtype'},
-			      {field : 'date' ,type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' },
-			      {field : 'description'}
-			  ],	  
-	};
+    $scope.availableGridHealthDatas = {
+    		data : 'systemAlertsTableDatas',
+    		enableFiltering: true,
+    		columnDefs: [{ field: 'id'},
+    			{ field: 'type'},
+    			{ field: 'system'},
+    			{field: 'logtype'},
+    			{field : 'date' ,type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' },
+    			{field : 'description'}
+    			]  
+    };
 
 	$scope.papStatusDatas = {
 		data : 'papTableDatas',
@@ -93,7 +93,7 @@
 			{ field: 'status'},
 			{ field: 'noOfPolicy'},
 			{field: 'noOfConnectedTrap'}
-		],
+		]
 	};
 
 	$scope.pdpStatusDatas = {
@@ -107,7 +107,7 @@
 			{field : 'permitCount'},
 			{field : 'denyCount'},
 			{field : 'naCount'}
-		],
+		]
 	};
 
 	$scope.policyActivityDatas = {
@@ -116,6 +116,6 @@
 		columnDefs: [{ field: 'policyId'},
 			{ field: 'fireCount'},
 			{ field: 'system'}
-		],
+		]
 	};
 });
\ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/FWPrefixListDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/FWPrefixListDictController.js
index d880ac6..1925e5f 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/FWPrefixListDictController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/FWPrefixListDictController.js
@@ -17,7 +17,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-app.controller('editFWPrefixListController' ,  function ($scope, $modalInstance, message, Notification, UserInfoServiceDS2, Notification){
+app.controller('editFWPrefixListController' ,  function ($scope, $modalInstance, message, Notification, UserInfoServiceDS2){
 	$scope.validate = 'false';
     if(message.prefixListDictionaryData==null)
         $scope.label='Add PrefixList'
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js
index a6fa7b2..b93fc8a 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js
@@ -234,7 +234,7 @@
 			}
 			if($scope.jsonData.verificationSignaturesUsedForUI != null){
 				if($scope.jsonData.verificationSignaturesUsedForUI.signatures != null){
-					$scope.temp.policy.triggerfaultSignatures = {Fault1 : [], Fault2 : [],  Fault3 : [],  Fault4 : [],  Fault5 : [],  Fault6 : [],};
+					$scope.temp.policy.triggerfaultSignatures = {Fault1 : [], Fault2 : [],  Fault3 : [],  Fault4 : [],  Fault5 : [],  Fault6 : []};
 					var splitTraps = $scope.jsonData.verificationSignaturesUsedForUI.signatures.split("#!?!"); 
 					if(splitTraps.length > 1){
 						$scope.verificationdisabled = false;
@@ -530,7 +530,7 @@
 		}
 		if($scope.temp.policy.triggerTrapSignatures.length == 3 || $scope.temp.policy.triggerTrapSignatures["Trap3"] != null){
 			var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1,  trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2,
-					trap2 : $scope.temp.policy.triggerTrapSignatures.Trap3}
+					trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3}
 		}
 		if($scope.temp.policy.triggerTrapSignatures.length == 4 || $scope.temp.policy.triggerTrapSignatures["Trap4"] != null){
 			var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1,  trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2,
@@ -555,7 +555,7 @@
 		}
 		if($scope.temp.policy.triggerfaultSignatures.length == 3 || $scope.temp.policy.triggerfaultSignatures["Fault3"] != null){
 			var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1,  trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2,
-					trap2 : $scope.temp.policy.triggerfaultSignatures.Fault3}
+					trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3}
 		}
 		if($scope.temp.policy.triggerTrapSignatures.length == 4 || $scope.temp.policy.triggerfaultSignatures["Fault4"] != null){
 			var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1,  trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2,
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
index 5d81bc1..8dd559c 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
@@ -323,25 +323,23 @@
 
                        	}
 
-                       	if (dictionary!= null || dictionary>1){
-                    		if (dictionary!= null || dictionary.length>1){
-                    			for (m=0; m < dictionary.length; m += 1){
-                    				var keyCompare = dictionary[m].name;
-                    				var valueCompare = dictionary[m].value;
-                    				var valueModel = dictionary[m].modelName;
-                    				var conpairService = serviceName;
-                    				if (valueModel.includes('-v')){
-                    					conpairService = service;
-                    				}
-                    				if(valueModel.localeCompare(conpairService) == 0){
-                    					console.log(valueCompare);	
-                    					dictionaryList.push(dictionary[m]);
-                    					if (!dictionaryNameList.includes(dictionary[m].name)){
-                    						dictionaryNameList.push(dictionary[m].name)
-                    					}
-                    				}
-                    			}
-                    		}
+                       	if (dictionary!= null && dictionary.length>1){
+                       		for (m=0; m < dictionary.length; m += 1){
+                       			var keyCompare = dictionary[m].name;
+                       			var valueCompare = dictionary[m].value;
+                       			var valueModel = dictionary[m].modelName;
+                       			var conpairService = serviceName;
+                       			if (valueModel.includes('-v')){
+                       				conpairService = service;
+                       			}
+                       			if(valueModel.localeCompare(conpairService) == 0){
+                       				console.log(valueCompare);	
+                       				dictionaryList.push(dictionary[m]);
+                       				if (!dictionaryNameList.includes(dictionary[m].name)){
+                       					dictionaryNameList.push(dictionary[m].name)
+                       				}
+                       			}
+                       		}
                        	}
 
                 		$scope.temp.policy.ruleGridData = [];
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/userInfoServiceDS2.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/userInfoServiceDS2.js
index 90d7cd1..c73fa60 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/userInfoServiceDS2.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/userInfoServiceDS2.js
@@ -23,7 +23,7 @@
 			var deferred = $q.defer();
 			$http({
                 method: "GET",
-                url: "get_PolicyUserInfo",    
+                url: "get_PolicyUserInfo"  
 			}).success(function(res) {    
 				if(res==null || res==''){
 					$log.error('userInfoServiceDs2: failed to get top menu info');