Skip to content
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: 3 additions & 0 deletions frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@
"containers_mount_label_host": "Host:",
"containers_mount_label_source": "Source:",
"containers_no_mounts_configured": "No volumes or mounts configured",
"containers_inspect_title": "Raw Inspect",
"containers_inspect_description": "Full JSON output of docker container inspect",
"container": "Container",
"container_name_required": "Container name is required",
"container_image_required": "Image is required",
Expand Down Expand Up @@ -564,6 +566,7 @@
"compose_editor_editing_info": "Editing {file} for project {project}",
"compose_editor_viewing_info": "Viewing {file} for project {project}",
"tabs_compose": "Compose",
"tabs_inspect": "Inspect",
"tabs_environment": "Environment",
"tabs_volumes": "Volumes",
"tabs_network_security": "Network & Security",
Expand Down
3 changes: 3 additions & 0 deletions frontend/messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@
"containers_mount_label_host": "Host:",
"containers_mount_label_source": "Origine:",
"containers_no_mounts_configured": "Nessun volume o mount configurato",
"containers_inspect_title": "Raw Inspect",
"containers_inspect_description": "Full JSON output of docker container inspect",
"container": "Container",
"container_name_required": "Il nome del container è obbligatorio",
"container_image_required": "L'immagine è obbligatoria",
Expand Down Expand Up @@ -564,6 +566,7 @@
"compose_editor_editing_info": "Modifica di {file} per il progetto {project}",
"compose_editor_viewing_info": "Visualizzazione di {file} per il progetto {project}",
"tabs_compose": "Comporre",
"tabs_inspect": "Inspect",
"tabs_environment": "Ambiente",
"tabs_volumes": "Volumi",
"tabs_network_security": "Rete & sicurezza",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import ContainerLogsPanel from '../components/ContainerLogsPanel.svelte';
import ContainerShell from '../components/ContainerShell.svelte';
import ContainerComposePanel from '../components/ContainerComposePanel.svelte';
import ContainerInspect from '../components/ContainerInspect.svelte';
import ContainerDetailStatsSync from '../components/container-detail-stats-sync.svelte';
import IconImage from '$lib/components/icon-image.svelte';
import { getArcaneIconUrlFromLabels } from '$lib/utils/arcane-labels';
Expand All @@ -37,7 +38,8 @@
TerminalIcon,
ContainersIcon,
StatsIcon,
CodeIcon
CodeIcon,
InspectIcon
} from '$lib/icons';
import { parse as parseYaml } from 'yaml';
import type { IncludeFile } from '$lib/types/project.type';
Expand Down Expand Up @@ -211,7 +213,8 @@
...(showConfiguration ? [{ value: 'config', label: m.common_configuration(), icon: SettingsIcon }] : []),
...(showNetworkTab ? [{ value: 'network', label: m.containers_nav_networks(), icon: NetworksIcon }] : []),
...(hasMounts ? [{ value: 'storage', label: m.containers_nav_storage(), icon: VolumesIcon }] : []),
...(showComposeTab ? [{ value: 'compose', label: m.tabs_compose(), icon: CodeIcon }] : [])
...(showComposeTab ? [{ value: 'compose', label: m.tabs_compose(), icon: CodeIcon }] : []),
{ value: 'inspect', label: m.tabs_inspect(), icon: InspectIcon }
]);

const activeTab = $derived.by(() => {
Expand Down Expand Up @@ -373,6 +376,10 @@
</Tabs.Content>
{/if}
{/await}

<Tabs.Content value="inspect" class="h-full">
<ContainerInspect {container} />
</Tabs.Content>
{/snippet}
</TabbedPageLayout>
{:else}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<script lang="ts">
import * as Card from '$lib/components/ui/card';
import { CopyButton } from '$lib/components/ui/copy-button';
import { m } from '$lib/paraglide/messages';
import type { ContainerDetailsDto } from '$lib/types/container.type';
import { CodeIcon } from '$lib/icons';

interface Props {
container: ContainerDetailsDto;
}

let { container }: Props = $props();

const json = $derived(JSON.stringify(container, null, 2));
</script>

<Card.Root>
<Card.Header icon={CodeIcon}>
<div class="flex flex-col space-y-1.5">
<Card.Title>
<h2>{m.containers_inspect_title()}</h2>
</Card.Title>
<Card.Description>{m.containers_inspect_description()}</Card.Description>
</div>
<div class="ml-auto">
<CopyButton text={json} variant="outline" size="default">
{m.common_copy_json()}
</CopyButton>
</div>
</Card.Header>
<Card.Content class="p-0">
<pre class="bg-muted/40 overflow-auto rounded-b-lg p-4 font-mono text-xs leading-relaxed"><code>{json}</code></pre>
</Card.Content>
</Card.Root>
Loading