From 8e63909edf538aa5d70f7f8d36ea44727f752f0f Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 21 Dec 2022 10:11:38 -0500 Subject: [PATCH] improve so-status rendering on terminals that only support 8 colors --- salt/common/tools/sbin/so-status | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/common/tools/sbin/so-status b/salt/common/tools/sbin/so-status index a2ce864f9..da20fcacd 100755 --- a/salt/common/tools/sbin/so-status +++ b/salt/common/tools/sbin/so-status @@ -63,11 +63,11 @@ def output(options, console, code, data): print(json.dumps(summary)) elif "-q" not in options: if code == 2: - console.print(" [bright_yellow]:hourglass: [bold white]System appears to be starting. No highstate has completed since the system was restarted.") + console.print(" [bold yellow]:hourglass: [bold white]System appears to be starting. No highstate has completed since the system was restarted.") elif code == 99: - console.print(" [bright_red]:exclamation: [bold white]Installation does not appear to be complete. A highstate has not fully completed.") + console.print(" [bold red]:exclamation: [bold white]Installation does not appear to be complete. A highstate has not fully completed.") else: - table = Table(title = "Security Onion Status", row_styles = ["dim", ""], show_edge = False, safe_box = True, box = box.MINIMAL) + table = Table(title = "Security Onion Status", show_edge = False, safe_box = True, box = box.MINIMAL) table.add_column("Container", justify="right", style="white", no_wrap=True) table.add_column("Status", justify="left", style="green", no_wrap=True) table.add_column("Details", justify="right", style="cyan", no_wrap=True) @@ -75,7 +75,7 @@ def output(options, console, code, data): for container in data: color = "[green]" if container['Status'] != "running": - color = "[bright_red]" + color = "[bold red]" table.add_row(container['Name'], color + container['Status'], container['Details']) console.print() console.print(table) @@ -83,7 +83,7 @@ def output(options, console, code, data): if code == 0: console.print(" [green]:heavy_check_mark: [bold white]This onion is ready to make your adversaries cry!") elif code == 1: - console.print(" [bright_red]:exclamation: [bold white]Check container logs and /opt/so/log for more details.") + console.print(" [bold red]:exclamation: [bold white]Check container logs and /opt/so/log for more details.") console.print() def check_container_status(options, console):