-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Quentin Guidée <[email protected]>
- Loading branch information
1 parent
91e4c41
commit 229f391
Showing
11 changed files
with
113 additions
and
0 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
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
56 changes: 56 additions & 0 deletions
56
client/src/apps/Containers/pages/ContainerPorts/ContainerPorts.tsx
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,56 @@ | ||
import { | ||
Button, | ||
Input, | ||
Table, | ||
TableBody, | ||
TableCell, | ||
TableHead, | ||
TableHeadCell, | ||
TableRow, | ||
Title, | ||
Vertical, | ||
} from "@vertex-center/components"; | ||
import { useParams } from "react-router-dom"; | ||
import { useQueryClient } from "@tanstack/react-query"; | ||
import { useContainerPorts } from "../../hooks/useContainer"; | ||
import { ProgressOverlay } from "../../../../components/Progress/Progress"; | ||
import { APIError } from "../../../../components/Error/APIError"; | ||
import { Horizontal } from "../../../../components/Layouts/Layouts"; | ||
|
||
export default function ContainerPorts() { | ||
const { uuid } = useParams(); | ||
// const queryClient = useQueryClient(); | ||
|
||
const { ports, isLoadingPorts, errorPorts } = useContainerPorts(uuid); | ||
|
||
const error = errorPorts; | ||
const isLoading = isLoadingPorts; | ||
|
||
return ( | ||
<Vertical gap={24}> | ||
<Title variant="h2">Ports</Title> | ||
<APIError error={error} /> | ||
<ProgressOverlay show={isLoading} /> | ||
<Table> | ||
<TableHead> | ||
<TableRow> | ||
<TableHeadCell>Port inside container</TableHeadCell> | ||
<TableHeadCell>Port outside container</TableHeadCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
{ports?.map((port, i) => ( | ||
<TableRow> | ||
<TableCell> | ||
<Input value={port?.in} disabled /> | ||
</TableCell> | ||
<TableCell> | ||
<Input value={port?.out} disabled /> | ||
</TableCell> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
</Vertical> | ||
); | ||
} |
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
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