Fixes status page design
parent
e59920cfd0
commit
fc71cdd7f8
|
@ -286,7 +286,7 @@ class Agent {
|
||||||
$base64Url_payload = $this->base64UrlEncode($payload);
|
$base64Url_payload = $this->base64UrlEncode($payload);
|
||||||
|
|
||||||
// signature
|
// signature
|
||||||
$signature = hash_hmac('sha256', $base64Url_header . "." . $base64Url_payload, $secret_key, true);
|
$signature = hash_hmac('sha256', $base64Url_header . "." . $base64Url_payload, $secret_key ?? '', true);
|
||||||
$base64Url_signature = $this->base64UrlEncode($signature);
|
$base64Url_signature = $this->base64UrlEncode($signature);
|
||||||
|
|
||||||
// build the JWT
|
// build the JWT
|
||||||
|
|
|
@ -13,7 +13,9 @@ include '../app/includes/messages.php';
|
||||||
include '../app/includes/messages-show.php';
|
include '../app/includes/messages-show.php';
|
||||||
|
|
||||||
require '../app/classes/agent.php';
|
require '../app/classes/agent.php';
|
||||||
|
require '../app/classes/host.php';
|
||||||
$agentObject = new Agent($dbWeb);
|
$agentObject = new Agent($dbWeb);
|
||||||
|
$hostObject = new Host($dbWeb);
|
||||||
|
|
||||||
include '../app/templates/status-server.php';
|
include '../app/templates/status-server.php';
|
||||||
|
|
||||||
|
@ -25,17 +27,22 @@ foreach ($platformsAll as $platform) {
|
||||||
if ($response['error'] !== null) {
|
if ($response['error'] !== null) {
|
||||||
$jilo_database_status = $response['error'];
|
$jilo_database_status = $response['error'];
|
||||||
} else {
|
} else {
|
||||||
$jilo_database_status = 'OK';
|
$jilo_database_status = 'Connected';
|
||||||
}
|
}
|
||||||
|
|
||||||
include '../app/templates/status-platform.php';
|
include '../app/templates/status-platform.php';
|
||||||
|
|
||||||
// fetch agent details for the current platform
|
// fetch hosts for the current platform
|
||||||
$agentDetails = $agentObject->getAgentDetails($platform['id']);
|
$hostDetails = $hostObject->getHostDetails($platform['id']);
|
||||||
|
foreach ($hostDetails as $host) {
|
||||||
|
// fetch agent details for the current host
|
||||||
|
$agentDetails = $agentObject->getAgentDetails($host['id']);
|
||||||
foreach ($agentDetails as $agent) {
|
foreach ($agentDetails as $agent) {
|
||||||
|
// we try to parse the URL to scheme:/host:port
|
||||||
$agent_url = parse_url($agent['url']);
|
$agent_url = parse_url($agent['url']);
|
||||||
$agent_protocol = isset($agent_url['scheme']) ? $agent_url['scheme']: '';
|
$agent_protocol = isset($agent_url['scheme']) ? $agent_url['scheme']: '';
|
||||||
$agent_host = isset($agent_url['host']) ? $agent_url['host']: '';
|
// on failure we keep the full value for displaying purpose
|
||||||
|
$agent_host = isset($agent_url['host']) ? $agent_url['host']: $agent['url'];
|
||||||
$agent_port = isset($agent_url['port']) ? $agent_url['port']: '';
|
$agent_port = isset($agent_url['port']) ? $agent_url['port']: '';
|
||||||
|
|
||||||
// we get agent data to check availability
|
// we get agent data to check availability
|
||||||
|
@ -67,7 +74,11 @@ foreach ($platformsAll as $platform) {
|
||||||
|
|
||||||
include '../app/templates/status-agent.php';
|
include '../app/templates/status-agent.php';
|
||||||
}
|
}
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
}
|
}
|
||||||
|
echo "\n\t\t\t\t\t\t\t</div>\n";
|
||||||
|
}
|
||||||
|
echo "\n\t\t\t\t\t\t</div>";
|
||||||
|
echo "\n\t\t\t\t\t</div>";
|
||||||
|
echo "\n\t\t\t\t</div>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -19,7 +19,6 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// dismissible messages
|
// dismissible messages
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
@ -39,7 +38,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -46,5 +46,6 @@
|
||||||
<?= Messages::render($msg['category'], $msg['key'], $msg['custom_message'] ?? null) ?>
|
<?= Messages::render($msg['category'], $msg['key'], $msg['custom_message'] ?? null) ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="d-flex align-items-center flex-wrap border-top p-3">
|
<div class="d-flex align-items-center flex-wrap border-top p-3">
|
||||||
<div class="d-flex align-items-center me-4">
|
<div class="d-flex align-items-center me-4">
|
||||||
<span class="me-2">Jilo agent
|
<span class="me-2">Jilo agent
|
||||||
<a href="<?= htmlspecialchars($app_root) ?>?page=config#platform<?= htmlspecialchars($platform['id']) ?>agent<?= htmlspecialchars($agent['id']) ?>" class="text-decoration-none">
|
<a href="<?= htmlspecialchars($app_root) ?>?page=settings#platform-<?= htmlspecialchars($platform['id']) ?>agent-<?= htmlspecialchars($agent['id']) ?>" class="text-decoration-none">
|
||||||
<?= htmlspecialchars($agent['agent_description']) ?>
|
<?= htmlspecialchars($agent['agent_description']) ?>
|
||||||
</a>:
|
</a>:
|
||||||
</span>
|
</span>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-items-center me-4">
|
<div class="d-flex align-items-center me-4">
|
||||||
<span class="me-4">Host: <strong><?= htmlspecialchars($agent_host) ?></strong></span>
|
<span class="me-4">Host: <strong><?= htmlspecialchars($agent_host) ?></strong></span>
|
||||||
<span class="me-4">Port: <strong><?= htmlspecialchars($agent_port) ?></strong></span>
|
<span class="me-4">Port: <?= isset($agent_port) && $agent_port !== '' ? '<strong>' . htmlspecialchars($agent_port) . '</strong>' : '<em class="small text-muted">not set</em>' ?></span>
|
||||||
<span>Endpoint: <strong><?= htmlspecialchars($agent['agent_endpoint']) ?></strong></span>
|
<span>Endpoint: <strong><?= htmlspecialchars($agent['agent_endpoint']) ?></strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,19 +3,18 @@
|
||||||
<div class="card mt-3 mb-3">
|
<div class="card mt-3 mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4>
|
<h4>
|
||||||
<a href="<?= htmlspecialchars($app_root) ?>?page=config#platform<?= htmlspecialchars($platform['id']) ?>" class="text-decoration-none">
|
<a href="<?= htmlspecialchars($app_root) ?>?page=settings#platform-<?= htmlspecialchars($platform['id']) ?>" class="text-decoration-none">
|
||||||
Jitsi platform "<?= htmlspecialchars($platform['name']) ?>"
|
Jitsi platform "<?= htmlspecialchars($platform['name']) ?>"
|
||||||
</a>
|
</a>
|
||||||
</h4>
|
</h4>
|
||||||
<small class="text-muted">Remote Jitsi Meet installation with its database and agents here.</small>
|
<small class="text-muted">Remote Jitsi Meet installation with its database and agents here.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-0">
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex align-items-center flex-wrap">
|
<div class="d-flex align-items-center flex-wrap">
|
||||||
<span class="me-4">Jilo database: <strong><?= htmlspecialchars($platform['jilo_database']) ?></strong></span>
|
<span class="me-4">Jilo database: <strong><?= htmlspecialchars($platform['jilo_database']) ?></strong></span>
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="me-2">Status:</span>
|
<span class="me-2">Status:</span>
|
||||||
<span class="badge <?= $jilo_database_status === 'OK' ? 'bg-success' : 'bg-danger' ?>"><?= htmlspecialchars($jilo_database_status) ?></span>
|
<span class="badge <?= $jilo_database_status === 'Connected' ? 'bg-success' : 'bg-danger' ?>"><?= htmlspecialchars($jilo_database_status) ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
|
|
||||||
<!-- jilo status -->
|
<!-- jilo server status -->
|
||||||
<div class="card mt-3">
|
<div class="card mt-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4>Jilo server</h4>
|
<h4>Jilo server</h4>
|
||||||
|
|
Loading…
Reference in New Issue