2016-06-14 12:47:32 +02:00
|
|
|
(function() {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular
|
|
|
|
.module('harbor.services.replication.policy')
|
|
|
|
.factory('UpdateReplicationPolicyService', UpdateReplicationPolicyService);
|
|
|
|
|
|
|
|
UpdateReplicationPolicyService.$inject = ['$http'];
|
|
|
|
|
|
|
|
function UpdateReplicationPolicyService($http) {
|
|
|
|
return updateReplicationPolicy;
|
|
|
|
function updateReplicationPolicy(policyId, policy) {
|
|
|
|
return $http
|
|
|
|
.put('/api/policies/replication/' + policyId, {
|
|
|
|
'name': policy.name,
|
|
|
|
'description': policy.description,
|
2016-06-15 11:46:23 +02:00
|
|
|
'enabled': policy.enabled,
|
|
|
|
'target_id': policy.targetId
|
2016-06-14 12:47:32 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
})();
|