www_archline_hu/cadline/backend/maintenance/tests/index.php
LÁZÁR Imre AI Agent c2cf6dab13 feat(cadline): add common_cadline_libraries + maintenance backend
common_cadline_libraries (CRM hardlock/db/users classes; upstream cadline_web/cadcommonlib), maintenance/ (ARCHLine.XP license backend; upstream cadline_web/maintenance), maintenance2/. Vetted live files (byte-truth); upstream repos in PROVENANCE.md. NOTE: could be git submodules — kept as live files for byte-fidelity.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:30 +02:00

72 lines
2.5 KiB
PHP

<?php
if (!class_exists('crm_hardlock')) require_once("common_cadline_libraries/crm_hardlock.class.php");
$query = "SELECT * FROM cl_hlusers.test_results ORDER BY inserted DESC;";
Database::getInstance()->query($query);
$testResults = Database::getInstance()->fetchAssoc();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<link href="/public/DIAMOND_YELLOW.png" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<title>Automated Test Reports</title>
<style>
.clickable-row {
cursor: pointer;
}
</style>
</head>
<body>
<div class="container" style="margin-top: 5rem;">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Version</th>
<th scope="col">Build</th>
<th scope="col">Result</th>
<th scope="col">Date</th>
</tr>
</thead>
<tbody>
<?php if (!empty($testResults)): ?>
<?php foreach ($testResults as $result): ?>
<tr class='clickable-row <?= crm_hardlock::getTestClass($result['result']) ?>' data-href='/maintenance/tests/showTest.php?id=<?= $result['guid'] ?>'>
<th scope="row"><?= $result['guid'] ?></th>
<td><?= $result['version'] ?></td>
<td><?= $result['build'] ?></td>
<td><?= $result['result'] ?></td>
<td><?= $result['inserted'] ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="5" style="text-align: center;">No result found</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<script src="https://www.archlinexp.com/media/jui/js/jquery.min.js"></script>
<script>
$(document).ready(function() {
$(".clickable-row").click(function() {
window.open($(this).data("href"), '_blank');
});
});
</script>
</body>
</html>