1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(swarm): display the IP address of each node when API Version >= … (#595)

This commit is contained in:
Anthony Lapenna 2017-02-13 22:39:02 +13:00 committed by GitHub
parent 781dad3e17
commit 85a07237b1
3 changed files with 39 additions and 25 deletions

View file

@ -28,7 +28,9 @@ function ($scope, Info, Version, Node, Pagination) {
$scope.info = d;
if ($scope.applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE') {
Node.query({}, function(d) {
$scope.nodes = d;
$scope.nodes = d.map(function (node) {
return new NodeViewModel(node);
});
var CPU = 0, memory = 0;
angular.forEach(d, function(node) {
CPU += node.Description.Resources.NanoCPUs;