mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-24 05:15:47 +03:00
Make the separator default behavor in UI (and add the option in the configuration file
This commit is contained in:
parent
fe52a56b6a
commit
309c45036f
@ -20,8 +20,10 @@ history_size=1200
|
||||
##############################################################################
|
||||
|
||||
[outputs]
|
||||
# Theme name for the Curses interface: black or white
|
||||
# Theme name (for the moment only for the Curses interface: black or white)
|
||||
curse_theme=black
|
||||
# Separator in the Curses and WebUI interface (between top and others plugins)
|
||||
separator=True
|
||||
# Limit the number of processes to display (for the WebUI)
|
||||
max_processes_display=25
|
||||
# Set the URL prefix (for the WebUI and the API)
|
||||
|
@ -22,6 +22,8 @@ history_size=1200
|
||||
[outputs]
|
||||
# Theme name for the Curses interface: black or white
|
||||
curse_theme=black
|
||||
# Separator in the Curses and WebUI interface (between top and others plugins)
|
||||
separator=True
|
||||
# Limit the number of processes to display (for the WebUI)
|
||||
max_processes_display=25
|
||||
# Set the URL prefix (for the WebUI and the API)
|
||||
|
@ -244,12 +244,11 @@ Examples of use:
|
||||
help='enable extended stats on top process',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--separator',
|
||||
'--enable-separator',
|
||||
action='store_true',
|
||||
default=False,
|
||||
'--disable-separator',
|
||||
action='store_false',
|
||||
default=True,
|
||||
dest='enable_separator',
|
||||
help='enable separator in the UI',
|
||||
help='disable separator in the UI (between top and others modules)',
|
||||
),
|
||||
parser.add_argument(
|
||||
'--disable-cursor',
|
||||
|
@ -201,7 +201,7 @@ class _GlancesCurses(object):
|
||||
if config is not None and config.has_section('outputs'):
|
||||
logger.debug('Read the outputs section in the configuration file')
|
||||
self.theme['name'] = config.get_value('outputs', 'curse_theme', default='black')
|
||||
logger.debug('Theme for the curse interface: {}'.format(self.theme['name']))
|
||||
self.args.enable_separator = config.get_bool_value('outputs', 'separator', default=True)
|
||||
|
||||
def is_theme(self, name):
|
||||
"""Return True if the theme *name* should be used."""
|
||||
@ -596,7 +596,7 @@ class _GlancesCurses(object):
|
||||
self.column = self.next_column
|
||||
|
||||
def separator_line(self, color='SEPARATOR'):
|
||||
"""New separator line in the curses interface."""
|
||||
"""Add a separator line in the curses interface."""
|
||||
if not self.args.enable_separator:
|
||||
return
|
||||
self.new_line()
|
||||
|
@ -69,6 +69,21 @@ body {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.separator {
|
||||
overflow:hidden;
|
||||
height:5px;
|
||||
}
|
||||
|
||||
.separator:after {
|
||||
content:'';
|
||||
display:block;
|
||||
margin:-25px auto 0;
|
||||
width:100%;
|
||||
height:24px;
|
||||
border-radius:125px / 12px;
|
||||
box-shadow:0 0 8px #555555;
|
||||
}
|
||||
|
||||
/* Theme */
|
||||
|
||||
.title {
|
||||
|
@ -28,6 +28,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row separator" v-if="args.enable_separator"></div>
|
||||
<div class="row">
|
||||
<div class="hidden-xs hidden-sm hidden-md col-lg-6" v-if="!args.disable_quicklook">
|
||||
<glances-plugin-quicklook :data="data"></glances-plugin-quicklook>
|
||||
@ -58,6 +59,7 @@
|
||||
<glances-plugin-load :data="data"></glances-plugin-load>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row separator" v-if="args.enable_separator"></div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
6
glances/outputs/static/public/glances.js
vendored
6
glances/outputs/static/public/glances.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user