forked from security/hakurei
cmd/pkgserver: add /status endpoint
This commit is contained in:
@@ -9,7 +9,7 @@ function toHTML(entry) {
|
||||
let v = entry.version != null ? `<span>${escapeHtml(entry.version)}</span>` : "";
|
||||
let d = entry.description != null ? `<p>${escapeHtml(entry.description)}</p>` : "";
|
||||
let w = entry.website != null ? `<a href="${encodeURI(entry.website)}">Website</a>` : "";
|
||||
let r = entry.report != null ? `<a href="${encodeURI(entry.report)}">Log</a>` : "";
|
||||
let r = entry.report ? `Log (<a href=\"${encodeURI('/api/v1/status/' + entry.name)}\">View</a> | <a href=\"${encodeURI('/status/' + entry.name)}\">Download</a>)` : "";
|
||||
let row = (document.createElement('tr'));
|
||||
row.innerHTML = `<td>
|
||||
<h2>${escapeHtml(entry.name)} ${v}</h2>
|
||||
@@ -50,7 +50,7 @@ class State {
|
||||
entriesPerPage = 10;
|
||||
currentPage = 1;
|
||||
entryIndex = 0;
|
||||
maxEntries = 100;
|
||||
maxEntries = 0;
|
||||
getEntriesPerPage() {
|
||||
return this.entriesPerPage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user