Filter for shared-to/shareenode
parent
23530dcb05
commit
7df29cbce3
12
src/app.tsx
12
src/app.tsx
|
@ -35,6 +35,10 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
|
|||
|
||||
render() {
|
||||
|
||||
function isNotSharee(peer:TailscalePeer): peer is TailscalePeer {
|
||||
return peer.DNSName !== ""; // ShareeNode doesn't work?
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{
|
||||
|
@ -43,7 +47,7 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
|
|||
aria-label="Tailscale peers"
|
||||
variant='compact' borders={false}>
|
||||
<Caption>Tailscale peers</Caption>
|
||||
<Thead noWrap>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th></Th>
|
||||
<Th>IP</Th>
|
||||
|
@ -59,8 +63,10 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
|
|||
<Tbody>
|
||||
<Peer {...this.state.Status.Self} />
|
||||
{
|
||||
Object.entries(this.state.Status.Peer).map(peer => {
|
||||
return <Peer {...peer[1]} />
|
||||
Object.values(this.state.Status.Peer)
|
||||
.filter(isNotSharee)
|
||||
.map(peer => {
|
||||
return <Peer {...peer} />
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ export type TailscalePeer = {
|
|||
ExitNodeOption: boolean;
|
||||
Active: boolean;
|
||||
CurAddr: string;
|
||||
ShareeNode?: boolean; // funnel-ingress-node, device-of-shared-to-user
|
||||
}
|
||||
|
||||
export interface TailscaleExitNodeStatus {
|
||||
|
|
Loading…
Reference in New Issue