-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Junk
committed
Sep 14, 2023
1 parent
cda96c2
commit a164ae4
Showing
2 changed files
with
42 additions
and
43 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/lib/singleview/vulnerabilities/vulnerability/remediations/Remediation.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import KeyValue from "$lib/singleview/KeyValue.svelte"; | ||
import ValueField from "$lib/singleview/ValueField.svelte"; | ||
import ValueList from "$lib/singleview/ValueList.svelte"; | ||
export let remediation: any; | ||
const keys: Array<String> = []; | ||
const values: Array<String> = []; | ||
if (remediation.date) { | ||
keys.push("Date"); | ||
values.push(remediation.date); | ||
} | ||
if (remediation.url) { | ||
keys.push("URL"); | ||
values.push(remediation.url); | ||
} | ||
</script> | ||
|
||
<p> | ||
<KeyValue {keys} {values} /> | ||
</p> | ||
<ValueField label="Details" value={remediation.details} /> | ||
{#if remediation.entitlements} | ||
<ValueList label="Entitlements" values={remediation.entitlements} /> | ||
{/if} | ||
{#if remediation.group_ids} | ||
<ValueList label="Group IDs" values={remediation.group_ids} /> | ||
{/if} | ||
{#if remediation.product_ids} | ||
<ValueList label="Product IDs" values={remediation.product_ids} /> | ||
{/if} | ||
{#if remediation.restart_required} | ||
<div class=""> | ||
<h6>Restart_required</h6> | ||
<p>{remediation.restart_required.category}</p> | ||
{#if remediation.restart_required.details} | ||
<p>{remediation.restart_required.details}</p> | ||
{/if} | ||
</div> | ||
{/if} |
46 changes: 3 additions & 43 deletions
46
src/lib/singleview/vulnerabilities/vulnerability/remediations/Remediations.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,14 @@ | ||
<script lang="ts"> | ||
import Collapsible from "$lib/Collapsible.svelte"; | ||
import ValueField from "$lib/singleview/ValueField.svelte"; | ||
import ValueList from "$lib/singleview/ValueList.svelte"; | ||
import Remediation from "./Remediation.svelte"; | ||
export let vulnerability: any; | ||
</script> | ||
|
||
<Collapsible header="Remediations" level="4"> | ||
{#each vulnerability.remediations as remediation} | ||
<Collapsible header="Category: {remediation.category}" level="5"> | ||
<div class="spacer" /> | ||
{#if remediation.date} | ||
<ValueField label="Date" value={remediation.date} /> | ||
{/if} | ||
<div class=""> | ||
<ValueField label="Details" value={remediation.details} /> | ||
</div> | ||
{#if remediation.entitlements} | ||
<ValueList label="Entitlements" values={remediation.entitlements} /> | ||
{/if} | ||
{#if remediation.group_ids} | ||
<ValueList label="Group IDs" values={remediation.group_ids} /> | ||
{/if} | ||
{#if remediation.product_ids} | ||
<ValueList label="Product IDs" values={remediation.product_ids} /> | ||
{/if} | ||
{#if remediation.restart_required} | ||
<div class=""> | ||
<h6>Restart_required</h6> | ||
<p>{remediation.restart_required.category}</p> | ||
{#if remediation.restart_required.details} | ||
<p>{remediation.restart_required.details}</p> | ||
{/if} | ||
</div> | ||
{/if} | ||
{#if remediation.url} | ||
<ValueField label="Url" value={remediation.url} /> | ||
{/if} | ||
<Remediation {remediation} /> | ||
</Collapsible> | ||
{/each} | ||
</Collapsible> | ||
|
||
<style> | ||
.spacer { | ||
margin-top: 2em; | ||
} | ||
h6 { | ||
line-height: 0.3em; | ||
font-size: large; | ||
} | ||
p { | ||
margin-left: 4rem; | ||
} | ||
</style> |