From: Michael Tremer Date: Sat, 23 Mar 2024 17:42:13 +0000 (+0100) Subject: web: Create a function to show the service status X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=339bb0c172c161c11cfeacb4ae983b4403dc5cd6;p=people%2Fms%2Fipfire-2.x.git web: Create a function to show the service status Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 28f8a68ba..3a5d95b03 100755 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -5216,6 +5216,14 @@ END &Header::openbox('100%', 'LEFT', $Lang::tr{'ovpn roadwarrior settings'}); + # Show the service status + &Header::ServiceStatus({ + $Lang::tr{'ovpn roadwarrior server'} => { + "process" => "openvpn", + "pidfile" => "/var/run/openvpn.pid", + } + }); + print <
diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index 894670d48..fafa51f60 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -410,6 +410,7 @@ table.form tr.action td form { text-align: left; } +<<<<<<< HEAD .tbl tr:nth-child(odd) td { background-color: var(--color-grey); } @@ -433,6 +434,8 @@ table.form tr.action td form { background-color: var(--color-yellow); } +======= +>>>>>>> 7b19c1312 (web: Create a function to show the service status) .tbl th:first-child { border-left: 1px solid #363636; border-top: 1px solid #363636; @@ -486,18 +489,27 @@ table.form tr.action td form { font-weight: bold; } +<<<<<<< HEAD .tbl .status.is-running, .tbl .status.is-connected { +======= +.tbl .status.is-running { +>>>>>>> 7b19c1312 (web: Create a function to show the service status) background-color: var(--color-green); color: var(--color-green-invert); } +<<<<<<< HEAD .tbl .status.is-stopped, .tbl .status.is-disconnected { +======= +.tbl .status.is-stopped { +>>>>>>> 7b19c1312 (web: Create a function to show the service status) background-color: var(--color-red); color: var(--color-red-invert); width: 33%; } +<<<<<<< HEAD .tbl .status.is-connecting { background-color: var(--color-orange); color: var(--color-orange-invert); @@ -567,6 +579,8 @@ table.form tr.action td form { color: var(--color-black-invert); } +======= +>>>>>>> 7b19c1312 (web: Create a function to show the service status) table.fw-nat tbody tr td { height: 2.25em; }