site updated with php for static data

This commit is contained in:
2026-03-17 23:56:09 -07:00
parent 61421305ed
commit fd7e0aaf31
6 changed files with 193 additions and 45 deletions

View File

@ -54,15 +54,12 @@ function mergeRowsByName(data) {
const source = row.Source; // <-- changed
if (!source) return;
if (!groups[source]) {
groups[source] = { Metric: [], Data: [], Property: [], Value: [] };
groups[source] = { Metric: [], Data: [] };
}
if ('Metric' in row && 'Data' in row) {
groups[source].Metric.push(row.Metric);
groups[source].Data.push(row.Data);
} else if ('Property' in row && 'Value' in row) {
groups[source].Property.push(row.Property);
groups[source].Value.push(row.Value);
}
}
});
const merged = [];
@ -107,7 +104,7 @@ function orderRows(rows) {
4. Build an HTML table from an array of objects
------------------------------------------------------------ */
function buildTable(data) {
const cols = ['Source', 'Property', 'Value', 'Metric', 'Data']; // explicit order
const cols = ['Source', 'Metric', 'Data']; // explicit order
const table = document.createElement('table');
// Header