mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-19 08:21:01 +00:00
26 lines
514 B
JavaScript
26 lines
514 B
JavaScript
|
'use strict';
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
/**
|
||
|
* The LogService provides access to build
|
||
|
* log data using REST API calls.
|
||
|
*/
|
||
|
function LogService($http, $window) {
|
||
|
|
||
|
/**
|
||
|
* Gets a task logs.
|
||
|
*
|
||
|
* @param {string} Name of the repository.
|
||
|
* @param {number} Number of the build.
|
||
|
* @param {number} Number of the task.
|
||
|
*/
|
||
|
this.get = function(repoName, number, step) {
|
||
|
return $http.get('/api/logs/'+repoName+'/'+number+'/'+step);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
angular
|
||
|
.module('drone')
|
||
|
.service('logs', LogService);
|
||
|
})();
|