|
11 | 11 |
|
12 | 12 | let { JobImageDetails, viewerIsMember } = $derived(data);
|
13 | 13 |
|
14 |
| - const error = $derived( |
15 |
| - $JobImageDetails.data?.team.environment.workload.status.errors.find( |
16 |
| - (e) => e.__typename === 'WorkloadStatusVulnerable' |
17 |
| - ) |
18 |
| - ); |
| 14 | + // const error = $derived( |
| 15 | + // $JobImageDetails.data?.team.environment.workload.status.errors.find( |
| 16 | + // (e) => e.__typename === 'WorkloadStatusVulnerable' |
| 17 | + // ) |
| 18 | + // ); |
19 | 19 | </script>
|
20 | 20 |
|
21 | 21 | <GraphErrors errors={$JobImageDetails.errors} />
|
22 | 22 |
|
23 | 23 | {#if $JobImageDetails.data}
|
24 | 24 | {@const image = $JobImageDetails.data.team.environment.workload.image}
|
25 |
| - <div class="grid"> |
26 |
| - <div> |
27 |
| - {#if error} |
28 |
| - <!-- TODO --> |
29 |
| - <!-- <ErrorMessage {error} /> --> |
30 |
| - {/if} |
31 |
| - </div> |
32 |
| - <div class="card"> |
33 |
| - <Heading level="4" size="small" spacing>Summary</Heading> |
34 |
| - {#if image.vulnerabilitySummary} |
35 |
| - <VulnerabilityBadges summary={image.vulnerabilitySummary} /> |
36 |
| - {:else if !image.hasSBOM && image.vulnerabilitySummary !== null} |
37 |
| - <WarningIcon class="text-aligned-icon" /> |
38 |
| - Data was discovered, but the SBOM was not rendered. Refer to the |
39 |
| - <a href={docURL('/services/vulnerabilities/')}>Nais documentation</a> |
40 |
| - for further assistance. |
41 |
| - {:else} |
42 |
| - <WarningIcon class="text-aligned-icon" /> |
43 |
| - No data found. |
44 |
| - <a href={docURL('/services/vulnerabilities/how-to/sbom/')}> How to fix</a> |
45 |
| - {/if} |
| 25 | + <div class="wrapper"> |
| 26 | + <div class="grid"> |
| 27 | + <div> |
| 28 | + <!-- {#if error} |
| 29 | + <ErrorMessage |
| 30 | + collapsible={false} |
| 31 | + {error} |
| 32 | + {docURL} |
| 33 | + workloadType="Job" |
| 34 | + teamSlug={$JobImageDetails.data.team.slug} |
| 35 | + workloadName={$JobImageDetails.data.team.environment.workload.name} |
| 36 | + environment={$JobImageDetails.data.team.environment.environment.name} |
| 37 | + /> |
| 38 | + {/if} --> |
| 39 | + Risk score of 154 i too high. 1 critical is too high. Update affected dependencies to their latest |
| 40 | + patched versions. Application is not on Nais. plz lower <br /> |
| 41 | + |
| 42 | + Hvis ingen SBOM, stooor feilmelding! |
| 43 | + <img src="/SBOM.png" alt="SBOoooOooM" /> |
| 44 | + </div> |
| 45 | + <div class="card"> |
| 46 | + <Heading level="2" size="small" spacing>Summary</Heading> |
| 47 | + {#if image.vulnerabilitySummary} |
| 48 | + <VulnerabilityBadges summary={image.vulnerabilitySummary} /> |
| 49 | + {:else if !image.hasSBOM && image.vulnerabilitySummary !== null} |
| 50 | + <WarningIcon class="text-aligned-icon" /> |
| 51 | + Data was discovered, but the SBOM was not rendered. Refer to the |
| 52 | + <a href={docURL('/services/vulnerabilities/')}>Nais documentation</a> |
| 53 | + for further assistance. |
| 54 | + {:else} |
| 55 | + <WarningIcon class="text-aligned-icon" /> |
| 56 | + No data found. |
| 57 | + <a href={docURL('/services/vulnerabilities/how-to/sbom/')}> How to fix</a> |
| 58 | + {/if} |
| 59 | + </div> |
46 | 60 | </div>
|
| 61 | + <ImageVulnerabilities |
| 62 | + team={$JobImageDetails.data?.team.slug} |
| 63 | + environment={$JobImageDetails.data?.team.environment.name} |
| 64 | + workload={$JobImageDetails.data?.team.environment.workload.name} |
| 65 | + authorized={viewerIsMember} |
| 66 | + /> |
47 | 67 | </div>
|
48 |
| - <ImageVulnerabilities |
49 |
| - team={$JobImageDetails.data?.team.slug} |
50 |
| - environment={$JobImageDetails.data?.team.environment.name} |
51 |
| - workload={$JobImageDetails.data?.team.environment.workload.name} |
52 |
| - authorized={viewerIsMember} |
53 |
| - /> |
54 | 68 | {/if}
|
55 | 69 |
|
56 | 70 | <style>
|
| 71 | + .wrapper { |
| 72 | + display: grid; |
| 73 | + gap: 1rem; |
| 74 | + } |
57 | 75 | .grid {
|
58 | 76 | display: grid;
|
59 | 77 | grid-template-columns: 1fr 300px;
|
|
0 commit comments