diff --git a/app/components/swarm/swarm.html b/app/components/swarm/swarm.html index 661dbd710..5bead69b7 100644 --- a/app/components/swarm/swarm.html +++ b/app/components/swarm/swarm.html @@ -163,57 +163,65 @@ - + Name - - + + - + Role - - + + - + CPU - - + + - + Memory - - + + - + Engine - - + + + + + + + IP Address + + - + Status - - + + - {{ node.Description.Hostname }} - {{ node.Spec.Role }} - {{ node.Description.Resources.NanoCPUs / 1000000000 }} - {{ node.Description.Resources.MemoryBytes|humansize }} - {{ node.Description.Engine.EngineVersion }} - {{ node.Status.State }} + {{ node.Hostname }} + {{ node.Role }} + {{ node.CPUs / 1000000000 }} + {{ node.Memory|humansize }} + {{ node.EngineVersion }} + {{ node.Addr }} + {{ node.Status }} diff --git a/app/components/swarm/swarmController.js b/app/components/swarm/swarmController.js index 713db07ef..4855caf69 100644 --- a/app/components/swarm/swarmController.js +++ b/app/components/swarm/swarmController.js @@ -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; diff --git a/app/models/node.js b/app/models/node.js index 49aab6a13..1362d0885 100644 --- a/app/models/node.js +++ b/app/models/node.js @@ -27,6 +27,10 @@ function NodeViewModel(data) { this.Plugins = data.Description.Engine.Plugins; this.Status = data.Status.State; + if (data.Status.Addr) { + this.Addr = data.Status.Addr; + } + if (data.ManagerStatus) { this.Leader = data.ManagerStatus.Leader; this.Reachability = data.ManagerStatus.Reachability;