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=0f8ec3e23c3ab13590d89b86941b5e33745556e6;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 06178bea5..6c4582b47 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -5217,6 +5217,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 f76892aa3..7479d20c2 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -417,6 +417,7 @@ table.form tr.action td form { text-align: left; } +<<<<<<< HEAD .tbl tr:nth-child(odd) td { background-color: var(--color-grey); } @@ -440,6 +441,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; @@ -493,12 +496,20 @@ 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); } @@ -507,6 +518,7 @@ table.form tr.action td form { width: 33%; } +<<<<<<< HEAD .tbl .status.is-connecting { background-color: var(--color-orange); color: var(--color-orange-invert); @@ -576,6 +588,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; }