Added allocated ips to status page.

This commit is contained in:
Michael Heijnemans | Lumisan 2023-01-16 13:29:51 +01:00
parent 887bc778df
commit 9c6a810c9b
4 changed files with 9 additions and 3 deletions

View file

@ -533,6 +533,8 @@ func Status(db store.IStore) echo.HandlerFunc {
LastHandshakeTime time.Time
LastHandshakeRel time.Duration
Connected bool
AllocatedIP string
Endpoint string
}
type DeviceVM struct {

View file

@ -1,5 +1,5 @@
{{define "title"}}
Wireguard Clients
Wireguard Clients - test
{{end}}
{{define "top_css"}}

View file

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>WireGuard UI</title>
<title>WireGuard UI - Techdynamics</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -23,7 +23,7 @@
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="https://github.com/ngoduykhanh/wireguard-ui">WireGuard UI</a>
<a href="https://github.com/ngoduykhanh/wireguard-ui">WireGuard UI test</a>
</div>
<!-- /.login-logo -->
<div class="card">

View file

@ -41,6 +41,8 @@ Connected Peers
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Allocated IPs</th>
<th scope="col">Endpoint</th>
<th scope="col">Public Key</th>
<th scope="col">Received</th>
<th scope="col">Transmitted</th>
@ -54,6 +56,8 @@ Connected Peers
<th scope="row">{{ $idx }}</th>
<td>{{ $peer.Name }}</td>
<td>{{ $peer.Email }}</td>
<td>{{ $peer.AllocatedIP }}</td>
<td>{{ $peer.Endpoint }}</td>
<td>{{ $peer.PublicKey }}</td>
<td title="{{ $peer.ReceivedBytes }} Bytes"><script>document.write(bytesToHumanReadable({{ $peer.ReceivedBytes }}))</script></td>
<td title="{{ $peer.TransmitBytes }} Bytes"><script>document.write(bytesToHumanReadable({{ $peer.TransmitBytes }}))</script></td>