mirror of https://github.com/portainer/portainer
feat(home): add node count to endpoint list. (#4793)
* feat(home): add node count to endpoint list. * feat(home): add node count beside docker versionpull/4484/head
parent
36fcbb9e18
commit
52d4296c08
|
@ -118,6 +118,7 @@ func snapshotNodes(snapshot *portainer.DockerSnapshot, cli *client.Client) error
|
|||
}
|
||||
snapshot.TotalCPU = int(nanoCpus / 1e9)
|
||||
snapshot.TotalMemory = totalMem
|
||||
snapshot.NodeCount = len(nodes)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ type (
|
|||
ImageCount int `json:"ImageCount"`
|
||||
ServiceCount int `json:"ServiceCount"`
|
||||
StackCount int `json:"StackCount"`
|
||||
NodeCount int `json:"NodeCount"`
|
||||
SnapshotRaw DockerSnapshotRaw `json:"DockerSnapshotRaw"`
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,10 @@
|
|||
<span class="small text-muted">
|
||||
{{ $ctrl.model.Snapshots[0].Swarm ? 'Swarm' : 'Standalone' }} {{ $ctrl.model.Snapshots[0].DockerVersion }}
|
||||
<span ng-if="$ctrl.model.Type === 2">+ <i class="fa fa-bolt" aria-hidden="true"></i> Agent</span>
|
||||
<span style="padding: 0 7px 0 0;" ng-if="$ctrl.model.Snapshots[0].Swarm">
|
||||
<i class="fa fa-hdd space-left space-right" aria-hidden="true"></i>{{ $ctrl.model.Snapshots[0].NodeCount }}
|
||||
{{ $ctrl.model.Snapshots[0].NodeCount === 1 ? 'node' : 'nodes' }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue