Adds Jilo status page
parent
f3457d5240
commit
cada9dd67c
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
// Jilo components status checks
|
||||
//
|
||||
|
||||
include '../app/templates/status-server.php';
|
||||
|
||||
?>
|
|
@ -78,6 +78,11 @@ $timeNow = new DateTime('now', new DateTimeZone($userTimezone));
|
|||
</li>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<a href="<?= htmlspecialchars($app_root) ?>?page=status">
|
||||
<li class="list-group-item<?php if ($page === 'status' && $item === '') echo ' list-group-item-secondary'; else echo ' list-group-item-action'; ?>">
|
||||
<i class="fas fa-heartbeat" data-toggle="tooltip" data-placement="right" data-offset="30.0" title="status"></i>status
|
||||
</li>
|
||||
</a>
|
||||
<?php if ($userObject->hasRight($user_id, 'view app logs')) {?>
|
||||
<a href="<?= htmlspecialchars($app_root) ?>?page=logs">
|
||||
<li class="list-group-item<?php if ($page === 'logs') echo ' list-group-item-secondary'; else echo ' list-group-item-action'; ?>">
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
<!-- jilo agents -->
|
||||
<div class="card text-center w-75 mx-lef">
|
||||
<p class="h4 card-header">Jilo platform status</p>
|
||||
<div class="card-body">
|
||||
<p class="card-text text-left" style="text-align: left;">
|
||||
Jilo Server:
|
||||
<?php if ($server_status) { ?>
|
||||
<strong><span class="text-success">running</span></strong>
|
||||
<?php } else { ?>
|
||||
<strong><span class="text-danger">not running</span></strong>
|
||||
<?php } ?>
|
||||
<br />
|
||||
host: <strong><?= htmlspecialchars($server_host) ?></strong>,
|
||||
port: <strong><?= htmlspecialchars($server_port) ?></strong>,
|
||||
endpoint: <strong><?= htmlspecialchars($server_endpoint) ?></strong>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
|
@ -41,6 +41,7 @@ $allowed_urls = [
|
|||
|
||||
'profile',
|
||||
'config',
|
||||
'status',
|
||||
'logs',
|
||||
'help',
|
||||
|
||||
|
@ -151,7 +152,10 @@ if ($page == 'logout') {
|
|||
require '../app/classes/server.php';
|
||||
$serverObject = new Server($dbWeb);
|
||||
|
||||
$server_status = $serverObject->getServerStatus();
|
||||
$server_host = '127.0.0.1';
|
||||
$server_port = '8080';
|
||||
$server_endpoint = '/health';
|
||||
$server_status = $serverObject->getServerStatus($server_host, $server_port, $server_endpoint);
|
||||
if (!$server_status) {
|
||||
$error = 'The Jilo Server is not running. Some data may be old and incorrect.';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue