summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2017-08-29 14:38:54 -0400
committerrb7147 <rb7147@att.com>2017-08-30 08:27:28 -0400
commit7de5161cb47abb01256272addeda32ad1c1cfaf5 (patch)
treef2250f25a7c419058491a0af99ecf47d701f80d7 /POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models
parented3acdbb2d22e819218eea730932950d69d985fe (diff)
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>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js6
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js36
2 files changed, 20 insertions, 22 deletions
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 a6fa7b291..b93fc8a72 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 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
}
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 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
}
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 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
}
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 5d81bc10d..8dd559c3e 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 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
}
- 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 = [];