mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
Fix network stats error for 1.9.0+ clients, hide networks and volumes better on older clients.
This commit is contained in:
parent
22d35eb32f
commit
9d1193c0b5
4 changed files with 10 additions and 4 deletions
|
@ -138,6 +138,12 @@ angular.module('stats', [])
|
|||
var lastRxBytes = 0, lastTxBytes = 0;
|
||||
|
||||
function updateNetworkChart(data) {
|
||||
// 1.9+ contains an object of networks, for now we'll just show stats for the first network
|
||||
// TODO: Show graphs for all networks
|
||||
if (data.networks) {
|
||||
$scope.networkName = Object.keys(data.networks)[0];
|
||||
data.network = data.networks[$scope.networkName];
|
||||
}
|
||||
var rxBytes = 0, txBytes = 0;
|
||||
if (lastRxBytes !== 0 || lastTxBytes !== 0) {
|
||||
// These will be zero on first call, ignore to prevent large graph spike
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue