85 lines
2.6 KiB
Handlebars
85 lines
2.6 KiB
Handlebars
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
</head>
|
|
|
|
<body class="d-flex flex-column">
|
|
<nav id="navbar" class="navbar navbar-expand-lg bg-body-tertiary mb-5">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="/">Request Mirror</a>
|
|
<button
|
|
class="navbar-toggler"
|
|
type="button"
|
|
data-bs-toggle="collapse"
|
|
data-bs-target="#navbarSupportedContent"
|
|
aria-controls="navbarSupportedContent"
|
|
aria-expanded="false"
|
|
aria-label="Toggle navigation"
|
|
>
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" aria-current="page" href="/">Home</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/test">Test Page</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/history">History</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div id="body" class="p-5">
|
|
<div class="tab-pane fade show active" id="header" role="tabpanel" aria-labelledby="header-tab">
|
|
<h1>Request History</h1>
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>History ID</th>
|
|
<th>Client ID</th>
|
|
<th>Request Type</th>
|
|
<th>TimeStamp</th>
|
|
</tr>
|
|
{{#each history_records}}
|
|
<tr>
|
|
<td><a href="/history/{{id}}">{{id}}</a></td>
|
|
<td>{{client_id}}</td>
|
|
<td>{{request_type}}</td>
|
|
<td>{{timestamp}}</td>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
let records = [
|
|
{{#each history_records}}
|
|
{
|
|
id: {{id}},
|
|
client_id: "{{client_id}}",
|
|
request_type: "{{request_type}}",
|
|
timestamp: "{{timestamp}}"
|
|
},
|
|
{{/each}}
|
|
];
|
|
|
|
function popupRecord(event, id) {
|
|
console.log(records.filter(v => v.id == id));
|
|
}
|
|
</script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
|
|
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
|
|
crossorigin="anonymous"></script>
|
|
</body>
|
|
|
|
</html> |