Skip to content

Commit b342c30

Browse files
authored
Fix assessment result view and add ML icon (#225)
* Add env variables subsection * Ensure targets is always an array to prevent TypeError * Add icon for machine learning * update icon ml * Fix assessment result details window * ++
1 parent 73e0ae4 commit b342c30

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

src/lib/components/DiscoveryGraph.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import {
88
Beaker,
99
BuildingLibrary,
10+
ChartPie,
1011
CircleStack,
1112
Cloud,
1213
CodeBracket,

src/routes/(app)/cloud/[id]/assessments/+page.svelte

+33-9
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,34 @@
7070
}
7171
</script>
7272

73+
<style>
74+
.text-wrap {
75+
white-space: pre-wrap; /* Beibehaltung von Zeilenumbrüchen und Umbruch von langen Zeilen */
76+
word-wrap: break-word; /* Ermöglicht den Umbruch in langen Wörtern */
77+
overflow-wrap: break-word; /* Für zusätzliche Browserkompatibilität */
78+
}
79+
.modal-background {
80+
position: fixed; /* Fixiert das Modal in der Ansicht */
81+
top: 0;
82+
left: 0;
83+
right: 0; /* Füllt die gesamte Breite */
84+
bottom: 0; /* Füllt die gesamte Höhe */
85+
display: flex; /* Flexbox benutzen */
86+
align-items: center; /* Vertikal zentrieren */
87+
justify-content: center; /* Horizontal zentrieren */
88+
background-color: rgba(0, 0, 0, 0.5); /* Dunkler Hintergrund für das Modal */
89+
}
90+
91+
.modal-content {
92+
/* max-width: 600px; Maximale Breite des Modals */
93+
width: 70%; /* Breite des Modals */
94+
background: white; /* Hintergrundfarbe des Modals */
95+
border-radius: 8px; /* Abgerundete Ecken */
96+
padding: 20px; /* Innenabstand */
97+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Schatten für das Modal */
98+
}
99+
</style>
100+
73101
{#if data.resources.length == 0}
74102
<StarterHint type="assessment results" icon={QueueList}>
75103
<span slot="component">Clouditor Assessment component</span>
@@ -130,15 +158,11 @@
130158
{#each currentData as assessment}
131159
{#if showModalId == assessment.id}
132160
<tr>
133-
<div
134-
class=" inset-0 flex max-w-80 items-center justify-center bg-gray-100 bg-opacity-75"
135-
>
136-
<div class="rounded bg-white p-6 shadow-lg">
137-
<pre class="overflow-y-auto rounded bg-gray-100 p-4">{JSON.stringify(
138-
assessment,
139-
null,
140-
5
141-
)}</pre>
161+
<div class="modal-background" >
162+
<div class="modal-content">
163+
<pre class="overflow-y-auto rounded bg-gray-100 p-4 text-wrap">
164+
{JSON.stringify(assessment,null,5)}
165+
</pre>
142166
<Button on:click={closeModal} class="mt-2">Close</Button>
143167
</div>
144168
</div>

0 commit comments

Comments
 (0)