1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

fix(home): Show correct number of cpus and total memory for swarm (#2147)

* fix(home): show cpu/mem for swarm

* fix(home): add nodes data to snapshot

* fix(dashboard): get cpus/mem from snapshot

* refactor(home): remove temp variable
This commit is contained in:
Chaim Lev-Ari 2018-08-13 20:20:56 +01:00 committed by Anthony Lapenna
parent f3dc67a852
commit 594daf0de8
3 changed files with 26 additions and 2 deletions

View file

@ -45,7 +45,10 @@
<td>Endpoint</td>
<td>
{{ endpoint.Name }}
<span class="small text-muted space-left"><i class="fa fa-microchip"></i> {{ info.NCPU }}<i class="fa fa-memory space-left"></i> {{ info.MemTotal | humansize }}</span>
<span class="small text-muted space-left">
<i class="fa fa-microchip"></i> {{ endpoint.Snapshots[0].TotalCPU }}
<i class="fa fa-memory space-left"></i> {{ endpoint.Snapshots[0].TotalMemory | humansize }}
</span>
<span class="small text-muted"> - {{ info.Swarm && info.Swarm.NodeID !== '' ? 'Swarm' : 'Standalone' }} {{ info.ServerVersion }} <span ng-if="endpoint.Type === 2">+ <i class="fa fa-bolt" aria-hidden="true"></i> Agent</span></span>
</td>
</tr>