From d40d4fb9c16febc7b92f957e5526e55d2ae4f9f8 Mon Sep 17 00:00:00 2001 From: Caleb <57644769+alliraine@users.noreply.github.com> Date: Fri, 16 May 2025 19:30:27 -0400 Subject: [PATCH] Fix alignment for analysis views --- .../src/lib/components/AnalysisTable.svelte | 28 +++++++++---------- .../src/lib/components/AnalysisView.svelte | 4 +-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bin/web/src/lib/components/AnalysisTable.svelte b/bin/web/src/lib/components/AnalysisTable.svelte index da1dbf8..db96239 100644 --- a/bin/web/src/lib/components/AnalysisTable.svelte +++ b/bin/web/src/lib/components/AnalysisTable.svelte @@ -30,12 +30,12 @@ {#if report.statistics.num_warnings === 0 && report.statistics.num_informational_logs === 0}

Nothing to show!

{:else} - +
- - - + + + @@ -43,15 +43,15 @@ {#each row.analysis as analysis} {@const parsed_date = new Date(analysis.timestamp)} {#each analysis.events.filter(e => e !== null) as event} - + {#if event.type === EventType.Warning} - {@const severity = ['Low', 'Medium', 'High'][event.severity]} + {@const severity = ['Low', 'Medium', 'High'][event.severity]} {@const severity_class = ['bg-red-200', 'bg-red-400', 'bg-red-600'][event.severity]} - + - + {:else if event.type === EventType.Informational} - + {/if} @@ -64,20 +64,20 @@ {/if} {#if report.statistics.num_skipped_packets > 0} -
+

Unparsed Messages

These are due to a limitation or bug in Rayhunter's parser, and aren't ususally a problem.

-
TimestampWarningSeverityTimestampWarningSeverity
{date_formatter.format(parsed_date)}{date_formatter.format(parsed_date)} {event.message}{severity}{severity}{date_formatter.format(parsed_date)}{date_formatter.format(parsed_date)} {event.message} Info
+
- + {#each skipped_messages.entries() as [message, count]} - - + + {/each} diff --git a/bin/web/src/lib/components/AnalysisView.svelte b/bin/web/src/lib/components/AnalysisView.svelte index 2715469..0462f90 100644 --- a/bin/web/src/lib/components/AnalysisView.svelte +++ b/bin/web/src/lib/components/AnalysisView.svelte @@ -13,14 +13,14 @@ }); -
+
{#if entry.analysis_report === undefined}

Report unavailable, try refreshing.

{:else if typeof(entry.analysis_report) === 'string'}

Error getting analysis report: {entry.analysis_report}

{:else} {@const metadata: ReportMetadata = entry.analysis_report.metadata} -
+
{#if entry.analysis_report.rows.length > 0} {:else}
# of messages affected# of messages affected Reason/Error
{count}
{count} {message}