fix(admin): render service health details as structured HTML
CI / test (push) Successful in 1m32s
CI / docker (push) Successful in 33s

This commit is contained in:
zwitschi committed 2026-08-16 11:57:58 +02:00
1 parent e7bff8b9c0
commit d267173e30
3 files changed
+17 -4

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
{
"tabWidth": 2,
"useTabs": false,
"printWidth": 120,
"endOfLine": "lf",
"proseWrap": "preserve"
}
+4 -4
View File
@@ -567,11 +567,11 @@ async function renderServiceRow(service: any) {
try { try {
// create a list of key-value pairs for each property in the JSON object // create a list of key-value pairs for each property in the JSON object
const detailObj = JSON.parse(svcDetail); const detailObj = JSON.parse(svcDetail);
// create a list item for each key-value pair in the object // create a table of key-value pairs for each property in the JSON object
const detailList = Object.entries(detailObj) const detailTable = Object.entries(detailObj)
.map(([key, value]) => `<li><strong>${key}:</strong> ${value}</li>`) .map(([key, value]) => `<tr><td><strong>${key}</strong></td><td>${value}</td></tr>`)
.join(""); .join("");
service.detail = `<ul>${detailList}</ul>`; service.detail = `<p><table class="service-detail-table">${detailTable}</table></p>`;
} catch { } catch {
// ignore JSON parse errors // ignore JSON parse errors
} }
+6
View File
@@ -1010,6 +1010,12 @@ select {
text-align: right; text-align: right;
} }
.service-detail-table {
width: 100%;
border-collapse: collapse;
text-align: left;
}
.service-status { .service-status {
margin: 0; margin: 0;
font-weight: 700; font-weight: 700;