diff --git a/src/app.tsx b/src/app.tsx index 07c9336..60ae2c8 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -4,6 +4,7 @@ import { TailscaleBackendState, TailscalePeer, TailscaleStatus, TailscaleUp } fr import { Icon } from '@patternfly/react-core'; 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 InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; import { ExpandableRowContent, Table, Caption, Thead, Tbody, Tr, Th, Td, @@ -48,7 +49,10 @@ export class Application extends React.ComponentIP Hostname Network + State Exit node + OS + Traffic @@ -86,12 +90,22 @@ class Peer extends React.Component { { this.props.TailscaleIPs[0] } { hostName } { network } + { this.props.Active + ? this.props.CurAddr != "" + ? "Direct" + : "Relay: " + this.props.Relay + : this.props.Online + ? "Idle" + : "-" + } { this.props.ExitNode ? "Current" : this.props.ExitNodeOption ? "Yes" - : "" + : "-" } + { this.props.OS } + { this.props.TxBytes } / { this.props.RxBytes } ); } } diff --git a/src/types.ts b/src/types.ts index 57f4ba7..94118ee 100644 --- a/src/types.ts +++ b/src/types.ts @@ -39,6 +39,7 @@ export type TailscalePeer = { ExitNode: boolean; ExitNodeOption: boolean; Active: boolean; + CurAddr: string; } export interface TailscaleExitNodeStatus {