mirror of
https://github.com/nicolargo/glances.git
synced 2026-05-24 06:26:03 -04:00
Showing the full arguments on the command column of the TASKS Section of the Web UI. #2634
This commit is contained in:
@@ -622,10 +622,6 @@ Examples of use:
|
||||
if args.disable_autodiscover:
|
||||
logger.info("Auto discover mode is disabled")
|
||||
|
||||
# In web server mode
|
||||
if args.webserver:
|
||||
args.process_short_name = True
|
||||
|
||||
# Server or client login/password
|
||||
if args.username_prompt:
|
||||
# Every username needs a password
|
||||
|
||||
@@ -19,11 +19,11 @@ body {
|
||||
display: table-cell;
|
||||
text-align: right;
|
||||
}
|
||||
.width-50 {
|
||||
width: 50px;
|
||||
.width-60 {
|
||||
width: 60px;
|
||||
}
|
||||
.width-75 {
|
||||
width: 75px;
|
||||
.width-80 {
|
||||
width: 80px;
|
||||
}
|
||||
.width-100 {
|
||||
width: 100px;
|
||||
|
||||
@@ -339,7 +339,7 @@ export default {
|
||||
});
|
||||
|
||||
// SLASH => Enable/disable short processes name
|
||||
hotkeys('/', () => {
|
||||
hotkeys('shift+S', () => {
|
||||
this.store.args.process_short_name = !this.store.args.process_short_name;
|
||||
});
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
<section id="processlist-plugin" class="plugin">
|
||||
<div class="table">
|
||||
<div class="table-row">
|
||||
<div class="table-cell width-50" :class="['sortable', sorter.column === 'cpu_percent' && 'sort']"
|
||||
<div class="table-cell width-60" :class="['sortable', sorter.column === 'cpu_percent' && 'sort']"
|
||||
@click="$emit('update:sorter', 'cpu_percent')">
|
||||
CPU%
|
||||
</div>
|
||||
<div class="table-cell width-50" :class="['sortable', sorter.column === 'memory_percent' && 'sort']"
|
||||
<div class="table-cell width-60" :class="['sortable', sorter.column === 'memory_percent' && 'sort']"
|
||||
@click="$emit('update:sorter', 'memory_percent')">
|
||||
MEM%
|
||||
</div>
|
||||
<div class="table-cell width-75 hidden-xs hidden-sm">VIRT</div>
|
||||
<div class="table-cell width-75 hidden-xs hidden-sm">RES</div>
|
||||
<div class="table-cell width-75">PID</div>
|
||||
<div class="table-cell width-80 hidden-xs hidden-sm">VIRT</div>
|
||||
<div class="table-cell width-80 hidden-xs hidden-sm">RES</div>
|
||||
<div class="table-cell width-80">PID</div>
|
||||
<div class="table-cell width-100 text-left" :class="['sortable', sorter.column === 'username' && 'sort']"
|
||||
@click="$emit('update:sorter', 'username')">
|
||||
USER
|
||||
@@ -23,19 +23,19 @@
|
||||
@click="$emit('update:sorter', 'timemillis')">
|
||||
TIME+
|
||||
</div>
|
||||
<div class="table-cell width-75 text-left hidden-xs hidden-sm"
|
||||
<div class="table-cell width-80 text-left hidden-xs hidden-sm"
|
||||
:class="['sortable', sorter.column === 'num_threads' && 'sort']"
|
||||
@click="$emit('update:sorter', 'num_threads')">
|
||||
THR
|
||||
</div>
|
||||
<div class="table-cell width-50">NI</div>
|
||||
<div class="table-cell width-50">S</div>
|
||||
<div v-show="ioReadWritePresent" class="table-cell width-75 hidden-xs hidden-sm"
|
||||
<div class="table-cell width-60">NI</div>
|
||||
<div class="table-cell width-60">S</div>
|
||||
<div v-show="ioReadWritePresent" class="table-cell width-80 hidden-xs hidden-sm"
|
||||
:class="['sortable', sorter.column === 'io_counters' && 'sort']"
|
||||
@click="$emit('update:sorter', 'io_counters')">
|
||||
IOR/s
|
||||
</div>
|
||||
<div v-show="ioReadWritePresent" class="table-cell width-75 text-left hidden-xs hidden-sm"
|
||||
<div v-show="ioReadWritePresent" class="table-cell width-80 text-left hidden-xs hidden-sm"
|
||||
:class="['sortable', sorter.column === 'io_counters' && 'sort']"
|
||||
@click="$emit('update:sorter', 'io_counters')">
|
||||
IOW/s
|
||||
@@ -46,19 +46,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-row" v-for="(process, processId) in processes" :key="processId">
|
||||
<div class="table-cell width-50" :class="getCpuPercentAlert(process)">
|
||||
<div class="table-cell width-60" :class="getCpuPercentAlert(process)">
|
||||
{{ process.cpu_percent == -1 ? '?' : $filters.number(process.cpu_percent, 1) }}
|
||||
</div>
|
||||
<div class="table-cell width-50" :class="getMemoryPercentAlert(process)">
|
||||
<div class="table-cell width-60" :class="getMemoryPercentAlert(process)">
|
||||
{{ process.memory_percent == -1 ? '?' : $filters.number(process.memory_percent, 1) }}
|
||||
</div>
|
||||
<div class="table-cell width-75">
|
||||
<div class="table-cell width-80">
|
||||
{{ $filters.bytes(process.memvirt) }}
|
||||
</div>
|
||||
<div class="table-cell width-75">
|
||||
<div class="table-cell width-80">
|
||||
{{ $filters.bytes(process.memres) }}
|
||||
</div>
|
||||
<div class="table-cell width-75">
|
||||
<div class="table-cell width-80">
|
||||
{{ process.pid }}
|
||||
</div>
|
||||
<div class="table-cell width-100 text-left">
|
||||
@@ -71,20 +71,20 @@
|
||||
<span v-show="process.timeplus.hours <= 0">.{{ $filters.leftPad(process.timeplus.milliseconds, 2, '0')
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="table-cell width-75 hidden-xs hidden-sm" v-if="process.timeplus == '?'">?</div>
|
||||
<div class="table-cell width-75 text-left hidden-xs hidden-sm">
|
||||
<div class="table-cell width-80 hidden-xs hidden-sm" v-if="process.timeplus == '?'">?</div>
|
||||
<div class="table-cell width-80 text-left hidden-xs hidden-sm">
|
||||
{{ process.num_threads == -1 ? '?' : process.num_threads }}
|
||||
</div>
|
||||
<div class="table-cell width-50" :class="{ nice: process.isNice }">
|
||||
<div class="table-cell width-60" :class="{ nice: process.isNice }">
|
||||
{{ $filters.exclamation(process.nice) }}
|
||||
</div>
|
||||
<div class="table-cell width-50" :class="{ status: process.status == 'R' }">
|
||||
<div class="table-cell width-60" :class="{ status: process.status == 'R' }">
|
||||
{{ process.status }}
|
||||
</div>
|
||||
<div class="table-cell width-75 hidden-xs hidden-sm" v-show="ioReadWritePresent">
|
||||
<div class="table-cell width-80 hidden-xs hidden-sm" v-show="ioReadWritePresent">
|
||||
{{ $filters.bytes(process.io_read) }}
|
||||
</div>
|
||||
<div class="table-cell width-75 text-left hidden-xs hidden-sm" v-show="ioReadWritePresent">
|
||||
<div class="table-cell width-80 text-left hidden-xs hidden-sm" v-show="ioReadWritePresent">
|
||||
{{ $filters.bytes(process.io_write) }}
|
||||
</div>
|
||||
<div class="table-cell text-left" v-show="args.process_short_name">
|
||||
@@ -139,6 +139,10 @@ export default {
|
||||
process.memres = process.memory_info.rss;
|
||||
}
|
||||
|
||||
if (isWindows && process.username !== null) {
|
||||
process.username = last(process.username.split('\\'));
|
||||
}
|
||||
|
||||
process.timeplus = '?';
|
||||
process.timemillis = '?';
|
||||
if (process.cpu_times) {
|
||||
@@ -178,14 +182,10 @@ export default {
|
||||
process.cmdline = process.cmdline.join(' ').replace(/\n/g, ' ');
|
||||
}
|
||||
|
||||
if (process.cmdline === null) {
|
||||
if (process.cmdline === null || process.cmdline.length === 0) {
|
||||
process.cmdline = process.name;
|
||||
}
|
||||
|
||||
if (isWindows && process.username !== null) {
|
||||
process.username = last(process.username.split('\\'));
|
||||
}
|
||||
|
||||
return process;
|
||||
});
|
||||
|
||||
|
||||
BIN
glances/outputs/static/public/glances.js
vendored
BIN
glances/outputs/static/public/glances.js
vendored
Binary file not shown.
@@ -28,6 +28,7 @@ class PluginModel(GlancesPluginModel):
|
||||
|
||||
# Set the config instance
|
||||
self.config = config
|
||||
self.args = args
|
||||
|
||||
# We want to display the stat in the curse interface
|
||||
self.display_curse = True
|
||||
@@ -105,22 +106,32 @@ class PluginModel(GlancesPluginModel):
|
||||
('toggle_linux_percentage', msg_col.format('0', 'Load, Linux/percentage')),
|
||||
('toggle_cpu_individual_combined', msg_col.format('1', 'CPU, individual/combined')),
|
||||
('toggle_gpu_individual_combined', msg_col.format('6', 'GPU, individual/combined')),
|
||||
('toggle_short_full', msg_col.format('/', 'Process names, short/full')),
|
||||
('toggle_short_full',
|
||||
msg_col.format('S',
|
||||
'Process names, short/full') if self.args.webserver else msg_col.format('/', 'Process names, short/full')),
|
||||
('header_miscellaneous', msg_header.format('MISCELLANEOUS:')),
|
||||
('misc_erase_process_filter', msg_col.format('E', 'Erase process filter')),
|
||||
('misc_generate_history_graphs', msg_col.format('g', 'Generate history graphs')),
|
||||
('misc_erase_process_filter',
|
||||
'' if self.args.webserver else msg_col.format('E', 'Erase process filter')),
|
||||
('misc_generate_history_graphs',
|
||||
'' if self.args.webserver else msg_col.format('g', 'Generate history graphs')),
|
||||
('misc_help', msg_col.format('h', 'HELP')),
|
||||
('misc_accumulate_processes_by_program', msg_col.format('j', 'Display threads or programs')),
|
||||
('misc_accumulate_processes_by_program',
|
||||
'' if self.args.webserver else msg_col.format('j', 'Display threads or programs')),
|
||||
('misc_increase_nice_process', msg_col.format('+', 'Increase nice process')),
|
||||
('misc_decrease_nice_process', msg_col.format('-', 'Decrease nice process (need admin rights)')),
|
||||
('misc_kill_process', msg_col.format('k', 'Kill process')),
|
||||
('misc_reset_processes_summary_min_max', msg_col.format('M', 'Reset processes summary min/max')),
|
||||
('misc_quit', msg_col.format('q', 'QUIT (or Esc or Ctrl-C)')),
|
||||
('misc_kill_process',
|
||||
'' if self.args.webserver else msg_col.format('k', 'Kill process')),
|
||||
('misc_reset_processes_summary_min_max',
|
||||
'' if self.args.webserver else msg_col.format('M', 'Reset processes summary min/max')),
|
||||
('misc_quit',
|
||||
'' if self.args.webserver else msg_col.format('q', 'QUIT (or Esc or Ctrl-C)')),
|
||||
('misc_reset_history', msg_col.format('r', 'Reset history')),
|
||||
('misc_delete_warning_alerts', msg_col.format('w', 'Delete warning alerts')),
|
||||
('misc_delete_warning_and_critical_alerts', msg_col.format('x', 'Delete warning & critical alerts')),
|
||||
('misc_theme_white', msg_col.format('9', 'Optimize colors for white background')),
|
||||
('misc_edit_process_filter_pattern', ' ENTER: Edit process filter pattern'),
|
||||
('misc_theme_white',
|
||||
'' if self.args.webserver else msg_col.format('9', 'Optimize colors for white background')),
|
||||
('misc_edit_process_filter_pattern',
|
||||
'' if self.args.webserver else ' ENTER: Edit process filter pattern'),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user