Render health API names without label keys

This commit is contained in:
ms2k 2026-09-16 18:44:13 +09:00
commit d5fe7407da

View file

@ -65,7 +65,7 @@ function renderRow(record, recordIndex, dates, select) {
}
function renderGroup(group, groupIndex, records, dates, select) {
const [header, labels, values] = group;
const [header, names, values] = group;
const section = document.createElement("section");
section.className = "health-group";
@ -75,11 +75,7 @@ function renderGroup(group, groupIndex, records, dates, select) {
section.setAttribute("aria-labelledby", heading.id);
section.append(heading);
for (const [seriesIndex, metric] of labels.entries()) {
const name =
Object.entries(metric)
.map(([key, value]) => `${key}=${value}`)
.join(", ") || "{}";
for (const [seriesIndex, name] of names.entries()) {
const record = { name, values: values[seriesIndex] };
const recordIndex = records.length;