Small bugfixes

main
Yasen Pramatarov 2024-09-30 12:22:53 +03:00
parent b72d4ea791
commit e110619835
2 changed files with 8 additions and 4 deletions

View File

@ -151,7 +151,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($userObject->hasRight($user_id, 'view config file')) { if ($userObject->hasRight($user_id, 'view config file')) {
include '../app/templates/config-list.php'; include '../app/templates/config-list.php';
} else { } else {
include '../app/templates/unauthorized.php'; include '../app/templates/error-unauthorized.php';
} }
} }
} }

View File

@ -4,8 +4,12 @@
<p class="h4 card-header">Jilo Agents on platform <?= htmlspecialchars($platform_id) ?> (<?= htmlspecialchars($platformDetails[0]['name']) ?>)</p> <p class="h4 card-header">Jilo Agents on platform <?= htmlspecialchars($platform_id) ?> (<?= htmlspecialchars($platformDetails[0]['name']) ?>)</p>
<div class="card-body"> <div class="card-body">
<?php foreach ($agentDetails as $agent) { ?> <?php foreach ($agentDetails as $agent) { ?>
<p class="card-text"> <p class="card-text text-left" style="text-align: left;">
agent id<?= htmlspecialchars($agent['id']) ?>: type <?= htmlspecialchars($agent['agent_type_id']) ?>, url <?= htmlspecialchars($agent['url']) ?> agent id: <strong><?= htmlspecialchars($agent['id']) ?></strong>
agent type: <?= htmlspecialchars($agent['agent_type_id']) ?> (<strong><?= htmlspecialchars($agent['agent_description']) ?></strong>)
<br />
endpoint: <strong><?= htmlspecialchars($agent['url']) ?><?= htmlspecialchars($agent['agent_endpoint']) ?></strong>
<br />
<button onclick="fetchData('<?= htmlspecialchars($agent['id']) ?>', '<?= htmlspecialchars($agent['url']) ?>', '<?= htmlspecialchars($agent['agent_endpoint']) ?>')">fetch data</button> <button onclick="fetchData('<?= htmlspecialchars($agent['id']) ?>', '<?= htmlspecialchars($agent['url']) ?>', '<?= htmlspecialchars($agent['agent_endpoint']) ?>')">fetch data</button>
<button onclick="fetchData('<?= htmlspecialchars($agent['id']) ?>', '<?= htmlspecialchars($agent['url']) ?>', '<?= htmlspecialchars($agent['agent_endpoint']) ?>', true)">force refresh</button> <button onclick="fetchData('<?= htmlspecialchars($agent['id']) ?>', '<?= htmlspecialchars($agent['url']) ?>', '<?= htmlspecialchars($agent['agent_endpoint']) ?>', true)">force refresh</button>
</p> </p>