jilo-web/app/templates/latest-data.php

65 lines
4.0 KiB
PHP
Raw Normal View History

2024-10-11 07:58:08 +00:00
<div class="row">
2025-01-13 15:54:42 +00:00
<div class="card w-auto bg-light border-light card-body" style="flex-direction: row;"><?= $widget['title'] ?></div>
2024-10-11 07:58:08 +00:00
</div>
<div class="collapse show" id="collapse<?= htmlspecialchars($widget['name']) ?>">
<div class="mb-5">
<?php if ($widget['full'] === true) { ?>
<table class="table table-results table-striped table-hover table-bordered">
<thead class="thead-dark">
<tr>
2025-01-13 15:54:42 +00:00
<th scope="col">Metric</th>
2024-10-11 07:58:08 +00:00
<?php foreach ($widget['records'] as $record) { ?>
<th scope="col"><?= htmlspecialchars($record['table_headers']) ?></th>
<?php } ?>
</tr>
</thead>
<tbody>
<tr>
2025-01-13 15:54:42 +00:00
<td>Conferences</td>
2024-10-11 07:58:08 +00:00
<?php foreach ($widget['records'] as $record) { ?>
2025-01-13 15:54:42 +00:00
<td>
<?php if (isset($record['conferences'])) { ?>
<?php if ($record['conferences'] !== null) { ?>
<a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=conferences&from_time=<?= htmlspecialchars($record['from_time']) ?>&until_time=<?= htmlspecialchars($record['until_time']) ?>"><?= htmlspecialchars($record['conferences']) ?></a>
<br>
<small class="text-muted"><?= date('Y-m-d H:i:s', strtotime($record['from_time'])) ?></small>
<?php } else { ?>
<span class="text-muted">0</span>
<?php } ?>
<?php } else { ?>
<span class="text-muted">No data</span>
<?php } ?>
2024-10-11 07:58:08 +00:00
</td>
<?php } ?>
</tr>
<tr>
2025-01-13 15:54:42 +00:00
<td>Participants</td>
2024-10-11 07:58:08 +00:00
<?php foreach ($widget['records'] as $record) { ?>
2025-01-13 15:54:42 +00:00
<td>
<?php if (isset($record['participants'])) { ?>
<?php if ($record['participants'] !== null) { ?>
<a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=participants&from_time=<?= htmlspecialchars($record['from_time']) ?>&until_time=<?= htmlspecialchars($record['until_time']) ?>"><?= htmlspecialchars($record['participants']) ?></a>
<br>
<small class="text-muted"><?= date('Y-m-d H:i:s', strtotime($record['from_time'])) ?></small>
<?php } else { ?>
<span class="text-muted">0</span>
<?php } ?>
<?php } else { ?>
<span class="text-muted">No data</span>
<?php } ?>
2024-10-11 07:58:08 +00:00
</td>
<?php } ?>
</tr>
</tbody>
</table>
<?php } else { ?>
2025-01-13 15:54:42 +00:00
<div class="alert alert-info m-3" role="alert">
No data available from any agents. Please check agent configuration and connectivity.
</div>
2024-10-11 07:58:08 +00:00
<?php } ?>
</div>
</div>
<!-- /widget "<?= htmlspecialchars($widget['name']) ?>" -->