Skip to content

Commit

Permalink
monitoring: Fix performance data table markup
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Nov 11, 2015
1 parent 75091d0 commit dbec274
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions modules/monitoring/application/views/helpers/Perfdata.php
Expand Up @@ -61,14 +61,14 @@ function ($a, $b) {
$headers[$column] = $labels[$column];
}
}
$table = array('<td><b>' . implode('</b></td><td><b>', $headers) . '<b></td>');
$table = array('<thead><tr><th>' . implode('</th><th>', $headers) . '</th></tr></thead>');
foreach ($pieChartData as $perfdata) {
if ($compact && $perfdata->isVisualizable()) {
$results[] = $perfdata->asInlinePie($color)->render();
} else {
$data = array();
if ($perfdata->isVisualizable()) {
$data []= $perfdata->asInlinePie($color)->render() . '&nbsp;';
$data []= $perfdata->asInlinePie($color)->render();
} elseif (isset($columns[''])) {
$data []= '';
}
Expand All @@ -85,7 +85,7 @@ function ($a, $b) {
);
}
}
$table []= '<tr><td>' . implode('</td><td>', $data) . '</td></tr>';
$table []= '<tbody><tr><td class="sparkline-col">' . implode('</td><td>', $data) . '</td></tr></tbody>';
}
}
if ($limit > 0) {
Expand All @@ -107,8 +107,7 @@ function ($a, $b) {
return '';
}
return sprintf(
'<table class="perfdata %s">%s</table>',
isset($columns['']) ? 'perfdata-piecharts' : '',
'<table class="performance-data-table">%s</table>',
implode("\n", $table)
);
}
Expand Down

0 comments on commit dbec274

Please sign in to comment.