diff --git a/app/pages/data.php b/app/pages/data.php index d1a7e1c..6bff841 100644 --- a/app/pages/data.php +++ b/app/pages/data.php @@ -150,13 +150,13 @@ if ($response['db'] === null) { // Fetch all metrics for this agent foreach ($metrics as $section => $section_metrics) { - foreach ($section_metrics as $metric => $config) { + foreach ($section_metrics as $metric => $metricConfig) { $data = $agentObject->getLatestData($platform_id, $agent, $metric); if ($data !== null) { $record['metrics'][$section][$metric] = [ 'value' => $data['value'], - 'label' => $config['label'], - 'link' => isset($config['link']) ? $config['link'] : null + 'label' => $metricConfig['label'], + 'link' => isset($metricConfig['link']) ? $metricConfig['link'] : null ]; // Use the most recent timestamp if ($record['timestamp'] === null || strtotime($data['timestamp']) > strtotime($record['timestamp'])) { diff --git a/app/templates/latest-data.php b/app/templates/latest-data.php index 3666184..853f9a7 100644 --- a/app/templates/latest-data.php +++ b/app/templates/latest-data.php @@ -26,9 +26,9 @@