mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
Added module for container logs.
This commit is contained in:
parent
ca9355f617
commit
b70b3f3100
8 changed files with 110 additions and 1 deletions
|
@ -20,6 +20,19 @@ angular.module('dockerui.services', ['ngResource'])
|
|||
remove: {method: 'DELETE', params: {id: '@id', v:0}}
|
||||
});
|
||||
})
|
||||
.factory('ContainerLogs', function($resource, $http, Settings) {
|
||||
return {
|
||||
get: function(id, params, callback) {
|
||||
$http({
|
||||
method: 'GET',
|
||||
url: Settings.url + '/containers/'+id+'/logs',
|
||||
params: {'stdout': params.stdout || 0, 'stderr': params.stderr || 0, 'timestamps': params.timestamps || 0, 'tail': params.tail || 'all'}
|
||||
}).success(callback).error(function(data, status, headers, config) {
|
||||
console.log(error, data);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.factory('Image', function($resource, Settings) {
|
||||
// Resource for docker images
|
||||
// http://docs.docker.io/en/latest/api/docker_remote_api.html#images
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue