ADJUSTED ASCII ART

This commit is contained in:
2025-03-03 22:35:21 -05:00
parent 1c5344f51b
commit 0769916f86
+38 -38
View File
@@ -200,13 +200,13 @@ class SystemHealthMonitor:
) + 10 # Add padding ) + 10 # Add padding
banner = f""" banner = f"""
┏{'━' * content_width}┓ ┏{'━' * content_width}┓
┃{' HARDWARE MONITORING ALERT TICKET '.center(content_width)}┃ ┃{' HARDWARE MONITORING ALERT TICKET '.center(content_width)}┃
┣{'━' * content_width}┫ ┣{'━' * content_width}┫
┃ Host : {hostname:<{content_width-13}}┃ ┃ Host : {hostname:<{content_width-13}}┃
┃ Generated : {timestamp:<{content_width-13}}┃ ┃ Generated : {timestamp:<{content_width-13}}┃
┃ Priority : {priority:<{content_width-13}}┃ ┃ Priority : {priority:<{content_width-13}}┃
┗{'━' * content_width}┛ ┗{'━' * content_width}┛
""" """
description = banner + "\n" + "┏━ ISSUE SUMMARY " + "━" * 50 + "\n" + issue + "\n\n" description = banner + "\n" + "┏━ ISSUE SUMMARY " + "━" * 50 + "\n" + issue + "\n\n"
@@ -410,14 +410,14 @@ class SystemHealthMonitor:
age = f"{int(power_on_hours/24/365) if isinstance(power_on_hours, (int, float)) else 'N/A'} years" if power_on_hours != 'N/A' else 'N/A' age = f"{int(power_on_hours/24/365) if isinstance(power_on_hours, (int, float)) else 'N/A'} years" if power_on_hours != 'N/A' else 'N/A'
description += """ description += """
┏━ DRIVE SPECIFICATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━ DRIVE SPECIFICATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Device Path │ {:<60} ┃ ┃ Device Path │ {:<60} ┃
┃ Model │ {:<60} ┃ ┃ Model │ {:<60} ┃
┃ Serial │ {:<60} ┃ ┃ Serial │ {:<60} ┃
┃ Capacity │ {:<60} ┃ ┃ Capacity │ {:<60} ┃
┃ Type │ {:<60} ┃ ┃ Type │ {:<60} ┃
┃ Firmware │ {:<60} ┃ ┃ Firmware │ {:<60} ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
""".format( """.format(
device, device,
drive_details['model'], drive_details['model'],
@@ -436,20 +436,20 @@ class SystemHealthMonitor:
} }
description += f""" description += f"""
┏━ PERFORMANCE METRICS ━{'━' * 48}┓ ┏━ PERFORMANCE METRICS ━{'━' * 48}┓
┃ Read Speed │ {perf_metrics['read_speed']} MB/s {' ' * 45}┃ ┃ Read Speed │ {perf_metrics['read_speed']} MB/s {' ' * 45}┃
┃ Write Speed │ {perf_metrics['write_speed']} MB/s {' ' * 45}┃ ┃ Write Speed │ {perf_metrics['write_speed']} MB/s {' ' * 45}┃
┃ Access Time │ {perf_metrics['access_time']} ms {' ' * 47}┃ ┃ Access Time │ {perf_metrics['access_time']} ms {' ' * 47}┃
┃ IOPS │ {perf_metrics['iops']}{' ' * 52}┃ ┃ IOPS │ {perf_metrics['iops']}{' ' * 52}┃
┗{'━' * 71}┛ ┗{'━' * 71}┛
""" """
description += """ description += """
┏━ DRIVE TIMELINE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━ DRIVE TIMELINE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Power-On Hours │ {:<56} ┃ ┃ Power-On Hours │ {:<56} ┃
┃ Last SMART Test │ {:<56} ┃ ┃ Last SMART Test │ {:<56} ┃
┃ Drive Age │ {:<56} ┃ ┃ Drive Age │ {:<56} ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
""".format( """.format(
f"{power_on_hours} hours" if power_on_hours != 'N/A' else 'N/A', f"{power_on_hours} hours" if power_on_hours != 'N/A' else 'N/A',
last_test_date, last_test_date,
@@ -459,10 +459,10 @@ class SystemHealthMonitor:
for drive in health_report.get('drives_health', {}).get('drives', []): for drive in health_report.get('drives_health', {}).get('drives', []):
if drive['device'] == device: if drive['device'] == device:
description += """ description += """
┏━ SMART STATUS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━ SMART STATUS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Status │ {:<60} ┃ ┃ Status │ {:<60} ┃
┃ Temperature │ {:<60} ┃ ┃ Temperature │ {:<60} ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
""".format( """.format(
drive['smart_status'], drive['smart_status'],
f"{drive.get('temperature')}°C" if drive.get('temperature') else 'N/A' f"{drive.get('temperature')}°C" if drive.get('temperature') else 'N/A'
@@ -483,14 +483,14 @@ class SystemHealthMonitor:
usage_meter = '█' * blocks + '░' * (20 - blocks) usage_meter = '█' * blocks + '░' * (20 - blocks)
description += """ description += """
┏━ PARTITION [{:<60}] ━┓ ┏━ PARTITION [{:<60}] ━┓
┃ Filesystem │ {:<60} ┃ ┃ Filesystem │ {:<60} ┃
┃ Usage Meter │ [{:<58}] ┃ ┃ Usage Meter │ [{:<58}] ┃
┃ Total Space │ {:<60} ┃ ┃ Total Space │ {:<60} ┃
┃ Used Space │ {:<60} ┃ ┃ Used Space │ {:<60} ┃
┃ Free Space │ {:<60} ┃ ┃ Free Space │ {:<60} ┃
┃ Usage │ {:<60} ┃ ┃ Usage │ {:<60} ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
""".format( """.format(
partition['mountpoint'], partition['mountpoint'],
partition['fstype'], partition['fstype'],