Skip to content

Commit

Permalink
Add tags
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Jun 22, 2023
1 parent dca55e5 commit 23530dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class Application extends React.Component<ApplicationProps, ApplicationSt
<Th>IP</Th>
<Th>Hostname</Th>
<Th>Network</Th>
<Th>Tags</Th>
<Th>State</Th>
<Th>Exit node</Th>
<Th>OS</Th>
Expand Down Expand Up @@ -80,6 +81,12 @@ class Peer extends React.Component<TailscalePeer> {
const hostName = name[0];
const network = name[1] + '.' + 'ts.net';

var tags = "-"
if(this.props.Tags) {
const mapped_items = this.props.Tags?.map(t => { return t})
tags = mapped_items.join(', ')
}

return (
<Tr>
<Td>
Expand All @@ -90,6 +97,10 @@ class Peer extends React.Component<TailscalePeer> {
<Td>{ this.props.TailscaleIPs[0] }</Td>
<Td>{ hostName }</Td>
<Td>{ network }</Td>
<Td>{
tags
}
</Td>
<Td>{ this.props.Active
? this.props.CurAddr != ""
? "Direct"
Expand Down

0 comments on commit 23530dc

Please sign in to comment.