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:
parent
f3dc67a852
commit
594daf0de8
3 changed files with 26 additions and 2 deletions
|
@ -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>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
<div class="blocklist-item-line endpoint-item">
|
||||
<span class="small text-muted">
|
||||
<span ng-if="$ctrl.model.Type === 1 && !$ctrl.model.Snapshots[0].Swarm">
|
||||
<span ng-if="$ctrl.model.Type === 1">
|
||||
<span class="small text-muted">
|
||||
<i class="fa fa-microchip"></i> {{ $ctrl.model.Snapshots[0].TotalCPU }}<i class="fa fa-memory space-left"></i> {{ $ctrl.model.Snapshots[0].TotalMemory | humansize }}
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue