Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add summary tab for compose (#3317)
### What does this PR do? * Adds the summary tab for compose which takes inspiration on how we summarize pod details. * Adds tests ### Screenshot/screencast of this PR <!-- Please include a screenshot or a screencast explaining what is doing this PR --> ### What issues does this PR fix or reference? <!-- Please include any related issue from Podman Desktop repository (or from another issue tracker). --> Closes #3191 ### How to test this PR? <!-- Please explain steps to reproduce --> 1. Deploy an example compose yaml 2. Click on the group of containers 3. Click on summary tab Signed-off-by: Charlie Drage <charlie@charliedrage.com>
- Loading branch information
Showing
4 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/renderer/src/lib/compose/ComposeDetailsSummary.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
import { router } from 'tinro'; | ||
import type { ComposeInfoUI } from './ComposeInfoUI'; | ||
export let compose: ComposeInfoUI; | ||
function openContainer(containerID: string) { | ||
router.goto(`/containers/${containerID}/logs`); | ||
} | ||
</script> | ||
|
||
<div class="flex px-5 py-4 flex-col"> | ||
<div class="w-full"> | ||
<table> | ||
<tr> | ||
<td class="pt-2 pr-2">Name:</td> | ||
<td class="pt-2 pr-2">{compose.name}</td> | ||
</tr> | ||
</table> | ||
</div> | ||
{#if compose.containers.length > 0} | ||
<div class="w-full my-12"> | ||
<span>Containers using this Compose group:</span> | ||
<table> | ||
{#each compose.containers as container} | ||
<tr class="cursor-pointer" on:click="{() => openContainer(container.id)}"> | ||
<td class="pt-2 pr-2">{container.name}</td> | ||
<td class="pt-2 pr-2">{container.id}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
</div> | ||
{/if} | ||
</div> |