mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-15 12:11:23 +01:00
32 lines
683 B
JavaScript
32 lines
683 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.replication')
|
|
.directive('createPolicy', createPolicy);
|
|
|
|
function CreatePolicyController() {
|
|
var vm = this;
|
|
vm.enabled = true;
|
|
vm.save = save;
|
|
|
|
function save(policy) {
|
|
console.log(angular.toJson(policy));
|
|
}
|
|
}
|
|
|
|
function createPolicy() {
|
|
var directive = {
|
|
'restrict': 'E',
|
|
'templateUrl': '/static/ng/resources/js/components/replication/create-policy.directive.html',
|
|
'scope': true,
|
|
'replace': true,
|
|
'controller': CreatePolicyController,
|
|
'controllerAs': 'vm',
|
|
'bindToController': true
|
|
};
|
|
return directive;
|
|
}
|
|
|
|
})(); |