Skip to content

Commit

Permalink
Merge pull request #258 from serguun42/metrics-and-traces
Browse files Browse the repository at this point in the history
Update Logs panel timestamp display
  • Loading branch information
serguun42 authored Dec 12, 2023
2 parents da8efe6 + aac798d commit c8f34b8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions panel/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ <h1 class="panel__header">MSS Params</h1>
return res.json();
})
.then(
/** @param {{ isError: boolean, args: string[], tag: string, date?: Date }[]} logs */ (logs) => {
/** @param {{ isError: boolean, args: string[], tag: string, date?: string }[]} logs */ (logs) => {
logsTableBody.innerHTML = null;

logs.forEach((log, index) => {
Expand All @@ -381,7 +381,13 @@ <h1 class="panel__header">MSS Params</h1>
indexCell.innerText = LOGS_STORAGE.CURRENT_PAGE * LOGS_STORAGE.PER_PAGE + index + 1;

const timestamp = document.createElement("td");
timestamp.innerText = log.date ? log.date.toISOString() : "";
if (log.date) {
try {
timestamp.innerText = new Date(log.date).toISOString();
} catch (_) {
timestamp.innerText = log.date;
}
} else timestamp.innerText = "";

const isError = document.createElement("td");
isError.innerText = log.isError ? "🔴" : "";
Expand Down

0 comments on commit c8f34b8

Please sign in to comment.