提交 d64dbe91 编写于 作者: N nicolargo

Docker plugin crashs with webserver mode (issue #654)

上级 4b0cfe80
......@@ -7,6 +7,8 @@
<div class="table-cell">Status</div>
<div class="table-cell">CPU%</div>
<div class="table-cell">MEM</div>
<div class="table-cell">RX/s</div>
<div class="table-cell">TX/s</div>
<div class="table-cell text-left">Command</div>
</div>
<div class="table-row" ng-repeat="container in statsDocker.containers">
......@@ -15,6 +17,8 @@
<div class="table-cell" ng-class="container.status == 'Paused' ? 'careful' : 'ok'">{{ container.status }}</div>
<div class="table-cell">{{ container.cpu | number:1 }}</div>
<div class="table-cell">{{ container.memory | bytes }}</div>
<div class="table-cell">{{ container.rx / container.time_since_update | bits }}</div>
<div class="table-cell">{{ container.tx / container.time_since_update | bits }}</div>
<div class="table-cell text-left">{{ container.command }}</div>
</div>
</div>
......@@ -14,15 +14,15 @@
</div>
<div class="table-row" ng-repeat="network in statsNetwork.networks | orderBy: 'interfaceName'">
<div class="table-cell text-left">{{ network.interfaceName | min_size }}</div>
<div class="table-cell" ng-show="!show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.rx|bytes) : (network.rx|bits) }}</div>
<div class="table-cell" ng-show="!show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.tx|bytes) : (network.tx|bits) }}</div>
<div class="table-cell" ng-show="!show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.rx / network.time_since_update | bytes) : (network.rx / network.time_since_update | bits) }}</div>
<div class="table-cell" ng-show="!show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.tx / network.time_since_update | bytes) : (network.tx / network.time_since_update | bits) }}</div>
<div class="table-cell" ng-show="!show.network_io_cumulative && show.network_io_combination"></div>
<div class="table-cell" ng-show="!show.network_io_cumulative && show.network_io_combination">{{ show.network_by_bytes ? (network.cx|bytes) : (network.cx|bits) }}</div>
<div class="table-cell" ng-show="!show.network_io_cumulative && show.network_io_combination">{{ show.network_by_bytes ? (network.cx / network.time_since_update | bytes) : (network.cx / network.time_since_update | bits) }}</div>
<div class="table-cell" ng-show="show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.cumulativeRx|bytes) : (network.cumulativeRx|bits) }}</div>
<div class="table-cell" ng-show="show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.cumulativeTx|bytes) : (network.cumulativeTx|bits) }}</div>
<div class="table-cell" ng-show="show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.cumulativeRx | bytes) : (network.cumulativeRx | bits) }}</div>
<div class="table-cell" ng-show="show.network_io_cumulative && !show.network_io_combination">{{ show.network_by_bytes ? (network.cumulativeTx | bytes) : (network.cumulativeTx | bits) }}</div>
<div class="table-cell" ng-show="show.network_io_cumulative && show.network_io_combination"></div>
<div class="table-cell" ng-show="show.network_io_cumulative && show.network_io_combination">{{ show.network_by_bytes ? (network.cumulativeCx|bytes) : (network.cumulativeCx|bits) }}</div>
<div class="table-cell" ng-show="show.network_io_cumulative && show.network_io_combination">{{ show.network_by_bytes ? (network.cumulativeCx | bytes) : (network.cumulativeCx | bits) }}</div>
</div>
......@@ -17,10 +17,13 @@ glancesApp.service('GlancesPluginDocker', function(GlancesPlugin) {
var container = {
'id': containerData.Id,
'name': containerData.Names[0],
'name': containerData.Names[0].split('/').splice(-1)[0],
'status': containerData.Status,
'cpu': containerData.cpu.total,
'memory': containerData.memory.total != undefined ? containerData.memory.total : '?',
'memory': containerData.memory.usage != undefined ? containerData.memory.usage : '?',
'rx': containerData.network.rx != undefined ? containerData.network.rx : '?',
'tx': containerData.network.tx != undefined ? containerData.network.tx : '?',
'time_since_update': containerData.network.time_since_update,
'command': containerData.Command,
'image': containerData.Image
};
......
......@@ -13,6 +13,7 @@ glancesApp.service('GlancesPluginNetwork', function() {
'rx': networkData['rx'],
'tx': networkData['tx'],
'cx': networkData['cx'],
'time_since_update': networkData['time_since_update'],
'cumulativeRx': networkData['cumulative_rx'],
'cumulativeTx': networkData['cumulative_tx'],
'cumulativeCx': networkData['cumulative_cx']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册