mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-03 07:03:40 +03:00
Apply previous fix "remove domain from username in processlist"
This commit is contained in:
parent
8463445e2c
commit
3fa0204153
@ -1,6 +1,10 @@
|
||||
<div ng-show="!vm.arguments.disable_process">
|
||||
<glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>
|
||||
<glances-plugin-amps ng-if="!vm.arguments.disable_amps"></glances-plugin-amps>
|
||||
<div class="row" ng-if="!vm.arguments.disable_amps">
|
||||
<div class="col-lg-18">
|
||||
<glances-plugin-amps></glances-plugin-amps>
|
||||
</div>
|
||||
</div>
|
||||
<glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>
|
||||
</div>
|
||||
<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press 'z' to display)</div>
|
||||
|
@ -46,6 +46,10 @@ function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter
|
||||
process.cmdline = process.cmdline.join(' ');
|
||||
}
|
||||
|
||||
if (data.isWindows) {
|
||||
process.username = _.last(process.username.split('\\'));
|
||||
}
|
||||
|
||||
vm.processes.push(process);
|
||||
}
|
||||
});
|
||||
|
88
glances/outputs/static/public/js/main.min.js
vendored
88
glances/outputs/static/public/js/main.min.js
vendored
@ -1054,6 +1054,48 @@ function GlancesPluginNetworkController($scope, $filter, ARGUMENTS) {
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginPercpu', {
|
||||
controller: GlancesPluginPercpuController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-percpu/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginPercpuController($scope, GlancesPluginHelper) {
|
||||
var vm = this;
|
||||
vm.cpus = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var percpuStats = data.stats['percpu'];
|
||||
|
||||
vm.cpus = [];
|
||||
|
||||
for (var i = 0; i < percpuStats.length; i++) {
|
||||
var cpuData = percpuStats[i];
|
||||
|
||||
vm.cpus.push({
|
||||
'total': cpuData.total,
|
||||
'user': cpuData.user,
|
||||
'system': cpuData.system,
|
||||
'idle': cpuData.idle,
|
||||
'iowait': cpuData.iowait,
|
||||
'steal': cpuData.steal
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
vm.getUserAlert = function(cpu) {
|
||||
return GlancesPluginHelper.getAlert('percpu', 'percpu_user_', cpu.user)
|
||||
};
|
||||
|
||||
vm.getSystemAlert = function(cpu) {
|
||||
return GlancesPluginHelper.getAlert('percpu', 'percpu_system_', cpu.system);
|
||||
};
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginPorts', {
|
||||
controller: GlancesPluginPortsController,
|
||||
controllerAs: 'vm',
|
||||
@ -1278,6 +1320,10 @@ function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter
|
||||
process.cmdline = process.cmdline.join(' ');
|
||||
}
|
||||
|
||||
if (data.isWindows) {
|
||||
process.username = _.last(process.username.split('\\'));
|
||||
}
|
||||
|
||||
vm.processes.push(process);
|
||||
}
|
||||
});
|
||||
@ -1297,48 +1343,6 @@ function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginPercpu', {
|
||||
controller: GlancesPluginPercpuController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-percpu/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginPercpuController($scope, GlancesPluginHelper) {
|
||||
var vm = this;
|
||||
vm.cpus = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var percpuStats = data.stats['percpu'];
|
||||
|
||||
vm.cpus = [];
|
||||
|
||||
for (var i = 0; i < percpuStats.length; i++) {
|
||||
var cpuData = percpuStats[i];
|
||||
|
||||
vm.cpus.push({
|
||||
'total': cpuData.total,
|
||||
'user': cpuData.user,
|
||||
'system': cpuData.system,
|
||||
'idle': cpuData.idle,
|
||||
'iowait': cpuData.iowait,
|
||||
'steal': cpuData.steal
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
vm.getUserAlert = function(cpu) {
|
||||
return GlancesPluginHelper.getAlert('percpu', 'percpu_user_', cpu.user)
|
||||
};
|
||||
|
||||
vm.getSystemAlert = function(cpu) {
|
||||
return GlancesPluginHelper.getAlert('percpu', 'percpu_system_', cpu.system);
|
||||
};
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginQuicklook', {
|
||||
controller: GlancesPluginQuicklookController,
|
||||
controllerAs: 'vm',
|
||||
|
@ -12,11 +12,11 @@ $templateCache.put('components/plugin-mem/view.html','<section id="mem" class="p
|
||||
$templateCache.put('components/plugin-mem-more/view.html','<section id="mem-more" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">active:</div>\n <div class="table-cell">{{ vm.active | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">inactive:</div>\n <div class="table-cell">{{ vm.inactive | bytes }}</div>\n </div>\n <div class="table-row" ng-show="vm.buffers != undefined">\n <div class="table-cell text-left">buffers:</div>\n <div class="table-cell">{{ vm.buffers | bytes }}</div>\n </div>\n <div class="table-row" ng-show="vm.cached != undefined">\n <div class="table-cell text-left">cached:</div>\n <div class="table-cell">{{ vm.cached | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-memswap/view.html','<section id="memswap" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">SWAP</div>\n <div class="table-cell">{{ vm.percent }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">total:</div>\n <div class="table-cell">{{ vm.total | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">used:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'used\')">\n {{ vm.used | bytes }}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">free:</div>\n <div class="table-cell">{{ vm.free | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-network/view.html','<div class="table-row">\n <div class="table-cell text-left title">NETWORK</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">Rx/s</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">Tx/s</div>\n\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx/s</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">Rx</div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">Tx</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx</div>\n</div>\n<div class="table-row" ng-repeat="network in vm.networks track by network.interfaceName">\n <div class="table-cell text-left">{{ network.interfaceName | min_size }}</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.rx / network.time_since_update | bytes) : (network.rx / network.time_since_update | bits) }}</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.tx / network.time_since_update | bytes) : (network.tx / network.time_since_update | bits) }}</div>\n\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cx / network.time_since_update | bytes) : (network.cx / network.time_since_update | bits) }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeRx | bytes) : (network.cumulativeRx | bits) }}</div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeTx | bytes) : (network.cumulativeTx | bits) }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeCx | bytes) : (network.cumulativeCx | bits) }}</div>\n</div>\n');
|
||||
$templateCache.put('components/plugin-percpu/view.html','<section id="percpu" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">PER CPU</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.total }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">user:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getUserAlert(percpu)">\n {{ percpu.user }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">system:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.system }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">idle:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.idle }}%</div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].iowait">\n <div class="table-cell text-left">iowait:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.iowait }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].steal">\n <div class="table-cell text-left">steal:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.steal }}%\n </div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-ports/view.html','<div class="table-row" ng-repeat="port in vm.ports">\n <div class="table-cell text-left">{{(port.description ? port.description : port.host + \' \' + port.port) | min_size: 20}}</div>\n <div class="table-cell"></div>\n <div ng-switch="port.status" ng-class="vm.getDecoration(port)" class="table-cell">\n <span ng-switch-when="null">Scanning</span>\n <span ng-switch-when="false">Timeout</span>\n <span ng-switch-when="true">Open</span>\n <span ng-switch-default>{{port.status * 1000.0 | number:0}}ms</span>\n </div>\n</div>');
|
||||
$templateCache.put('components/plugin-process/view.html','<div ng-show="!vm.arguments.disable_process">\n <glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>\n <glances-plugin-amps ng-if="!vm.arguments.disable_amps"></glances-plugin-amps>\n <glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>\n</div>\n<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press \'z\' to display)</div>\n');
|
||||
$templateCache.put('components/plugin-process/view.html','<div ng-show="!vm.arguments.disable_process">\n <glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>\n <div class="row" ng-if="!vm.arguments.disable_amps">\n <div class="col-lg-18">\n <glances-plugin-amps></glances-plugin-amps>\n </div>\n </div>\n <glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>\n</div>\n<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press \'z\' to display)</div>\n');
|
||||
$templateCache.put('components/plugin-processcount/view.html','<section id="processcount" class="plugin">\n <span class="title">TASKS</span>\n <span>{{ vm.total }} ({{ vm.thread }} thr),</span>\n <span>{{ vm.running }} run,</span>\n <span>{{ vm.sleeping }} slp,</span>\n <span>{{ vm.stopped }} oth</span>\n <span> sorted {{ vm.sorter.auto ? \'automatically\' : \'\' }} by {{ vm.sorter.getColumnLabel(vm.sorter.column) }}, flat view</span>\n</section>');
|
||||
$templateCache.put('components/plugin-processlist/view.html','<section id="processlist-plugin" class="plugin">\n <div class="table">\n <div class="table-row">\n <div sortable-th sorter="vm.sorter" column="cpu_percent" class="table-cell">CPU%</div>\n <div sortable-th sorter="vm.sorter" column="memory_percent" class="table-cell">MEM%</div>\n <div class="table-cell hidden-xs hidden-sm">VIRT</div>\n <div class="table-cell hidden-xs hidden-sm">RES</div>\n <div class="table-cell">PID</div>\n <div sortable-th sorter="vm.sorter" column="username" class="table-cell text-left">USER</div>\n <div class="table-cell">NI</div>\n <div class="table-cell">S</div>\n <div sortable-th sorter="vm.sorter" column="timemillis" class="table-cell hidden-xs hidden-sm">TIME+</div>\n <div sortable-th sorter="vm.sorter" column="io_read" class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">IOR/s</div>\n <div sortable-th sorter="vm.sorter" column="io_write" class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">IOW/s</div>\n <div sortable-th sorter="vm.sorter" column="name" class="table-cell text-left">Command</div>\n </div>\n <div class="table-row" ng-repeat="process in vm.processes | orderBy:vm.sorter.column:vm.sorter.isReverseColumn(vm.sorter.column) | limitTo: vm.getLimit() track by process.pid">\n <div class="table-cell" ng-class="vm.getCpuPercentAlert(process)">{{process.cpu_percent | number:1}}</div>\n <div class="table-cell" ng-class="vm.getMemoryPercentAlert(process)">{{process.memory_percent | number:1}}</div>\n <div class="table-cell hidden-xs hidden-sm">{{process.memvirt | bytes}}</div>\n <div class="table-cell hidden-xs hidden-sm">{{process.memres | bytes}}</div>\n <div class="table-cell">{{process.pid}}</div>\n <div class="table-cell text-left">{{process.username}}</div>\n <div class="table-cell" ng-class="{nice: process.isNice}">{{process.nice | exclamation}}</div>\n <div class="table-cell" ng-class="{status: process.status == \'R\'}">{{process.status}}</div>\n <div class="table-cell hidden-xs hidden-sm">\n <span ng-show="process.timeplus.hours > 0" class="highlight">{{ process.timeplus.hours }}h</span>{{ process.timeplus.minutes | leftPad:2:\'0\' }}:{{ process.timeplus.seconds | leftPad:2:\'0\' }}<span ng-show="process.timeplus.hours <= 0">.{{ process.timeplus.milliseconds | leftPad:2:\'0\' }}</span>\n </div>\n <div class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">{{process.ioRead}}</div>\n <div class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">{{process.ioWrite}}</div>\n <div class="table-cell text-left" ng-show="vm.arguments.process_short_name">{{process.name}}</div>\n <div class="table-cell text-left" ng-show="!vm.arguments.process_short_name">{{process.cmdline}}</div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-percpu/view.html','<section id="percpu" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">PER CPU</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.total }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">user:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getUserAlert(percpu)">\n {{ percpu.user }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">system:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.system }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">idle:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.idle }}%</div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].iowait">\n <div class="table-cell text-left">iowait:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.iowait }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].steal">\n <div class="table-cell text-left">steal:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.steal }}%\n </div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-quicklook/view.html','<section id="quicklook-plugin" class="plugin">\n <div class="cpu-name">\n {{ vm.cpu_name }}\n </div>\n <div class="table">\n <div class="table-row" ng-show="!vm.arguments.percpu">\n <div class="table-cell text-left">CPU</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'cpu\') }}" role="progressbar" aria-valuenow="{{ vm.cpu }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.cpu }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.cpu }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.arguments.percpu" ng-repeat="percpu in vm.percpus">\n <div class="table-cell text-left">CPU{{ percpu.number }}</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'cpu\') }}" role="progressbar" aria-valuenow="{{ percpu.total }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percpu.total }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ percpu.total }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">MEM</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'mem\') }}" role="progressbar" aria-valuenow="{{ vm.mem }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.mem }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.mem }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">SWAP</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'swap\') }}" role="progressbar" aria-valuenow="{{ vm.swap }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.swap }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.swap }}%\n </div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-system/view.html','<section id="system">\n <span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>\n <span class="title">{{ vm.hostname }}</span>\n <span ng-show="vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>\n <span ng-show="!vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>\n</section>\n');
|
||||
$templateCache.put('components/plugin-uptime/view.html','<section id="uptime">\n <span>Uptime: {{ vm.value }}</span>\n</section>\n');
|
||||
|
Loading…
Reference in New Issue
Block a user