diff --git a/VERSION b/VERSION index b2f4ea6..26b3e75 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.110 +1.1.111 diff --git a/cmd/edgeguard-api/main.go b/cmd/edgeguard-api/main.go index d37dafe..37f1029 100644 --- a/cmd/edgeguard-api/main.go +++ b/cmd/edgeguard-api/main.go @@ -60,7 +60,7 @@ import ( usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users" ) -var version = "1.1.110" +var version = "1.1.111" func main() { addr := os.Getenv("EDGEGUARD_API_ADDR") diff --git a/cmd/edgeguard-ctl/main.go b/cmd/edgeguard-ctl/main.go index 3d7c43a..f4d7ff0 100644 --- a/cmd/edgeguard-ctl/main.go +++ b/cmd/edgeguard-ctl/main.go @@ -11,7 +11,7 @@ import ( "git.netcell-it.de/projekte/edgeguard-native/internal/services/setup" ) -var version = "1.1.110" +var version = "1.1.111" const usage = `edgeguard-ctl — EdgeGuard CLI diff --git a/cmd/edgeguard-scheduler/main.go b/cmd/edgeguard-scheduler/main.go index 4233fee..c2fc837 100644 --- a/cmd/edgeguard-scheduler/main.go +++ b/cmd/edgeguard-scheduler/main.go @@ -41,7 +41,7 @@ import ( "git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts" ) -var version = "1.1.110" +var version = "1.1.111" const ( // renewTickInterval — how often we re-evaluate expiring certs. diff --git a/management-ui/src/i18n/locales/de/common.json b/management-ui/src/i18n/locales/de/common.json index 845403b..606e7c3 100644 --- a/management-ui/src/i18n/locales/de/common.json +++ b/management-ui/src/i18n/locales/de/common.json @@ -734,7 +734,8 @@ }, "wgCard": { "title": "WireGuard", - "empty": "Noch kein WG-Tunnel angelegt." + "empty": "Noch kein WG-Tunnel angelegt.", + "peersOnline": "{{online}} / {{total}} Peers verbunden" }, "firewallCard": { "title": "Firewall", diff --git a/management-ui/src/i18n/locales/en/common.json b/management-ui/src/i18n/locales/en/common.json index 6af44c7..6bb230b 100644 --- a/management-ui/src/i18n/locales/en/common.json +++ b/management-ui/src/i18n/locales/en/common.json @@ -734,7 +734,8 @@ }, "wgCard": { "title": "WireGuard", - "empty": "No WG tunnel configured yet." + "empty": "No WG tunnel configured yet.", + "peersOnline": "{{online}} / {{total}} peers online" }, "firewallCard": { "title": "Firewall", diff --git a/management-ui/src/pages/Dashboard/index.tsx b/management-ui/src/pages/Dashboard/index.tsx index 421f08b..8679f57 100644 --- a/management-ui/src/pages/Dashboard/index.tsx +++ b/management-ui/src/pages/Dashboard/index.tsx @@ -518,6 +518,10 @@ export default function DashboardPage() { {(wgIfaces.data ?? []).map(ifc => { const status = (wgStatus.data ?? []).filter(s => s.interface === ifc.name) + const nowSec = Date.now() / 1000 + const onlineCount = status.filter(s => s.last_handshake_unix > 0 && nowSec - s.last_handshake_unix < 180).length + const totalRx = status.reduce((acc, s) => acc + s.transfer_rx, 0) + const totalTx = status.reduce((acc, s) => acc + s.transfer_tx, 0) return (
@@ -525,13 +529,22 @@ export default function DashboardPage() { {ifc.mode} - {status.map(s => ( -
- {s.endpoint && {s.endpoint} · } - {relativeTime(s.last_handshake_unix, t)} - {' · ▼'}{formatBytes(s.transfer_rx)}{' · ▲'}{formatBytes(s.transfer_tx)} -
- ))} + {ifc.mode === 'server' ? ( + status.length > 0 && ( +
+ {t('dashboard.wgCard.peersOnline', { online: onlineCount, total: status.length })} + {' · ▼'}{formatBytes(totalRx)}{' ▲'}{formatBytes(totalTx)} +
+ ) + ) : ( + status.map(s => ( +
+ {s.endpoint && {s.endpoint} · } + {relativeTime(s.last_handshake_unix, t)} + {' · ▼'}{formatBytes(s.transfer_rx)}{' ▲'}{formatBytes(s.transfer_tx)} +
+ )) + )}
) })}