mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 22:55:55 +03:00
[WebUI] Hide additional cpu data if not available
This commit is contained in:
parent
b5e59d3e3a
commit
48261e9673
@ -53,25 +53,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="hidden-xs hidden-sm hidden-md col-lg-8">
|
<div class="hidden-xs hidden-sm hidden-md col-lg-8">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<div class="table-row">
|
<div class="table-row" ng-if="statsCpu.ctx_switches">
|
||||||
<div class="table-cell text-left">ctx_sw:</div>
|
<div class="table-cell text-left">ctx_sw:</div>
|
||||||
<div class="table-cell" ng-class="statsCpu.getDecoration('ctx_switches')">
|
<div class="table-cell" ng-class="statsCpu.getDecoration('ctx_switches')">
|
||||||
{{ statsCpu.ctx_switches }}
|
{{ statsCpu.ctx_switches }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-row">
|
<div class="table-row" ng-if="statsCpu.interrupts">
|
||||||
<div class="table-cell text-left">inter:</div>
|
<div class="table-cell text-left">inter:</div>
|
||||||
<div class="table-cell">
|
<div class="table-cell">
|
||||||
{{ statsCpu.interrupts }}
|
{{ statsCpu.interrupts }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-row">
|
<div class="table-row" ng-if="statsCpu.soft_interrupts">
|
||||||
<div class="table-cell text-left">sw_int:</div>
|
<div class="table-cell text-left">sw_int:</div>
|
||||||
<div class="table-cell">
|
<div class="table-cell">
|
||||||
{{ statsCpu.soft_interrupts }}
|
{{ statsCpu.soft_interrupts }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-row" ng-show="!statsSystem.isLinux()">
|
<div class="table-row" ng-if="!statsSystem.isLinux() && statsCpu.syscalls">
|
||||||
<div class="table-cell text-left">syscal:</div>
|
<div class="table-cell text-left">syscal:</div>
|
||||||
<div class="table-cell">
|
<div class="table-cell">
|
||||||
{{ statsCpu.syscalls }}
|
{{ statsCpu.syscalls }}
|
||||||
|
@ -27,11 +27,23 @@ glancesApp.service('GlancesPluginCpu', function() {
|
|||||||
this.irq = data.irq;
|
this.irq = data.irq;
|
||||||
this.iowait = data.iowait;
|
this.iowait = data.iowait;
|
||||||
this.steal = data.steal;
|
this.steal = data.steal;
|
||||||
|
|
||||||
|
if (data.ctx_switches) {
|
||||||
this.ctx_switches = Math.floor(data.ctx_switches / data.time_since_update);
|
this.ctx_switches = Math.floor(data.ctx_switches / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.interrupts) {
|
||||||
this.interrupts = Math.floor(data.interrupts / data.time_since_update);
|
this.interrupts = Math.floor(data.interrupts / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.soft_interrupts) {
|
||||||
this.soft_interrupts = Math.floor(data.soft_interrupts / data.time_since_update);
|
this.soft_interrupts = Math.floor(data.soft_interrupts / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.syscalls) {
|
||||||
this.syscalls = Math.floor(data.syscalls / data.time_since_update);
|
this.syscalls = Math.floor(data.syscalls / data.time_since_update);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.getDecoration = function(value) {
|
this.getDecoration = function(value) {
|
||||||
if(_view[value] == undefined) {
|
if(_view[value] == undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user