Merge branch 'main' of https://git.chrischro.me/LiteNet/AstroCom-API
This commit is contained in:
commit
e3ece6a02d
|
@ -53,4 +53,7 @@ function populateTable(routes) {
|
|||
`;
|
||||
tableBody.appendChild(row);
|
||||
});
|
||||
|
||||
// populate serverCount
|
||||
document.getElementById('serverCount').innerText = routes.length;
|
||||
}
|
|
@ -8,6 +8,8 @@ function getDirectoryEntries() {
|
|||
row.innerHTML = `<td>${entry.number}</td><td>${entry.name}</td>`;
|
||||
table.appendChild(row);
|
||||
});
|
||||
// Set dirCount to the number of entries in the directory
|
||||
document.getElementById('dirCount').innerText = data.length;
|
||||
})
|
||||
.catch(error => console.error('Error fetching directory:', error));
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
<a href="/admin" class="btn btn-outline-light">Admin Login</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="d-flex align-items-center gap-3 mb-3">
|
||||
<h2 class="m-0 text-center w-100">AstroCom Directory</h2>
|
||||
<div class="d-flex align-items-center justify-content-center gap-3 mb-3">
|
||||
<h2 class="m-0">AstroCom Directory</h2>
|
||||
<p class="m-0">Total Entries: <span id="dirCount">0</span></p>
|
||||
</div>
|
||||
<div class="container mt-4" style="max-width: 400px;">
|
||||
<table class="table table-dark table-striped">
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<div class="d-flex align-items-center gap-3 mb-3">
|
||||
<h2 class="m-0">Admin Dashboard</h2>
|
||||
<a href="/admin/create" class="btn btn-primary">Create New Server</a>
|
||||
<p class="m-0">Total Servers: <span id="serverCount">0</span> | Total Directory Entries: <span id="dirCount">0</span></p>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="flex-grow-1">
|
||||
|
|
Loading…
Reference in a new issue