2017-01-31 23:26:29 +00:00
|
|
|
angular.module('portainer.rest')
|
2017-07-20 14:22:27 +00:00
|
|
|
.factory('ContainerTop', ['$http', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function ($http, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
2017-01-31 23:26:29 +00:00
|
|
|
'use strict';
|
|
|
|
return {
|
|
|
|
get: function (id, params, callback, errorCallback) {
|
|
|
|
$http({
|
|
|
|
method: 'GET',
|
2017-07-20 14:22:27 +00:00
|
|
|
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/containers/' + id + '/top',
|
2017-01-31 23:26:29 +00:00
|
|
|
params: {
|
|
|
|
ps_args: params.ps_args
|
|
|
|
}
|
|
|
|
}).success(callback);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}]);
|