2016-06-14 07:56:25 +02:00
|
|
|
(function() {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular
|
|
|
|
.module('harbor.user.log')
|
|
|
|
.directive('userLog', userLog);
|
|
|
|
|
|
|
|
UserLogController.$inject = ['ListIntegratedLogService'];
|
|
|
|
|
|
|
|
function UserLogController(ListIntegratedLogService) {
|
|
|
|
var vm = this;
|
|
|
|
|
|
|
|
ListIntegratedLogService()
|
|
|
|
.success(listIntegratedLogSuccess)
|
|
|
|
.error(listIntegratedLogFailed);
|
|
|
|
|
|
|
|
function listIntegratedLogSuccess(data) {
|
|
|
|
vm.integratedLogs = data || []
|
|
|
|
}
|
|
|
|
|
|
|
|
function listIntegratedLogFailed(data, status) {
|
|
|
|
console.log('Failed list integrated logs:' + status);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function userLog() {
|
|
|
|
var directive = {
|
|
|
|
'restrict': 'E',
|
2016-06-16 08:10:35 +02:00
|
|
|
'templateUrl': '/static/resources/js/components/user-log/user-log.directive.html',
|
2016-06-14 07:56:25 +02:00
|
|
|
'controller': UserLogController,
|
|
|
|
'scope' : true,
|
|
|
|
'controllerAs': 'vm',
|
|
|
|
'bindToController': true
|
|
|
|
};
|
|
|
|
|
|
|
|
return directive;
|
|
|
|
}
|
|
|
|
|
|
|
|
})();
|