Reset layout when aborting HW diagnostics
This commit is contained in:
parent
9810c630f6
commit
3e10f2cb8c
1 changed files with 8 additions and 2 deletions
|
|
@ -100,8 +100,7 @@ class State():
|
||||||
test.set_status('Aborted')
|
test.set_status('Aborted')
|
||||||
|
|
||||||
# Cleanup panes
|
# Cleanup panes
|
||||||
self.ui.remove_all_info_panes()
|
self.reset_layout()
|
||||||
self.ui.remove_all_worker_panes()
|
|
||||||
|
|
||||||
def disk_safety_checks(self) -> None:
|
def disk_safety_checks(self) -> None:
|
||||||
"""Check for mid-run SMART failures and failed test(s)."""
|
"""Check for mid-run SMART failures and failed test(s)."""
|
||||||
|
|
@ -185,6 +184,12 @@ class State():
|
||||||
test_group.test_objects.append(test_obj)
|
test_group.test_objects.append(test_obj)
|
||||||
self.test_groups.append(test_group)
|
self.test_groups.append(test_group)
|
||||||
|
|
||||||
|
def reset_layout(self) -> None:
|
||||||
|
"""Reset layout to avoid flickering."""
|
||||||
|
self.ui.clear_current_pane_height()
|
||||||
|
self.ui.remove_all_info_panes()
|
||||||
|
self.ui.remove_all_worker_panes()
|
||||||
|
|
||||||
def save_debug_reports(self) -> None:
|
def save_debug_reports(self) -> None:
|
||||||
"""Save debug reports to disk."""
|
"""Save debug reports to disk."""
|
||||||
LOG.info('Saving debug reports')
|
LOG.info('Saving debug reports')
|
||||||
|
|
@ -788,6 +793,7 @@ def run_diags(state, menu, quick_mode=False, test_mode=False) -> None:
|
||||||
aborted = True
|
aborted = True
|
||||||
state.abort_testing()
|
state.abort_testing()
|
||||||
state.update_progress_file()
|
state.update_progress_file()
|
||||||
|
state.reset_layout()
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
# Run safety checks after disk tests
|
# Run safety checks after disk tests
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue