From ca296834bff58fae0abf00d027f7a5f5de427c01 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 12 Jan 2016 16:03:49 +0100 Subject: [PATCH] Fixed the style of some report items with data in columns. TICKET: #3152 --- .../include/functions_reporting_html.php | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 2c2cefd124..25d8ad1c31 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -324,6 +324,12 @@ function reporting_html_SLA($table, $item, $mini) { $table1->head[4] = __('SLA Compliance'); $table1->head[5] = __('Status'); + $table1->headstyle = array(); + $table1->headstyle[2] = 'text-align: right'; + $table1->headstyle[3] = 'text-align: right'; + $table1->headstyle[4] = 'text-align: right'; + $table1->headstyle[5] = 'text-align: right'; + foreach ($item['data'] as $sla) { $row = array(); $row[] = $sla['agent']; @@ -390,6 +396,11 @@ function reporting_html_top_n($table, $item) { $table1->data = array (); + $table1->headstyle = array(); + $table1->headstyle[0] = 'text-align: left'; + $table1->headstyle[1] = 'text-align: left'; + $table1->headstyle[2] = 'text-align: right'; + $table1->head = array (); $table1->head[0] = __('Agent'); $table1->head[1] = __('Module'); @@ -427,6 +438,11 @@ function reporting_html_top_n($table, $item) { $table1->data = array (); + $table1->headstyle = array(); + $table1->headstyle[0] = 'text-align: center'; + $table1->headstyle[1] = 'text-align: center'; + $table1->headstyle[2] = 'text-align: center'; + $table1->head = array (); $table1->head[0] = __('Min Value'); $table1->head[1] = __('Average Value'); @@ -1619,6 +1635,7 @@ function reporting_html_availability(&$table, $item) { $table1 = new stdClass(); $table1->width = '99%'; $table1->data = array (); + $table1->head = array (); $table1->head[0] = __('Agent'); // HACK it is saved in show_graph field. @@ -1636,6 +1653,14 @@ function reporting_html_availability(&$table, $item) { $table1->head[6] = __('Time unavailable'); $table1->head[7] = __('% Ok'); + $table1->headstyle = array(); + $table1->headstyle[2] = 'text-align: right'; + $table1->headstyle[3] = 'text-align: right'; + $table1->headstyle[4] = 'text-align: right'; + $table1->headstyle[5] = 'text-align: right'; + $table1->headstyle[6] = 'text-align: right'; + $table1->headstyle[7] = 'text-align: right'; + $table1->style[0] = 'text-align: left'; $table1->style[1] = 'text-align: left'; $table1->style[2] = 'text-align: right'; @@ -1673,13 +1698,25 @@ function reporting_html_availability(&$table, $item) { if ($item['resume'] && !empty($item["data"])) { $table1->width = '99%'; $table1->data = array (); + + + $table1->head = array (); - $table1->style = array(); - $table1->head['min_text'] = ''; + $table1->head['min_text'] = __('Agent max'); $table1->head['min'] = __('Min Value'); $table1->head['avg'] = __('Average Value'); - $table1->head['max_text'] = ''; + $table1->head['max_text'] = __('Agent min'); $table1->head['max'] = __('Max Value'); + + $table1->headstyle = array(); + $table1->headstyle['min_text'] = 'text-align: left'; + $table1->headstyle['min'] = 'text-align: right'; + $table1->headstyle['avg'] = 'text-align: right'; + $table1->headstyle['max_text'] = 'text-align: left'; + $table1->headstyle['max'] = 'text-align: right'; + + + $table1->style = array(); $table1->style['min_text'] = 'text-align: left'; $table1->style['min'] = 'text-align: right'; $table1->style['avg'] = 'text-align: right';