diff --git a/conf/glances.conf b/conf/glances.conf index b6687573..88ee7484 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -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) diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf index f40eade9..91913ea8 100644 --- a/docker-compose/glances.conf +++ b/docker-compose/glances.conf @@ -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) diff --git a/glances/main.py b/glances/main.py index bcfb27a7..a2bf4933 100644 --- a/glances/main.py +++ b/glances/main.py @@ -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', diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index f4e70c81..0fc2c3f7 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -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() diff --git a/glances/outputs/static/css/style.scss b/glances/outputs/static/css/style.scss index bd008f58..2bd380be 100644 --- a/glances/outputs/static/css/style.scss +++ b/glances/outputs/static/css/style.scss @@ -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 { diff --git a/glances/outputs/static/js/App.vue b/glances/outputs/static/js/App.vue index 3db2baa1..e516dabc 100644 --- a/glances/outputs/static/js/App.vue +++ b/glances/outputs/static/js/App.vue @@ -28,6 +28,7 @@ +