harbor/static/resources/js/services/log/services.list-log.js

32 lines
849 B
JavaScript
Raw Normal View History

(function() {
'use strict';
angular
.module('harbor.services.log')
.factory('ListLogService', ListLogService);
ListLogService.$inject = ['$http', '$log'];
function ListLogService($http, $log) {
return LogResult;
function LogResult(queryParams) {
2016-04-27 12:29:55 +02:00
var projectId = queryParams.projectId;
var username = queryParams.username;
var beginTimestamp = queryParams.beginTimestamp;
var endTimestamp = queryParams.endTimestamp;
var keywords = queryParams.keywords;
return $http
.post('/api/projects/' + projectId + '/logs/filter', {
'begin_timestamp' : beginTimestamp,
'end_timestamp' : endTimestamp,
2016-04-27 12:29:55 +02:00
'keywords' : keywords,
'project_id': Number(projectId),
2016-04-27 12:29:55 +02:00
'username' : username
});
}
}
})();