More details

main
Gerard Braad 2023-06-23 00:25:30 +08:00
parent 74ab528176
commit dca55e5e19
2 changed files with 16 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import { TailscaleBackendState, TailscalePeer, TailscaleStatus, TailscaleUp } fr
import { Icon } from '@patternfly/react-core'; import { Icon } from '@patternfly/react-core';
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
import { import {
ExpandableRowContent, ExpandableRowContent,
Table, Caption, Thead, Tbody, Tr, Th, Td, Table, Caption, Thead, Tbody, Tr, Th, Td,
@ -48,7 +49,10 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
<Th>IP</Th> <Th>IP</Th>
<Th>Hostname</Th> <Th>Hostname</Th>
<Th>Network</Th> <Th>Network</Th>
<Th>State</Th>
<Th>Exit node</Th> <Th>Exit node</Th>
<Th>OS</Th>
<Th>Traffic</Th>
</Tr> </Tr>
</Thead> </Thead>
<Tbody> <Tbody>
@ -86,12 +90,22 @@ class Peer extends React.Component<TailscalePeer> {
<Td>{ this.props.TailscaleIPs[0] }</Td> <Td>{ this.props.TailscaleIPs[0] }</Td>
<Td>{ hostName }</Td> <Td>{ hostName }</Td>
<Td>{ network }</Td> <Td>{ network }</Td>
<Td>{ this.props.Active
? this.props.CurAddr != ""
? "Direct"
: "Relay: " + this.props.Relay
: this.props.Online
? "Idle"
: "-"
}</Td>
<Td>{ this.props.ExitNode <Td>{ this.props.ExitNode
? "Current" ? "Current"
: this.props.ExitNodeOption : this.props.ExitNodeOption
? "Yes" ? "Yes"
: "" : "-"
}</Td> }</Td>
<Td>{ this.props.OS }</Td>
<Td>{ this.props.TxBytes } / { this.props.RxBytes }</Td>
</Tr>); </Tr>);
} }
} }

View File

@ -39,6 +39,7 @@ export type TailscalePeer = {
ExitNode: boolean; ExitNode: boolean;
ExitNodeOption: boolean; ExitNodeOption: boolean;
Active: boolean; Active: boolean;
CurAddr: string;
} }
export interface TailscaleExitNodeStatus { export interface TailscaleExitNodeStatus {