feat: Show 'Down' badge for not connected peers
Signed-off-by: Christoph Heiss <contact@christoph-heiss.at>
This commit is contained in:
parent
a9aa5be5c9
commit
8db4c219ab
|
@ -191,9 +191,9 @@ function parseAllowedIp(data: Buffer): string {
|
|||
|
||||
function parseWgPeer(peerinfo: NetlinkAttribute): WireguardPeer {
|
||||
const result: WireguardPeer = {
|
||||
publicKey: '<unknown>',
|
||||
publicKey: '',
|
||||
hasPresharedKey: false,
|
||||
endpoint: '<unknown>',
|
||||
endpoint: '',
|
||||
keepAlive: 0,
|
||||
lastHandshake: new Date(0).toISOString(),
|
||||
rxBytes: 0,
|
||||
|
|
|
@ -148,6 +148,11 @@ export default function Index({ user }: IndexProps) {
|
|||
<span className="chip ~neutral mr-2">
|
||||
Peer
|
||||
</span>
|
||||
{!peer.endpoint && (
|
||||
<span className="chip ~critical">
|
||||
Down
|
||||
</span>
|
||||
)}
|
||||
{peer.hasPresharedKey
|
||||
? (
|
||||
<span className="chip ~positive">
|
||||
|
|
Reference in a new issue