Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove unused vars and methods
[policy/engine.git]
/
POLICY-SDK-APP
/
src
/
main
/
webapp
/
app
/
policyApp
/
policy-models
/
Editor
/
js
/
entities
/
item.js
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
0e095a8
..
017f49d
100644
(file)
--- 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
@@
-2,7
+2,7
@@
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
* ============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.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-30,6
+30,7
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
version: model && model.version || '',
createdBy: model && model.createdBy || '',
modifiedBy: model && model.modifiedBy || '',
version: model && model.version || '',
createdBy: model && model.createdBy || '',
modifiedBy: model && model.modifiedBy || '',
+ roleType: model && model.roleType || '',
content: model && model.content || '',
recursive: false,
sizeKb: function() {
content: model && model.content || '',
recursive: false,
sizeKb: function() {
@@
-50,10
+51,6
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
this.model = angular.copy(rawModel);
this.tempModel = angular.copy(rawModel);
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() {
};
Item.prototype.update = function() {
@@
-84,7
+81,7
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
this.update();
return deferred.resolve(data);
};
this.update();
return deferred.resolve(data);
};
-
+
Item.prototype.createFolder = function() {
var self = this;
var deferred = $q.defer();
Item.prototype.createFolder = function() {
var self = this;
var deferred = $q.defer();
@@
-139,11
+136,11
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
self.inprocess = true;
self.error = '';
$http.post(policyManagerConfig.renameUrl, data).success(function(data) {
self.inprocess = true;
self.error = '';
$http.post(policyManagerConfig.renameUrl, data).success(function(data) {
- if(data.result.error != undefined){
-
var value = data.result.error;
-
value = value.replace("rename" , "move");
-
data.result.error = value;
- }
+
if(data.result.error != undefined){
+ var value = data.result.error;
+ value = value.replace("rename" , "move");
+ data.result.error = value;
+
}
self.deferredHandler(data, deferred);
}).error(function(data) {
self.deferredHandler(data, deferred, 'Error Occured While Moving');
self.deferredHandler(data, deferred);
}).error(function(data) {
self.deferredHandler(data, deferred, 'Error Occured While Moving');
@@
-152,7
+149,7
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
});
return deferred.promise;
};
});
return deferred.promise;
};
-
+
Item.prototype.copy = function() {
var self = this;
var deferred = $q.defer();
Item.prototype.copy = function() {
var self = this;
var deferred = $q.defer();
@@
-249,7
+246,7
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
});
return deferred.promise;
};
});
return deferred.promise;
};
-
+
Item.prototype.getDescribePolicyContent = function() {
var self = this;
var deferred = $q.defer();
Item.prototype.getDescribePolicyContent = function() {
var self = this;
var deferred = $q.defer();
@@
-262,8
+259,7
@@
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;
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) {
self.deferredHandler(data, deferred, 'Error Occured While retrieving the Policy Data to Describe');
self.deferredHandler(data, deferred);
}).error(function(data) {
self.deferredHandler(data, deferred, 'Error Occured While retrieving the Policy Data to Describe');
@@
-315,7
+311,7
@@
angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', fun
});
return deferred.promise;
};
});
return deferred.promise;
};
-
+
Item.prototype.removePolicy = function() {
var self = this;
var deferred = $q.defer();
Item.prototype.removePolicy = function() {
var self = this;
var deferred = $q.defer();