/*-
* ============LICENSE_START=======================================================
- * ECOMP Policy Engine
+ * 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.
path: path || [],
type: model && model.type || 'file',
size: model && parseInt(model.size || 0),
- date: parseMySQLDate(model && model.date),
+ date: model && model.date,
version: model && model.version || '',
createdBy: model && model.createdBy || '',
modifiedBy: model && model.modifiedBy || '',
+ roleType: model && model.roleType || '',
content: model && model.content || '',
recursive: false,
sizeKb: function() {
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() {
this.update();
return deferred.resolve(data);
};
-
+
Item.prototype.createFolder = function() {
var self = this;
var deferred = $q.defer();
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;
+ }
self.deferredHandler(data, deferred);
}).error(function(data) {
self.deferredHandler(data, deferred, 'Error Occured While Moving');
});
return deferred.promise;
};
-
+
Item.prototype.copy = function() {
var self = this;
var deferred = $q.defer();
});
return deferred.promise;
};
-
+
Item.prototype.getDescribePolicyContent = function() {
var self = this;
var deferred = $q.defer();
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');
});
return deferred.promise;
};
-
+
Item.prototype.removePolicy = function() {
var self = this;
var deferred = $q.defer();