fix(rest): fix an issue with rest factories using $http (#1077)

pull/1079/merge
Anthony Lapenna 7 years ago committed by GitHub
parent 252e05e963
commit 5110f83fae

@ -5,7 +5,7 @@ angular.module('portainer.rest')
get: function (id, params, callback) {
$http({
method: 'GET',
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/containers/' + id + '/logs',
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/docker/containers/' + id + '/logs',
params: {
'stdout': params.stdout || 0,
'stderr': params.stderr || 0,
@ -13,7 +13,7 @@ angular.module('portainer.rest')
'tail': params.tail || 'all'
}
}).success(callback).error(function (data, status, headers, config) {
console.log(error, data);
console.log(data);
});
}
};

@ -5,11 +5,13 @@ angular.module('portainer.rest')
get: function (id, params, callback, errorCallback) {
$http({
method: 'GET',
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/containers/' + id + '/top',
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/docker/containers/' + id + '/top',
params: {
ps_args: params.ps_args
}
}).success(callback);
}).success(callback).error(function (data, status, headers, config) {
console.log(data);
});
}
};
}]);

@ -5,7 +5,7 @@ angular.module('portainer.rest')
get: function (id, params, callback) {
$http({
method: 'GET',
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/services/' + id + '/logs',
url: API_ENDPOINT_ENDPOINTS + '/' + EndpointProvider.endpointID() + '/docker/services/' + id + '/logs',
params: {
'stdout': params.stdout || 0,
'stderr': params.stderr || 0,
@ -13,7 +13,7 @@ angular.module('portainer.rest')
'tail': params.tail || 'all'
}
}).success(callback).error(function (data, status, headers, config) {
console.log(error, data);
console.log(data);
});
}
};

Loading…
Cancel
Save