fixed port mapping
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m36s
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m36s
This commit is contained in:
parent
1d6bc8736e
commit
d512c53ec8
@ -1,4 +1,4 @@
|
|||||||
import { JSONSchema6, JSONSchema7 } from "json-schema"
|
import { JSONSchema7 } from "json-schema"
|
||||||
|
|
||||||
export interface Port {
|
export interface Port {
|
||||||
Number: number
|
Number: number
|
||||||
@ -8,7 +8,7 @@ export interface Port {
|
|||||||
|
|
||||||
export interface PortMapping {
|
export interface PortMapping {
|
||||||
ContainerPort: number
|
ContainerPort: number
|
||||||
HostPort: number
|
PublicPort: number
|
||||||
Protocol: 'tcp' | 'udp'
|
Protocol: 'tcp' | 'udp'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ const serverActionsContext: Context<ActionInfo[]> = createContext([] as ActionIn
|
|||||||
|
|
||||||
function generateChipHandler(domain: string, port: PortMapping) {
|
function generateChipHandler(domain: string, port: PortMapping) {
|
||||||
return () => {
|
return () => {
|
||||||
navigator.clipboard.writeText(`${domain}:${port.HostPort}`)
|
navigator.clipboard.writeText(`${domain}:${port.PublicPort}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ function ServerItem(props: { server_info: ServerInfo }) {
|
|||||||
<TableCell>{props.server_info.Image.Name}</TableCell>
|
<TableCell>{props.server_info.Image.Name}</TableCell>
|
||||||
<TableCell>{props.server_info.Image.Version}</TableCell>
|
<TableCell>{props.server_info.Image.Version}</TableCell>
|
||||||
<TableCell>{props.server_info.Domain}</TableCell>
|
<TableCell>{props.server_info.Domain}</TableCell>
|
||||||
<TableCell>{props.server_info.Ports.map((port, index, array) => { return <Chip onClick={generateChipHandler(props.server_info.Domain, port)} label={`${port.HostPort}:${port.ContainerPort}/${port.Protocol}`} icon={<ContentCopyIcon />} /> })}</TableCell>
|
<TableCell>{props.server_info.Ports.map((port, index, array) => { return <Chip onClick={generateChipHandler(props.server_info.Domain, port)} label={`${port.PublicPort}:${port.ContainerPort}/${port.Protocol}`} icon={<ContentCopyIcon />} /> })}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<ActionGroup actions={actions.filter((value) => {
|
<ActionGroup actions={actions.filter((value) => {
|
||||||
switch (value.ServerState) {
|
switch (value.ServerState) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user