site updated with php for static data
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user