Merge pull request #860 from nclsHart/webui-finalize-amps

[Web UI] Finalize AMP plugin
This commit is contained in:
Nicolas Hennion 2016-05-03 22:50:06 +02:00
commit 13e2e4adf7
5 changed files with 15 additions and 7 deletions

View File

@ -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;
}

View File

@ -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>

View File

@ -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) {

View File

@ -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:

View File

@ -28,5 +28,6 @@ var keycodes = {
'F' : '70',
'g' : '71',
'r' : '82',
'q' : '81'
'q' : '81',
'A' : '65'
}