Add label for test mode in hardware diagnostics
This commit is contained in:
parent
1dfc7a0243
commit
137c3ec5e5
1 changed files with 4 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ PLATFORM = std.PLATFORM
|
||||||
# Classes
|
# Classes
|
||||||
class State():
|
class State():
|
||||||
"""Object for tracking hardware diagnostic data."""
|
"""Object for tracking hardware diagnostic data."""
|
||||||
def __init__(self):
|
def __init__(self, test_mode=False):
|
||||||
self.disks = []
|
self.disks = []
|
||||||
self.layout = cfg.hw.TMUX_LAYOUT.copy()
|
self.layout = cfg.hw.TMUX_LAYOUT.copy()
|
||||||
self.log_dir = None
|
self.log_dir = None
|
||||||
|
|
@ -87,6 +87,8 @@ class State():
|
||||||
self.system = None
|
self.system = None
|
||||||
self.test_groups = []
|
self.test_groups = []
|
||||||
self.top_text = std.color_string('Hardware Diagnostics', 'GREEN')
|
self.top_text = std.color_string('Hardware Diagnostics', 'GREEN')
|
||||||
|
if test_mode:
|
||||||
|
self.top_text += std.color_string(' (Test Mode)', 'YELLOW')
|
||||||
|
|
||||||
# Init tmux and start a background process to maintain layout
|
# Init tmux and start a background process to maintain layout
|
||||||
self.init_tmux()
|
self.init_tmux()
|
||||||
|
|
@ -760,7 +762,7 @@ def main() -> None:
|
||||||
# Init
|
# Init
|
||||||
atexit.register(tmux.kill_all_panes)
|
atexit.register(tmux.kill_all_panes)
|
||||||
menu = build_menu(cli_mode=args['--cli'], quick_mode=args['--quick'])
|
menu = build_menu(cli_mode=args['--cli'], quick_mode=args['--quick'])
|
||||||
state = State()
|
state = State(test_mode=args['--test-mode'])
|
||||||
|
|
||||||
# Quick Mode
|
# Quick Mode
|
||||||
if args['--quick']:
|
if args['--quick']:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue