mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-27 19:25:27 +03:00
Merge pull request #860 from nclsHart/webui-finalize-amps
[Web UI] Finalize AMP plugin
This commit is contained in:
commit
13e2e4adf7
@ -136,7 +136,7 @@ body {
|
||||
#amps .process-result {
|
||||
max-width: 300px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
white-space: pre-wrap;
|
||||
padding-left: 10px;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="table">
|
||||
<div class="table-row" ng-repeat="process in statsAmps.processes">
|
||||
<div class="table-cell" ng-class="statsAmps.getDescriptionDecoration(process)">{{ process.name }}</div>
|
||||
<div class="table-cell">{{ process.count }}</div>
|
||||
<div class="table-cell process-result">{{ process.result }}</div>
|
||||
<div class="table-cell text-left" ng-class="statsAmps.getDescriptionDecoration(process)">{{ process.name }}</div>
|
||||
<div class="table-cell text-left">{{ process.count }}</div>
|
||||
<div class="table-cell text-left process-result">{{ process.result }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,7 +3,14 @@ glancesApp.service('GlancesPluginAmps', function() {
|
||||
this.processes = [];
|
||||
|
||||
this.setData = function(data, views) {
|
||||
this.processes = data[_pluginName];
|
||||
var processes = data[_pluginName];
|
||||
|
||||
this.processes = [];
|
||||
angular.forEach(processes, function(process, key) {
|
||||
if (process.result !== null) {
|
||||
this.processes.push(process);
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
|
||||
this.getDescriptionDecoration = function(process) {
|
||||
|
@ -65,7 +65,7 @@ glancesApp.controller('statsController', function ($scope, $rootScope, $interval
|
||||
$scope.sorter.auto = true;
|
||||
break;
|
||||
case $event.shiftKey && $event.keyCode == keycodes.A:
|
||||
// D => Enable/disable AMPs
|
||||
// A => Enable/disable AMPs
|
||||
$scope.arguments.disable_amps = !$scope.arguments.disable_amps;
|
||||
break;
|
||||
case !$event.shiftKey && $event.keyCode == keycodes.c:
|
||||
|
@ -28,5 +28,6 @@ var keycodes = {
|
||||
'F' : '70',
|
||||
'g' : '71',
|
||||
'r' : '82',
|
||||
'q' : '81'
|
||||
'q' : '81',
|
||||
'A' : '65'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user