services table
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
root
2024-09-23 14:06:55 +02:00
parent 760430a211
commit 8cc41c97b9
3 changed files with 15 additions and 13 deletions

View File

@@ -146,39 +146,37 @@ function get_vpn_url($domain,$passkey) {
} }
function show_service($name, $containers) { function show_service($name, $containers) {
$str = '<div>'.$name."</div>"; $str = '<table id="'.$name.'">';
$str .= '<div id="'.$name.'" style="padding-left: 20px">'; $str .= "<tr><th>{$name}</th><td><b>Container name</b></td><td><b>Status</b></td><td><b>Action</b></td></tr>";
$containers = trim($containers); $containers = trim($containers);
$arr = explode(" ",$containers); $arr = explode(" ",$containers);
foreach ($arr as $container) { foreach ($arr as $container) {
$str .= $container."<br>"; $c_arr = explode(":",$container);
$str .= "<tr><td>&nbsp;</td><td>".$c_arr[0]."</td><td>".$c_arr[1]."</td><td>RESTART</td></tr>";
} }
$str .= '</div>'; $str .= '</table>';
echo $str; echo $str;
} }
function show_service_update($name, $update, $uptodate) { function show_service_update($name, $update, $uptodate) {
$str = '<div>'.$name."</div>"; $str = '<table id="'.$name.'">';
$str .= "<tr><th>{$name}</th><td><b>Container name</b></td><td><b>Status</b></td><td><b>Action</b></td></tr>";
$update = trim($update); $update = trim($update);
if (!empty($update)) { if (!empty($update)) {
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
$arr = explode(" ",$update); $arr = explode(" ",$update);
foreach ($arr as $container) { foreach ($arr as $container) {
$str .= $container." - UPDATE AVAILABLE<br>"; $str .= "<tr><td>&nbsp;</td><td>".$container."</td><td>UPDATE AVAILABLE</td><td>UPDATE</td></tr>";
} }
$str .= '</div>';
} }
$uptodate = trim($uptodate); $uptodate = trim($uptodate);
if (!empty($uptodate)) { if (!empty($uptodate)) {
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
$arr = explode(" ",$uptodate); $arr = explode(" ",$uptodate);
foreach ($arr as $container) { foreach ($arr as $container) {
$str .= $container." - Already up to date<br>"; $str .= "<tr><td>&nbsp;</td><td>".$container."</td><td>Already up to date</td><td></td></tr>";
} }
$str .= '</div>';
} }
echo $str; echo $str;

View File

@@ -6,6 +6,10 @@ fieldset.sub_block legend {color: black}
h1 { color: #049dff; margin-top:50px;} h1 { color: #049dff; margin-top:50px;}
a.stop {font-weight:bold; text-decoration:none; font-size:30px} a.stop {font-weight:bold; text-decoration:none; font-size:30px}
table {border: 1px solid #049dff; width:100%;}
table th {padding-left: 20px; color: #049dff; width: 25%;}
table td {padding-left: 20px; text-align:left; width: 25%;}
body#scan{ body#scan{
/* background-color: #7E57C2; */ /* background-color: #7E57C2; */
} }

View File

@@ -8,7 +8,7 @@
<!-- Bootstrap CSS --> <!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="installer.css?t=3" rel="stylesheet"> <link href="installer.css?t=4" rel="stylesheet">
</head> </head>
<body id="manage" class="text-center"> <body id="manage" class="text-center">
<div class="container-fluid"> <div class="container-fluid">
@@ -67,7 +67,7 @@
<fieldset> <fieldset>
<legend>Services</legend> <legend>Services</legend>
<pre><div id="services" style="text-align:left">Loading...</div></pre> <div id="services" style="text-align:left">Loading...</div>
</fieldset> </fieldset>
<fieldset> <fieldset>