mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 18:48:02 +01:00
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
(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',
|
|
'templateUrl': '/static/resources/js/components/user-log/user-log.directive.html',
|
|
'controller': UserLogController,
|
|
'scope' : true,
|
|
'controllerAs': 'vm',
|
|
'bindToController': true
|
|
};
|
|
|
|
return directive;
|
|
}
|
|
|
|
})(); |