-
-
Notifications
You must be signed in to change notification settings - Fork 183
feat(containers): add raw inspect tab to container detail view #2368
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'; | ||
|
|
@@ -211,7 +212,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: CodeIcon } | ||
|
||
| ]); | ||
|
|
||
| const activeTab = $derived.by(() => { | ||
|
|
@@ -373,6 +375,10 @@ | |
| </Tabs.Content> | ||
| {/if} | ||
| {/await} | ||
|
|
||
| <Tabs.Content value="inspect" class="h-full"> | ||
| <ContainerInspect {container} /> | ||
| </Tabs.Content> | ||
| {/snippet} | ||
| </TabbedPageLayout> | ||
| {:else} | ||
|
|
||
| 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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabs_inspectkeypt.jsonis the only locale file that does not include the newtabs_inspectkey. All 17 other locales in this PR add it. Without this key the Portuguese locale will either render a broken/empty tab label or fall back to the English value depending on how paraglide handles missing keys.Add
"tabs_inspect": "Inspect",near the othertabs_*entries inpt.json(mirroring every other locale file).Prompt To Fix With AI