Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assessment result view and add ML icon #225

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/components/DiscoveryGraph.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import {
Beaker,
BuildingLibrary,
ChartPie,
CircleStack,
Cloud,
CodeBracket,
Expand Down Expand Up @@ -159,7 +160,7 @@
...nodeStyle('Certificate', Newspaper, overlay),
...nodeStyle('Object', Document, overlay),
...nodeStyle('NetworkSecurityGroup', ShieldCheck, overlay),
...nodeStyle('MachineLearningWorkspace', Beaker, overlay)
...nodeStyle('MLWorkspace', Beaker, overlay)
]);

return styles;
Expand Down
42 changes: 33 additions & 9 deletions src/routes/(app)/cloud/[id]/assessments/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,34 @@
}
</script>

<style>
.text-wrap {
white-space: pre-wrap; /* Beibehaltung von Zeilenumbrüchen und Umbruch von langen Zeilen */
word-wrap: break-word; /* Ermöglicht den Umbruch in langen Wörtern */
overflow-wrap: break-word; /* Für zusätzliche Browserkompatibilität */
}
.modal-background {
position: fixed; /* Fixiert das Modal in der Ansicht */
top: 0;
left: 0;
right: 0; /* Füllt die gesamte Breite */
bottom: 0; /* Füllt die gesamte Höhe */
display: flex; /* Flexbox benutzen */
align-items: center; /* Vertikal zentrieren */
justify-content: center; /* Horizontal zentrieren */
background-color: rgba(0, 0, 0, 0.5); /* Dunkler Hintergrund für das Modal */
}

.modal-content {
/* max-width: 600px; Maximale Breite des Modals */
width: 70%; /* Breite des Modals */
background: white; /* Hintergrundfarbe des Modals */
border-radius: 8px; /* Abgerundete Ecken */
padding: 20px; /* Innenabstand */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Schatten für das Modal */
}
</style>

{#if data.resources.length == 0}
<StarterHint type="assessment results" icon={QueueList}>
<span slot="component">Clouditor Assessment component</span>
Expand Down Expand Up @@ -130,15 +158,11 @@
{#each currentData as assessment}
{#if showModalId == assessment.id}
<tr>
<div
class=" inset-0 flex max-w-80 items-center justify-center bg-gray-100 bg-opacity-75"
>
<div class="rounded bg-white p-6 shadow-lg">
<pre class="overflow-y-auto rounded bg-gray-100 p-4">{JSON.stringify(
assessment,
null,
5
)}</pre>
<div class="modal-background" >
<div class="modal-content">
<pre class="overflow-y-auto rounded bg-gray-100 p-4 text-wrap">
{JSON.stringify(assessment,null,5)}
</pre>
<Button on:click={closeModal} class="mt-2">Close</Button>
</div>
</div>
Expand Down
Loading