mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Fix "Nice: nice values != 0 (Unix-like) and != 32 (Windows) should be highlighted"
This commit is contained in:
parent
5d8b177c4f
commit
de0dc0c25c
@ -20,7 +20,7 @@
|
||||
<div class="table-cell hidden-xs hidden-sm">{{process.memres | bytes}}</div>
|
||||
<div class="table-cell">{{process.pid}}</div>
|
||||
<div class="table-cell text-left">{{process.username}}</div>
|
||||
<div class="table-cell">{{process.nice | exclamation}}</div>
|
||||
<div class="table-cell" ng-class="{nice: isNice(process.nice)}">{{process.nice | exclamation}}</div>
|
||||
<div class="table-cell" ng-class="{status: process.status == 'R'}">{{process.status}}</div>
|
||||
<div class="table-cell hidden-xs hidden-sm">{{process.timeformatted}}</div>
|
||||
<div class="table-cell hidden-xs hidden-sm">{{process.io_read}}</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<span class="title">
|
||||
{{ result["system"].hostname }}
|
||||
</span>
|
||||
<span ng-if="result['os_name'] == 'Linux'" class="hidden-xs hidden-sm">({{ result["system"].hr_name }} / {{ result["system"].os_name }} {{ result["system"].os_version }})</span>
|
||||
<span ng-if="result['os_name'] != 'Linux'" class="hidden-xs hidden-sm">({{ result["system"].os_name }} {{ result["system"].os_version }} {{ result["system"].platform }})</span>
|
||||
<span ng-if="is_linux" class="hidden-xs hidden-sm">({{ result["system"].hr_name }} / {{ result["system"].os_name }} {{ result["system"].os_version }})</span>
|
||||
<span ng-if="!is_linux" class="hidden-xs hidden-sm">({{ result["system"].os_name }} {{ result["system"].os_version }} {{ result["system"].platform }})</span>
|
||||
|
@ -149,6 +149,12 @@ glancesApp.controller('statsController', function($scope, $http, $interval, $q,
|
||||
alert.duration = durationBetweenTwoDates(alert.begin, alert.end);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.is_bsd = response['system'].os_name === 'FreeBSD';
|
||||
$scope.is_linux = response['system'].os_name === 'Linux';
|
||||
$scope.is_mac = response['system'].os_name === 'Darwin';
|
||||
$scope.is_windows = response['system'].os_name === 'Windows';
|
||||
|
||||
$scope.result = response;
|
||||
canceler.resolve()
|
||||
}).error(function(d, status, headers, config) {
|
||||
@ -157,6 +163,14 @@ glancesApp.controller('statsController', function($scope, $http, $interval, $q,
|
||||
});
|
||||
}
|
||||
|
||||
$scope.isNice = function(nice) {
|
||||
if(nice !== undefined && (($scope.is_windows && nice != 32) || (!$scope.is_windows && nice != 0))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$scope.getClass = function(pluginName, limitNamePrefix, value, num) {
|
||||
if ($scope.pluginLimits != undefined && $scope.pluginLimits[pluginName] != undefined) {
|
||||
for (var i = 0; i < $scope.limitSuffix.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user