From 0f08a3025208c6592a30b600d97d63de12366cc5 Mon Sep 17 00:00:00 2001 From: Thomas Junk Date: Mon, 28 Aug 2023 17:42:51 +0200 Subject: [PATCH] WIP --- src/lib/Droparea.svelte | 6 ++- src/lib/ProductVulnerabilities.svelte | 75 +++++++++++++++++++++++++++ src/lib/docmodel/docmodel.ts | 1 + src/lib/docmodel/docmodeltypes.ts | 1 + src/routes/+page.svelte | 2 +- 5 files changed, 82 insertions(+), 3 deletions(-) diff --git a/src/lib/Droparea.svelte b/src/lib/Droparea.svelte index 1b2e31f..a959b73 100644 --- a/src/lib/Droparea.svelte +++ b/src/lib/Droparea.svelte @@ -10,6 +10,7 @@ {#if $appStore.doc}

Vulnerabilities overview

+ {#if productLines.length > 0} + + + + {#each headerColumns as column, index} + + {/each} + + + + {#each productLines as line, index} + + {#each line as column, index} + {#if index < 1} + + {:else if column === "N.A"} + + {:else} + + {/if} + {/each} + + {/each} + +
{column}
{column}{column}
+
+
Legend
+
+
+
Fixed
+
+
Under investigation
+
+
Known affected
+
+
Not affected
+
+
Recommended
+
+
+ {/if}
{/if} + + diff --git a/src/lib/docmodel/docmodel.ts b/src/lib/docmodel/docmodel.ts index cfe63e4..6495e53 100644 --- a/src/lib/docmodel/docmodel.ts +++ b/src/lib/docmodel/docmodel.ts @@ -98,6 +98,7 @@ const convertToDocModel = (csafDoc: any): DocModel => { status: getStatus(csafDoc), published: getPublished(csafDoc), lastUpdate: getLastUpdate(csafDoc), + vulnerabilities: [], isDocPresent: checkDocumentPresent(csafDoc), isTrackingPresent: checkTrackingPresent(csafDoc), isDistributionPresent: checkDistributionPresent(csafDoc), diff --git a/src/lib/docmodel/docmodeltypes.ts b/src/lib/docmodel/docmodeltypes.ts index dcc330a..69f8760 100644 --- a/src/lib/docmodel/docmodeltypes.ts +++ b/src/lib/docmodel/docmodeltypes.ts @@ -50,6 +50,7 @@ export type DocModel = { status: string; published: string; lastUpdate: string; + vulnerabilities: Array>; isDocPresent: boolean; isTrackingPresent: boolean; isDistributionPresent: boolean; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 646f7b7..f269815 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -45,7 +45,7 @@

CSAF Webview+

- +

v. {version}

{#if noRef && mode === MODE.SINGLE}