From: Michael Tremer Date: Wed, 17 Apr 2024 17:41:14 +0000 (+0200) Subject: wireguard.cgi: Show visual status when disconected X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fe654d7704499063ec6d766faf3249149cac7a3;p=ipfire-2.x.git wireguard.cgi: Show visual status when disconected Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index f319954cc..af4ea1551 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -188,6 +188,7 @@ END # WireGuard performs a handshake very two minutes, so we should be considered online then my $is_connected = (time - $status->{"latest-handshake"}) <= 120; + # We are connected! if ($is_connected) { push(@status, "is-connected"); @@ -209,6 +210,10 @@ END EOF } } + + # We are not connected... + } else { + push(@status, "is-disconnected"); } print <