mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 16:58:27 -04:00
Merge pull request #295 from GilbN/swag-dashboard
Swag dashboard - use fontawesome icons
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 218 KiB |
@@ -2,6 +2,7 @@
|
|||||||
function GetHeader() {
|
function GetHeader() {
|
||||||
return <<<HTML
|
return <<<HTML
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
@import url("https://use.fontawesome.com/releases/v5.15.0/css/all.css");
|
||||||
.status-div {
|
.status-div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
@@ -20,17 +21,22 @@
|
|||||||
td {
|
td {
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
.green-circle {
|
.far, .fas {
|
||||||
padding: 2px 10px;
|
font-family: "Font Awesome 5 Free" !important;
|
||||||
border-radius: 100%;
|
|
||||||
background-color: green;
|
|
||||||
border: 1px solid black;
|
|
||||||
}
|
}
|
||||||
.red-circle {
|
.fa-exclamation-circle,.fa-check-circle, .fa-info-circle {
|
||||||
padding: 2px 10px;
|
font-size:20px;
|
||||||
border-radius: 50%;
|
padding: 2px;
|
||||||
background-color: red;
|
}
|
||||||
border: 1px solid black;
|
.fa-check-circle {
|
||||||
|
color: #5DB56A;
|
||||||
|
}
|
||||||
|
.fa-exclamation-circle {
|
||||||
|
color: #FF303E;
|
||||||
|
}
|
||||||
|
.fa-info-circle:hover{
|
||||||
|
color: gray;
|
||||||
|
cursor: help;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
HTML;
|
HTML;
|
||||||
@@ -45,17 +51,17 @@
|
|||||||
$tr_class = ($index % 2 == 0) ? 'shaded' : '';
|
$tr_class = ($index % 2 == 0) ? 'shaded' : '';
|
||||||
$status .= '<tr class="'.$tr_class.'"><td class="left-text"><span class="status-text">'.$result.'</span></td><td class="align-td">';
|
$status .= '<tr class="'.$tr_class.'"><td class="left-text"><span class="status-text">'.$result.'</span></td><td class="align-td">';
|
||||||
if ($data->status == 1) {
|
if ($data->status == 1) {
|
||||||
$status .= '<span class="green-circle circle-empty"></span>';
|
$status .= '<i class="fas fa-check-circle"></i>';
|
||||||
} else {
|
} else {
|
||||||
$status .= '<span class="red-circle"></span>';
|
$status .= '<i class="fas fa-exclamation-circle"></i>';
|
||||||
}
|
}
|
||||||
$status .= '</td><td>';
|
$status .= '</td><td>';
|
||||||
if (!empty($data->locations)) {
|
if (!empty($data->locations)) {
|
||||||
$locations = $data->locations;
|
$locations = $data->locations;
|
||||||
$location = implode(",", $locations);
|
$location = implode(",", $locations);
|
||||||
$status .= '<span class="green-circle circle-empty"></span></td><td class="left-text"><span class="status-text">'.$location.'</span></td>';
|
$status .= '<i class="fas fa-check-circle"></i></td><td class="left-text"><span class="status-text">'.$location.'</span></td>';
|
||||||
} else {
|
} else {
|
||||||
$status .= '<span class="red-circle"></span></td><td></td>';
|
$status .= '<i class="fas fa-exclamation-circle"></i></td><td></td>';
|
||||||
}
|
}
|
||||||
$status .= '</tr>';
|
$status .= '</tr>';
|
||||||
$index++;
|
$index++;
|
||||||
@@ -91,9 +97,10 @@
|
|||||||
$index = 0;
|
$index = 0;
|
||||||
foreach($jails as $jail){
|
foreach($jails as $jail){
|
||||||
$tr_class = ($index % 2 == 0) ? 'shaded' : '';
|
$tr_class = ($index % 2 == 0) ? 'shaded' : '';
|
||||||
|
$data = ($jail["data"]) ? ' <i title="'.htmlspecialchars($jail["data"]).'" class="fas fa-info-circle"></i>' : '';
|
||||||
$status .= '<tr class="'.$tr_class.'"><td class="left-text"><span class="status-text">'.$jail["name"].'</span></td>';
|
$status .= '<tr class="'.$tr_class.'"><td class="left-text"><span class="status-text">'.$jail["name"].'</span></td>';
|
||||||
$status .= '<td><span class="status-text">'.$jail["bans"].'</span></td>';
|
$status .= '<td><span class="status-text">'.$jail["bans"].'</span></td>';
|
||||||
$status .= '<td><span class="status-text" title="'.htmlspecialchars($jail["data"]).'">'.$jail["last_ban"].'</span></td></tr>';
|
$status .= '<td><span class="status-text">'.$jail["last_ban"].'</span>'.$data.'</td></tr>';
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
return <<<HTML
|
return <<<HTML
|
||||||
|
|||||||
Reference in New Issue
Block a user