summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-10-04 15:45:03 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-10-04 18:15:34 -0400
commit710011b4fb147bf100c52c4b0425160bba88a0fd (patch)
treefe398d1d4bd7ca03c502352eef4cbf6aa125b7f1 /POLICY-SDK-APP/src/main/webapp/app/policyApp
parentffd7241c7bfa8d8b68b504406fc6ed4cc299ffe6 (diff)
Remove unused vars and methods
Removed unused variables and unused methods. Removed empty ';' statements. Combined if's that had no content. Not doing any formatting for javascript right now. Licenses. Issue-ID: POLICY-2134 Change-Id: Ib5ec178bd34154281509f57ed15f704e26101f05 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/AutoPushTabController/RemovePDPGroupPoliciesController.js4
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/BRMSParamDictController.js5
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/DecisionRainyDayDictController.js12
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js5
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js15
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js13
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js13
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js6
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js14
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js6
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js42
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js13
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js11
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js12
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js5
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/service/modalService.js12
16 files changed, 47 insertions, 141 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/AutoPushTabController/RemovePDPGroupPoliciesController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/AutoPushTabController/RemovePDPGroupPoliciesController.js
index 62dcd65b2..b8325b316 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/AutoPushTabController/RemovePDPGroupPoliciesController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/AutoPushTabController/RemovePDPGroupPoliciesController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,11 +40,9 @@ app.controller('removeGroupPoliciesController' , function ($scope, $modalInstan
//set gridApi on scope
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope,function(row){
- var msg = 'row selected ' + row.isSelected;
});
gridApi.selection.on.rowSelectionChangedBatch($scope,function(rows){
- var msg = 'rows changed ' + rows.length;
});
};
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/BRMSParamDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/BRMSParamDictController.js
index 678902840..f8d6d311e 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/BRMSParamDictController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/BRMSParamDictController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,7 +60,6 @@ app.controller('editBRMSParamController' , function ($scope, $modalInstance, mes
if(!regex.test(brmsParamDictionaryData.ruleName)) {
Notification.error("Enter Valid Rule Name without spaces or special characters");
}else{
- var file = $scope.MyFile;
var uuu = "saveDictionary/brms_dictionary/save_BRMSParam";
var postData={brmsParamDictionaryData: brmsParamDictionaryData, userid: userid};
$.ajax({
@@ -94,4 +93,4 @@ app.controller('editBRMSParamController' , function ($scope, $modalInstance, mes
$scope.close = function() {
$modalInstance.close();
};
-}); \ No newline at end of file
+});
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/DecisionRainyDayDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/DecisionRainyDayDictController.js
index b50becf0b..fa14dfdc9 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/DecisionRainyDayDictController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/DecisionRainyDayDictController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,6 @@ app.controller('editRainyDayDictController' , function ($scope, $modalInstance,
$scope.editRainyDayTreatment = message.rainyDayDictionaryData;
$scope.saveDecisionTreatments = function(rainyDayDictionaryData) {
- var finalData = extend(rainyDayDictionaryData, $scope.treatmentDatas[0]);
var uuu = "saveDictionary/decision_dictionary/save_RainyDay";
var postData={rainyDayDictionaryData: rainyDayDictionaryData, userid: userid};
$.ajax({
@@ -77,13 +76,6 @@ app.controller('editRainyDayDictController' , function ($scope, $modalInstance,
});
};
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
-
$scope.treatmentDatas = [{"userDataTypeValues" : $scope.treatments}];
$scope.addNewTreatment = function() {
$scope.treatments.push({});
@@ -97,4 +89,4 @@ app.controller('editRainyDayDictController' , function ($scope, $modalInstance,
$scope.close = function() {
$modalInstance.close();
};
-}); \ No newline at end of file
+});
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js
index 4ca3b2266..663e2af19 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,7 +55,6 @@ app.controller('editAttributeController' ,function ($scope, $modalInstance, mess
if(!regex.test(attributeDictionaryData.xacmlId)) {
Notification.error("Enter Valid Attribute Name without spaces or special characters");
}else{
- var finalData = extend(attributeDictionaryData, $scope.attributeDatas[0]);
var uuu = "saveDictionary/attribute_dictionary/save_attribute";
var postData={attributeDictionaryData: attributeDictionaryData, userid: userid};
$.ajax({
@@ -101,4 +100,4 @@ app.controller('editAttributeController' ,function ($scope, $modalInstance, mess
$scope.close = function() {
$modalInstance.close();
};
-}); \ No newline at end of file
+});
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js
index a9097d559..80c11463f 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
$scope.temp.policy = {
policyType : "Action"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -36,7 +36,7 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
}
$scope.modal('createNewPolicy', true);
$scope.temp.policy = "";
- };
+ }
$scope.modal = function(id, hide) {
return $('#' + id).modal(hide ? 'hide' : 'show');
@@ -71,13 +71,6 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
}, function (error) {
console.log("failed");
});
-
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
$scope.saveActionPolicy = function(policy){
if(policy.itemContent != undefined){
@@ -191,4 +184,4 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
$scope.temp.policy.ruleAlgorithmschoices.splice(lastItem);
};
-}]); \ No newline at end of file
+}]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
index 22511c5a7..028223f28 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo
policyType : "Config",
configPolicyType : "BRMS_Param"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -237,13 +237,6 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo
});
};
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
-
if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
$scope.temp.policy.attributes = [];
}else{
@@ -261,4 +254,4 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo
var lastItem = $scope.temp.policy.attributes.length-1;
$scope.temp.policy.attributes.splice(lastItem);
};
-}]); \ No newline at end of file
+}]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js
index 6061b1ef8..3e75e05a9 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ angular.module('abs').controller('brmsRawPolicyController', ['$scope', '$window'
policyType : "Config",
configPolicyType : "BRMS_Raw"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -159,13 +159,6 @@ angular.module('abs').controller('brmsRawPolicyController', ['$scope', '$window'
});
};
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
-
if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
$scope.temp.policy.attributes = [];
}else{
@@ -182,4 +175,4 @@ angular.module('abs').controller('brmsRawPolicyController', ['$scope', '$window'
var lastItem = $scope.temp.policy.attributes.length-1;
$scope.temp.policy.attributes.splice(lastItem);
};
-}]); \ No newline at end of file
+}]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
index 02e10bddd..f950e7434 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ app.controller('baseConfigController', ['$scope', 'PolicyAppService', 'policyNav
policyType : "Config",
configPolicyType : "Base"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -177,4 +177,4 @@ app.controller('baseConfigController', ['$scope', 'PolicyAppService', 'policyNav
var lastItem = $scope.temp.policy.attributes.length-1;
$scope.temp.policy.attributes.splice(lastItem);
};
-}]); \ No newline at end of file
+}]);
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 ebc9001ab..7bd04c97a 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
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
policyType : "Config",
configPolicyType : "ClosedLoop_Fault"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -702,9 +702,7 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
$scope.trapItemNo = 0;
$scope.TrapTriggerSignatureDatas = [{"triggermainSignatures" : $scope.temp.policy.triggerTrapSignatures}];
$scope.addTrapTriggerButton = function(indexId) {
- if(trapCollection.indexOf(indexId) !== -1){
-
- }else{
+ if(trapCollection.indexOf(indexId) === -1){
$scope.temp.policy.triggerTrapSignatures[indexId] = [];
trapCollection.push(indexId);
}
@@ -776,9 +774,7 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
$scope.FaultTriggerSignatureDatas = [{"verificationSignatures" : $scope.temp.policy.triggerfaultSignatures}];
$scope.addVerTriggerButton = function(indexId) {
$scope.verificationdisabled = false;
- if(faultCollection.indexOf(indexId) !== -1){
-
- }else{
+ if(faultCollection.indexOf(indexId) === -1){
$scope.temp.policy.triggerfaultSignatures[indexId] = [];
faultCollection.push(indexId);
}
@@ -824,4 +820,4 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol
};
-}]); \ No newline at end of file
+}]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js
index a67266074..454a724a9 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ angular.module("abs").controller('clPMController', ['$scope', '$window', '$timeo
policyType : "Config",
configPolicyType : "ClosedLoop_PM"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -193,4 +193,4 @@ angular.module("abs").controller('clPMController', ['$scope', '$window', '$timeo
});
};
-}]); \ No newline at end of file
+}]);
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 cffa46f53..4cee2128d 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
@@ -33,7 +33,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
policyType : "Config",
configPolicyType : "Micro Service"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -224,7 +224,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
layer++;
if(layer > 4){
layer = 1
- };
+ }
div.className += ' children_group border' + layer; //here is div with a group of children.
}
}
@@ -349,11 +349,9 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
}
};
- var splitDash = '-';
var splitEqual = '=';
var splitComma = ',';
var splitcolon = ':';
- var splitsemicolon = ";";
var splitEnum = "],";
var plainAttributeKeys = [];
var matching = [];
@@ -388,7 +386,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
document.getElementById("msPolicyloader").style.visibility = "hidden";
$scope.$apply(function(){
- var plainAttributeKeys = [];
$scope.dcaeModelData = data[0].dcaeModelData;
$scope.dcaeJsonDate = data[0].jsonValue;
$scope.dataOrderInfo = null;
@@ -415,7 +412,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
$scope.temp.policy.priority = headDefautlsData.priority;
}
- var enumAttributes = $scope.dcaeModelData.enumValues;
var annotation = $scope.dcaeModelData.annotation;
var dictionary = $scope.microServiceAttributeDictionaryDatas;
@@ -435,7 +431,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
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;
@@ -699,8 +694,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
var double = "double";
var boolean = "boolean";
var baseLevel = level;
- var list = "list";
- var String = "String";
var attributekey = "";
@@ -1167,7 +1160,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
layer++;
if(layer > 4){
layer = 1
- };
+ }
firstChild_element.className += ' children_group border' + layer; //here is div with a group of children.
}
}
@@ -1212,11 +1205,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
$scope.labelLayout = function(labelValue, lableName, labelManyKey ){
var label = document.createElement("Label")
var divID = labelValue;
- if (labelValue.endsWith('.')){
- var workingLabel = labelValue.substring(0, labelValue.length-1);
- }else {
- var workingLabel = labelValue;
- }
if (labelValue.length < 1){
divID = "DynamicTemplate";
@@ -1274,7 +1262,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
layer++;
if(layer > 4){
layer = 1
- };
+ }
divTag.className += ' children_group border' + layer; //here is div with a group of children.
}
if(required){
@@ -1295,7 +1283,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
layer++;
if(layer > 4){
layer = 1
- };
+ }
divTag.className += ' children_group border' + layer; //here is div with a group of children.
}
if(required){
@@ -1336,7 +1324,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
label.appendChild(labeltext);
isRequired = true; //set required as true for matching element
}else {
- var labeltext = document.createTextNode(attributeName);
if(isRequired){
var requiredLabName = attributeName+ " * ";
labeltext = document.createTextNode(requiredLabName);
@@ -1507,17 +1494,8 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
function onlyUnique(value, index, self) {
return self.indexOf(value) === index;
- };
-
-
- function checkDictionary(value){
- for (i = 0; i < $scope.microServiceAttributeDictionaryDatas.length; i++) {
- if ($scope.microServiceAttributeDictionaryDatas[i].name.localeCompare(value)){
- return true;
- }
- }
-
}
+
$scope.savePolicy = function(policy){
if(policy.itemContent != undefined){
$scope.refreshCheck = true;
@@ -1626,7 +1604,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
$scope.validatePolicy = function(policy){
document.getElementById("validate").innerHTML = "";
var splitAt = '*';
- var dot ='.';
var jsonPolicy = {};
if(plainAttributeKeys != null){
for(a = 0; a < plainAttributeKeys.length; a++){
@@ -1750,13 +1727,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
});
};
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
-
// Switch Click
$('.Switch').click(function() {
// Check If Enabled (Has 'On' Class)
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js
index 0e53ce9de..9596d0f29 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@ angular.module('abs').controller('decisionPolicyController', [ '$scope', 'Policy
policyType : "Decision"
}
}
- ;
$scope.refresh = function() {
if ($scope.refreshCheck) {
@@ -114,14 +113,6 @@ angular.module('abs').controller('decisionPolicyController', [ '$scope', 'Policy
console.log("failed");
});
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key))
- obj[key] = src[key];
- }
- return obj;
- }
-
$scope.saveDecisionPolicy = function(policy) {
if (policy.itemContent != undefined) {
$scope.refreshCheck = true;
@@ -460,4 +451,4 @@ angular.module('abs').controller('decisionPolicyController', [ '$scope', 'Policy
}
});
};
-} ]); \ No newline at end of file
+} ]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js
index 1051ecd9a..1d39c4f4a 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -112,13 +112,6 @@ angular.module('abs').controller('fwPolicyController', ['$scope', '$window', 'Po
console.log("failed");
});
- function extend(obj, src) {
- for (var key in src) {
- if (src.hasOwnProperty(key)) obj[key] = src[key];
- }
- return obj;
- }
-
$scope.viewFWRule = function(policy){
console.log(policy);
var uuu = "policyController/ViewFWPolicyRule.htm";
@@ -258,4 +251,4 @@ angular.module('abs').controller('fwPolicyController', ['$scope', '$window', 'Po
$scope.temp.policy.fwattributes.splice(lastItem);
};
-}]); \ No newline at end of file
+}]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js
index cdeaefdea..8de78fc09 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
policyType : "Config",
configPolicyType : "Optimization"
}
- };
+ }
$scope.refresh = function(){
if($scope.refreshCheck){
@@ -270,11 +270,9 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
}
};
- var splitDash = '-';
var splitEqual = '=';
var splitComma = ',';
var splitcolon = ':';
- var splitsemicolon = ";";
var splitEnum = "],";
var plainAttributeKeys = [];
var matching = [];
@@ -298,7 +296,6 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
data: JSON.stringify(postData),
success : function(data){
$scope.$apply(function(){
- var plainAttributeKeys = [];
$scope.optimizationModelData = data[0].optimizationModelData;
$scope.optimizationJsonDate = data[0].jsonValue;
$scope.dataOrderInfo = null;
@@ -332,7 +329,6 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
$scope.temp.policy.priority = "";
}
- var enumAttributes = $scope.optimizationModelData.enumValues;
var annotation = $scope.optimizationModelData.annotation;
var dictionary = $scope.microServiceAttributeDictionaryDatas;
@@ -352,7 +348,6 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
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;
@@ -439,7 +434,6 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
var label = $scope.labelManyKeys[i];
// first add parent/label level
for (k = 0; k < unique.length; k++){
- var newindex = unique[k].lastIndexOf("@");
var newKey = unique[k].substring(0, index);
if(label == newKey){
//Check this label has bee created or not
@@ -1386,4 +1380,4 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window',
}
}]);/**
*
- */ \ No newline at end of file
+ */
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js
index 26cdf67c3..017f49ddc 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js
@@ -51,10 +51,6 @@ angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
this.model = angular.copy(rawModel);
this.tempModel = angular.copy(rawModel);
- function parseMySQLDate(mysqlDate) {
- var d = (mysqlDate || '').toString().split(/[- :]/);
- return new Date(d[0], d[1] - 1, d[2], d[3], d[4], d[5]);
- }
};
Item.prototype.update = function() {
@@ -263,7 +259,6 @@ angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
self.error = '';
$http.post(policyManagerConfig.describePolicyUrl, data).success(function(data) {
self.tempModel.content = self.model.content = data.html;
- var describeTemplate = self.tempModel.content;
self.deferredHandler(data, deferred);
}).error(function(data) {
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/modalService.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/modalService.js
index 381db7f9a..ceb2ec39f 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/modalService.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/service/modalService.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ angular.module("modalServices",[]).service('modalService', ['$modal', function (
this.showSuccess = function(heading, messageBody){
- var modalInstance = $modal.open({
+ $modal.open({
templateUrl: 'modal_informative.html',
controller: 'modalpopupController',
resolve: {
@@ -38,7 +38,7 @@ angular.module("modalServices",[]).service('modalService', ['$modal', function (
});
};
this.showFailure = function(heading, messageBody){
- var modalInstance = $modal.open({
+ $modal.open({
templateUrl: 'modal_warning.html',
controller: 'modalpopupController',
resolve: {
@@ -54,7 +54,7 @@ angular.module("modalServices",[]).service('modalService', ['$modal', function (
};
this.showMessage = function(heading, messageBody){
- var modalInstance = $modal.open({
+ $modal.open({
templateUrl: 'modal_message.html',
controller: 'modalpopupController',
resolve: {
@@ -70,7 +70,7 @@ angular.module("modalServices",[]).service('modalService', ['$modal', function (
};
this.showWarning = function(heading, messageBody){
- var modalInstance = $modal.open({
+ $modal.open({
templateUrl: 'modal_warning_message.html',
controller: 'modalpopupController',
resolve: {
@@ -201,4 +201,4 @@ angular.module("modalServices",[]).service('modalService', ['$modal', function (
modalInstance = undefined;
});
};
- }]); \ No newline at end of file
+ }]);