2014-06-04 Sergio Martin <sergio.martin@artica.es>
* include/constants.php include/functions_graph.php include/functions_reporting.php include/graphs/functions_pchart.php include/graphs/functions_flot.php include/functions.php include/functions_events.php: Fix a lot of errors on events items on reports using now the same query as events view, etc. * include/styles/pandora.css: Little aesthetic improvement in focus buttons and unset webfont git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10105 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
945bcf23d6
commit
0f2c9f28c5
|
@ -1,3 +1,18 @@
|
||||||
|
2014-06-04 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/constants.php
|
||||||
|
include/functions_graph.php
|
||||||
|
include/functions_reporting.php
|
||||||
|
include/graphs/functions_pchart.php
|
||||||
|
include/graphs/functions_flot.php
|
||||||
|
include/functions.php
|
||||||
|
include/functions_events.php: Fix a lot of errors
|
||||||
|
on events items on reports using now the same query
|
||||||
|
as events view, etc.
|
||||||
|
|
||||||
|
* include/styles/pandora.css: Little aesthetic
|
||||||
|
improvement in focus buttons and unset webfont
|
||||||
|
|
||||||
2014-06-04 Miguel de Dios <miguel.dedios@artica.es>
|
2014-06-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/javascript/mergely/*: added mergely javascript library.
|
* include/javascript/mergely/*: added mergely javascript library.
|
||||||
|
|
|
@ -126,7 +126,7 @@ define('COL_NORMAL','#6EB432');
|
||||||
define('COL_NOTINIT','#3BA0FF');
|
define('COL_NOTINIT','#3BA0FF');
|
||||||
define('COL_UNKNOWN','#AAAAAA');
|
define('COL_UNKNOWN','#AAAAAA');
|
||||||
define('COL_ALERTFIRED','#FF8800');
|
define('COL_ALERTFIRED','#FF8800');
|
||||||
define('COL_MINOR','#FF92E9');
|
define('COL_MINOR','#F099A2');
|
||||||
define('COL_MAJOR','#C97A4A');
|
define('COL_MAJOR','#C97A4A');
|
||||||
define('COL_INFORMATIONAL','#E4E4E4');
|
define('COL_INFORMATIONAL','#E4E4E4');
|
||||||
define('COL_MAINTENANCE','#3BA0FF');
|
define('COL_MAINTENANCE','#3BA0FF');
|
||||||
|
|
|
@ -1126,6 +1126,45 @@ function get_priority_class($priority) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get priority style from priority class (CSS class).
|
||||||
|
*
|
||||||
|
* @param string priority class.
|
||||||
|
*
|
||||||
|
* @return string CSS priority class.
|
||||||
|
*/
|
||||||
|
function get_priority_style($priority_class) {
|
||||||
|
switch ($priority_class) {
|
||||||
|
case "datos_blue":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_INFORMATIONAL . '; color: #FFFFFF;';
|
||||||
|
break;
|
||||||
|
case "datos_grey":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_UNKNOWN . '; color: #FFFFFF;';
|
||||||
|
break;
|
||||||
|
case "datos_green":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_NORMAL . '; color: #FFFFFF;';
|
||||||
|
break;
|
||||||
|
case "datos_yellow":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_WARNING . ';';
|
||||||
|
break;
|
||||||
|
case "datos_red":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_CRITICAL . '; color: #FFFFFF;';
|
||||||
|
break;
|
||||||
|
case "datos_pink":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_MINOR . ';';
|
||||||
|
break;
|
||||||
|
case "datos_brown":
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_MAJOR . '; color: #FFFFFF;';
|
||||||
|
break;
|
||||||
|
case "datos_grey":
|
||||||
|
default:
|
||||||
|
$style_css_criticity = 'background-color: ' . COL_UNKNOWN . '; color: #FFFFFF;';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $style_css_criticity;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the enterprise version is installed.
|
* Check if the enterprise version is installed.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1102,22 +1102,10 @@ function events_get_group_events ($id_group, $period, $date,
|
||||||
if ($filter_event_no_validated) {
|
if ($filter_event_no_validated) {
|
||||||
$sql_where .= ' AND estado = 0 ';
|
$sql_where .= ' AND estado = 0 ';
|
||||||
}
|
}
|
||||||
|
$sql_where .= sprintf(' AND id_grupo IN (%s) AND utimestamp > %d
|
||||||
|
AND utimestamp <= %d ', implode (",", $id_group), $datelimit, $date);
|
||||||
|
|
||||||
|
return events_get_events_grouped($sql_where, 0, 1000);
|
||||||
$sql = sprintf ('SELECT *,
|
|
||||||
(SELECT t2.nombre
|
|
||||||
FROM tagente AS t2
|
|
||||||
WHERE t2.id_agente = t3.id_agente) AS agent_name,
|
|
||||||
(SELECT t2.fullname
|
|
||||||
FROM tusuario AS t2
|
|
||||||
WHERE t2.id_user = t3.id_usuario) AS user_name
|
|
||||||
FROM tevento AS t3
|
|
||||||
WHERE utimestamp > %d AND utimestamp <= %d
|
|
||||||
AND id_grupo IN (%s) ' . $sql_where . '
|
|
||||||
ORDER BY utimestamp ASC',
|
|
||||||
$datelimit, $date, implode (",", $id_group));
|
|
||||||
|
|
||||||
return db_get_all_rows_sql ($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1205,7 +1193,8 @@ function events_get_agent ($id_agent, $period, $date = 0,
|
||||||
|
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
|
||||||
$sql_where = ' AND 1 = 1 ';
|
$sql_where = '';
|
||||||
|
|
||||||
$criticities = array();
|
$criticities = array();
|
||||||
if ($filter_event_critical) {
|
if ($filter_event_critical) {
|
||||||
$criticities[] = 4;
|
$criticities[] = 4;
|
||||||
|
@ -1224,10 +1213,10 @@ function events_get_agent ($id_agent, $period, $date = 0,
|
||||||
$sql_where .= ' AND estado = 0 ';
|
$sql_where .= ' AND estado = 0 ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_where .= sprintf(' id_agente = %d AND utimestamp > %d
|
$sql_where .= sprintf(' AND id_agente = %d AND utimestamp > %d
|
||||||
AND utimestamp <= %d ', $id_agent, $datelimit, $date);
|
AND utimestamp <= %d ', $id_agent, $datelimit, $date);
|
||||||
|
|
||||||
return events_get_events_grouped($sql_where);
|
return events_get_events_grouped($sql_where, 0, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1251,6 +1240,11 @@ function events_get_module ($id_agent_module, $period, $date = 0) {
|
||||||
|
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
|
||||||
|
$sql_where .= sprintf(' AND id_agentmodule = %d AND utimestamp > %d
|
||||||
|
AND utimestamp <= %d ', $id_agent_module, $datelimit, $date);
|
||||||
|
|
||||||
|
return events_get_events_grouped($sql_where, 0, 1000);
|
||||||
|
|
||||||
$sql = sprintf ('SELECT evento, event_type, criticity, count(*) as count_rep, max(timestamp) AS time2
|
$sql = sprintf ('SELECT evento, event_type, criticity, count(*) as count_rep, max(timestamp) AS time2
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE id_agentmodule = %d AND utimestamp > %d AND utimestamp <= %d
|
WHERE id_agentmodule = %d AND utimestamp > %d AND utimestamp <= %d
|
||||||
|
|
|
@ -4051,4 +4051,35 @@ function graph_nodata_image($width = 300, $height = 110, $type = 'area', $text =
|
||||||
|
|
||||||
return $div;
|
return $div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_criticity_pie_colors ($data_graph) {
|
||||||
|
$colors = array();
|
||||||
|
foreach (array_keys($data_graph) as $crit) {
|
||||||
|
switch ($crit) {
|
||||||
|
case __('Maintenance'):
|
||||||
|
$colors[$crit] = COL_MAINTENANCE;
|
||||||
|
break;
|
||||||
|
case __('Informational'):
|
||||||
|
$colors[$crit] = COL_INFORMATIONAL;
|
||||||
|
break;
|
||||||
|
case __('Normal'):
|
||||||
|
$colors[$crit] = COL_NORMAL;
|
||||||
|
break;
|
||||||
|
case __('Warning'):
|
||||||
|
$colors[$crit] = COL_WARNING;
|
||||||
|
break;
|
||||||
|
case __('Critical'):
|
||||||
|
$colors[$crit] = COL_CRITICAL;
|
||||||
|
break;
|
||||||
|
case __('Minor'):
|
||||||
|
$colors[$crit] = COL_MINOR;
|
||||||
|
break;
|
||||||
|
case __('Major'):
|
||||||
|
$colors[$crit] = COL_MAJOR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $colors;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2555,61 +2555,65 @@ function reporting_get_agents_detailed_event ($id_agents, $period = 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($events)
|
if ($events) {
|
||||||
foreach ($events as $eventRow) {
|
$note = '';
|
||||||
foreach ($eventRow as $k => $event) {
|
if (count($events) >= 1000) {
|
||||||
//First pass along the class of this row
|
$note .= '* ' . __('Maximum of events shown') . ' (1000)<br>';
|
||||||
$table->cellclass[$k][1] = $table->cellclass[$k][2] =
|
}
|
||||||
$table->cellclass[$k][4] = $table->cellclass[$k][5] =
|
foreach ($events as $eventRow) {
|
||||||
$table->cellclass[$k][6] =
|
foreach ($eventRow as $k => $event) {
|
||||||
get_priority_class ($event["criticity"]);
|
//First pass along the class of this row
|
||||||
|
$table->cellclass[$k][1] = $table->cellclass[$k][2] =
|
||||||
$data = array ();
|
$table->cellclass[$k][4] = $table->cellclass[$k][5] =
|
||||||
// Colored box
|
$table->cellclass[$k][6] =
|
||||||
switch ($event['estado']) {
|
get_priority_class ($event["criticity"]);
|
||||||
case 0:
|
|
||||||
$img_st = "images/star.png";
|
$data = array ();
|
||||||
$title_st = __('New event');
|
// Colored box
|
||||||
break;
|
switch ($event['estado']) {
|
||||||
case 1:
|
case 0:
|
||||||
$img_st = "images/tick.png";
|
$img_st = "images/star.png";
|
||||||
$title_st = __('Event validated');
|
$title_st = __('New event');
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 1:
|
||||||
$img_st = "images/hourglass.png";
|
$img_st = "images/tick.png";
|
||||||
$title_st = __('Event in process');
|
$title_st = __('Event validated');
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
$img_st = "images/hourglass.png";
|
||||||
|
$title_st = __('Event in process');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$data[] = html_print_image ($img_st, true,
|
||||||
|
array ("class" => "image_status",
|
||||||
|
"width" => 16,
|
||||||
|
"title" => $title_st));
|
||||||
|
|
||||||
|
$data[] = $event['event_rep'];
|
||||||
|
|
||||||
|
$data[] = ui_print_truncate_text(
|
||||||
|
io_safe_output($event['evento']),
|
||||||
|
140, false, true);
|
||||||
|
//$data[] = $event['event_type'];
|
||||||
|
$data[] = events_print_type_img ($event["event_type"], true);
|
||||||
|
|
||||||
|
$data[] = get_priority_name ($event['criticity']);
|
||||||
|
if (empty($event['id_usuario']) && $event['estado'] == EVENT_VALIDATE) {
|
||||||
|
$data[] = '<i>' . __('System') . '</i>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$user_name = db_get_value ('fullname', 'tusuario', 'id_user', $event['id_usuario']);
|
||||||
|
$data[] = io_safe_output($user_name);
|
||||||
|
}
|
||||||
|
$data[] = '<font style="font-size: 6pt;">' .
|
||||||
|
date($config['date_format'], $event['timestamp_rep']) . '</font>';
|
||||||
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
$data[] = html_print_image ($img_st, true,
|
|
||||||
array ("class" => "image_status",
|
|
||||||
"width" => 16,
|
|
||||||
"height" => 16,
|
|
||||||
"title" => $title_st));
|
|
||||||
|
|
||||||
$data[] = $event['event_rep'];
|
|
||||||
|
|
||||||
$data[] = ui_print_truncate_text(
|
|
||||||
io_safe_output($event['evento']),
|
|
||||||
140, false, true);
|
|
||||||
//$data[] = $event['event_type'];
|
|
||||||
$data[] = events_print_type_img ($event["event_type"], true);
|
|
||||||
|
|
||||||
$data[] = get_priority_name ($event['criticity']);
|
|
||||||
if (empty($event['id_usuario']) && $event['estado'] == EVENT_VALIDATE) {
|
|
||||||
$data[] = '<i>' . __('System') . '</i>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$user_name = db_get_value ('fullname', 'tusuario', 'id_user', $event['id_usuario']);
|
|
||||||
$data[] = io_safe_output($user_name);
|
|
||||||
}
|
|
||||||
$data[] = '<font style="font-size: 6pt;">' .
|
|
||||||
date($config['date_format'], $event['timestamp_rep']) . '</font>';
|
|
||||||
array_push ($table->data, $data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($events)
|
if ($events)
|
||||||
return html_print_table ($table, $return);
|
return html_print_table ($table, $return) . $note;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2627,6 +2631,8 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
||||||
$date = 0, $return = false, $html = true,
|
$date = 0, $return = false, $html = true,
|
||||||
$filter_event_validated = false, $filter_event_critical = false,
|
$filter_event_validated = false, $filter_event_critical = false,
|
||||||
$filter_event_warning = false, $filter_event_no_validated = false) {
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
|
||||||
if (!is_numeric ($date)) {
|
if (!is_numeric ($date)) {
|
||||||
$date = strtotime ($date);
|
$date = strtotime ($date);
|
||||||
|
@ -2661,6 +2667,10 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
||||||
$filter_event_warning, $filter_event_no_validated);
|
$filter_event_warning, $filter_event_no_validated);
|
||||||
|
|
||||||
if ($events) {
|
if ($events) {
|
||||||
|
$note = '';
|
||||||
|
if (count($events) >= 1000) {
|
||||||
|
$note .= '* ' . __('Maximum of events shown') . ' (1000)<br>';
|
||||||
|
}
|
||||||
foreach ($events as $k => $event) {
|
foreach ($events as $k => $event) {
|
||||||
//First pass along the class of this row
|
//First pass along the class of this row
|
||||||
$table->cellclass[$k][1] = $table->cellclass[$k][3] =
|
$table->cellclass[$k][1] = $table->cellclass[$k][3] =
|
||||||
|
@ -2688,7 +2698,6 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
||||||
$data[] = html_print_image ($img_st, true,
|
$data[] = html_print_image ($img_st, true,
|
||||||
array ("class" => "image_status",
|
array ("class" => "image_status",
|
||||||
"width" => 16,
|
"width" => 16,
|
||||||
"height" => 16,
|
|
||||||
"title" => $title_st,
|
"title" => $title_st,
|
||||||
"id" => 'status_img_' . $event["id_evento"]));
|
"id" => 'status_img_' . $event["id_evento"]));
|
||||||
|
|
||||||
|
@ -2699,20 +2708,26 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
||||||
//$data[1] = $event['event_type'];
|
//$data[1] = $event['event_type'];
|
||||||
$data[] = events_print_type_img ($event["event_type"], true);
|
$data[] = events_print_type_img ($event["event_type"], true);
|
||||||
|
|
||||||
if (!empty($event['agent_name']))
|
if (!empty($event['id_agente']))
|
||||||
$data[] = $event['agent_name'];
|
$data[] = agents_get_name($event['id_agente']);
|
||||||
else
|
else
|
||||||
$data[] = __('Pandora System');
|
$data[] = __('Pandora System');
|
||||||
$data[] = get_priority_name ($event['criticity']);
|
$data[] = get_priority_name ($event['criticity']);
|
||||||
$data[] = io_safe_output($event['user_name']);
|
if (empty($event['id_usuario']) && $event['estado'] == EVENT_VALIDATE) {
|
||||||
|
$data[] = '<i>' . __('System') . '</i>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$user_name = db_get_value ('fullname', 'tusuario', 'id_user', $event['id_usuario']);
|
||||||
|
$data[] = io_safe_output($user_name);
|
||||||
|
}
|
||||||
$data[] = '<font style="font-size: 6pt;">' .
|
$data[] = '<font style="font-size: 6pt;">' .
|
||||||
$event['timestamp'] .
|
date($config['date_format'], $event['timestamp_rep']) .
|
||||||
'</font>';
|
'</font>';
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($html) {
|
if ($html) {
|
||||||
return html_print_table ($table, $return);
|
return html_print_table ($table, $return) . $note;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return $table;
|
return $table;
|
||||||
|
@ -2739,6 +2754,8 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
||||||
* @return mixed A table object (XHTML) or object table is false the html.
|
* @return mixed A table object (XHTML) or object table is false the html.
|
||||||
*/
|
*/
|
||||||
function reporting_get_module_detailed_event ($id_modules, $period = 0, $date = 0, $return = false, $html = true) {
|
function reporting_get_module_detailed_event ($id_modules, $period = 0, $date = 0, $return = false, $html = true) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
$id_modules = (array)safe_int ($id_modules, 1);
|
$id_modules = (array)safe_int ($id_modules, 1);
|
||||||
|
|
||||||
if (!is_numeric ($date)) {
|
if (!is_numeric ($date)) {
|
||||||
|
@ -2755,11 +2772,14 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, $date =
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
$table->head[0] = __('Event name');
|
$table->head[0] = __('Status');
|
||||||
$table->head[1] = __('Event type');
|
$table->head[1] = __('Event name');
|
||||||
$table->head[2] = __('Criticity');
|
$table->head[2] = __('Event type');
|
||||||
$table->head[3] = __('Count');
|
$table->head[3] = __('Criticity');
|
||||||
$table->head[4] = __('Timestamp');
|
$table->head[4] = __('Count');
|
||||||
|
$table->head[5] = __('Timestamp');
|
||||||
|
$table->style[0] = 'text-align: center;';
|
||||||
|
$table->style[4] = 'text-align: center;';
|
||||||
|
|
||||||
$events = array ();
|
$events = array ();
|
||||||
|
|
||||||
|
@ -2771,20 +2791,51 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, $date =
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($events) {
|
if ($events) {
|
||||||
|
$note = '';
|
||||||
|
if (count($events) >= 1000) {
|
||||||
|
$note .= '* ' . __('Maximum of events shown') . ' (1000)<br>';
|
||||||
|
}
|
||||||
foreach ($events as $eventRow) {
|
foreach ($events as $eventRow) {
|
||||||
foreach ($eventRow as $event) {
|
foreach ($eventRow as $k => $event) {
|
||||||
|
//$k = count($table->data);
|
||||||
|
$table->cellclass[$k][1] = $table->cellclass[$k][2] =
|
||||||
|
$table->cellclass[$k][3] = $table->cellclass[$k][4] =
|
||||||
|
$table->cellclass[$k][5] = get_priority_class ($event["criticity"]);
|
||||||
|
|
||||||
$data = array ();
|
$data = array ();
|
||||||
$data[0] = io_safe_output($event['evento']);
|
|
||||||
$data[1] = $event['event_type'];
|
// Colored box
|
||||||
$data[2] = get_priority_name ($event['criticity']);
|
switch ($event['estado']) {
|
||||||
$data[3] = $event['count_rep'];
|
case 0:
|
||||||
$data[4] = $event['time2'];
|
$img_st = "images/star.png";
|
||||||
|
$title_st = __('New event');
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$img_st = "images/tick.png";
|
||||||
|
$title_st = __('Event validated');
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$img_st = "images/hourglass.png";
|
||||||
|
$title_st = __('Event in process');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$data[0] = html_print_image ($img_st, true,
|
||||||
|
array ("class" => "image_status",
|
||||||
|
"width" => 16,
|
||||||
|
"title" => $title_st,
|
||||||
|
"id" => 'status_img_' . $event["id_evento"]));
|
||||||
|
|
||||||
|
$data[1] = io_safe_output($event['evento']);
|
||||||
|
$data[2] = $event['event_type'];
|
||||||
|
$data[3] = get_priority_name ($event['criticity']);
|
||||||
|
$data[4] = $event['event_rep'];
|
||||||
|
$data[5] = date($config['date_format'], $event['timestamp_rep']);
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($html) {
|
if ($html) {
|
||||||
return html_print_table ($table, $return);
|
return html_print_table ($table, $return) . $note;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return $table;
|
return $table;
|
||||||
|
@ -3802,6 +3853,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
$filter_event_no_validated);
|
$filter_event_no_validated);
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
$table_event_graph->head[0] = __('Events validated by user');
|
$table_event_graph->head[0] = __('Events validated by user');
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
|
@ -3824,14 +3877,18 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
$filter_event_critical,
|
$filter_event_critical,
|
||||||
$filter_event_warning,
|
$filter_event_warning,
|
||||||
$filter_event_no_validated);
|
$filter_event_no_validated);
|
||||||
|
|
||||||
|
$colors = get_criticity_pie_colors($data_graph);
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
$table_event_graph->head[0] = __('Events by criticity');
|
$table_event_graph->head[0] = __('Events by criticity');
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
false, $data_graph, 500, 150, __("other"), "",
|
false, $data_graph, 500, 150, __("other"), "",
|
||||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size']);
|
$config['fontpath'], $config['font_size'], 1, false, $colors);
|
||||||
|
|
||||||
$data[0] = html_print_table($table_event_graph, true);
|
$data[0] = html_print_table($table_event_graph, true);
|
||||||
|
|
||||||
|
@ -3850,6 +3907,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
$filter_event_no_validated);
|
$filter_event_no_validated);
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
$table_event_graph->head[0] = __('Amount events validated');
|
$table_event_graph->head[0] = __('Amount events validated');
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
|
@ -4061,6 +4120,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
$filter_event_no_validated);
|
$filter_event_no_validated);
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
$table_event_graph->head[0] = __('Events by agent');
|
$table_event_graph->head[0] = __('Events by agent');
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
|
@ -4086,6 +4147,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
$table_event_graph->head[0] = __('Events validated by user');
|
$table_event_graph->head[0] = __('Events validated by user');
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
false, $data_graph, 500, 150, __("other"), "",
|
false, $data_graph, 500, 150, __("other"), "",
|
||||||
|
@ -4107,14 +4170,18 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
$filter_event_critical,
|
$filter_event_critical,
|
||||||
$filter_event_warning,
|
$filter_event_warning,
|
||||||
$filter_event_no_validated);
|
$filter_event_no_validated);
|
||||||
|
|
||||||
|
$colors = get_criticity_pie_colors($data_graph);
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
$table_event_graph->head[0] = __('Events by criticity');
|
$table_event_graph->head[0] = __('Events by criticity');
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
false, $data_graph, 500, 150, __("other"), "",
|
false, $data_graph, 500, 150, __("other"), "",
|
||||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size']);
|
$config['fontpath'], $config['font_size'], 1, false, $colors);
|
||||||
|
|
||||||
$data[0] = html_print_table($table_event_graph, true);
|
$data[0] = html_print_table($table_event_graph, true);
|
||||||
|
|
||||||
|
@ -4134,6 +4201,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
|
|
||||||
$table_event_graph = null;
|
$table_event_graph = null;
|
||||||
$table_event_graph->head[0] = __('Amount events validated');
|
$table_event_graph->head[0] = __('Amount events validated');
|
||||||
|
$table_event_graph->width = '100%';
|
||||||
|
$table_event_graph->style[0] = 'text-align: center;';
|
||||||
|
|
||||||
$table_event_graph->data[0][0] = pie3d_graph(
|
$table_event_graph->data[0][0] = pie3d_graph(
|
||||||
false, $data_graph, 500, 150, __("other"), "",
|
false, $data_graph, 500, 150, __("other"), "",
|
||||||
|
|
|
@ -395,7 +395,7 @@ function flot_pie_chart ($values, $labels, $width, $height, $water_mark,
|
||||||
}
|
}
|
||||||
|
|
||||||
$return .= "<script type='text/javascript'>";
|
$return .= "<script type='text/javascript'>";
|
||||||
|
|
||||||
$return .= "pandoraFlotPie('$graph_id', '$values', '$labels',
|
$return .= "pandoraFlotPie('$graph_id', '$values', '$labels',
|
||||||
'$series', '$width', $font_size, $water_mark,
|
'$series', '$width', $font_size, $water_mark,
|
||||||
'$separator', '$legend_position', '$height', '$colors')";
|
'$separator', '$legend_position', '$height', '$colors')";
|
||||||
|
|
|
@ -414,10 +414,9 @@ function pch_pie_graph ($graph_type, $data_values, $legend_values, $width,
|
||||||
|
|
||||||
/* Create the pPie object */
|
/* Create the pPie object */
|
||||||
$PieChart = new pPie($myPicture,$MyData);
|
$PieChart = new pPie($myPicture,$MyData);
|
||||||
|
foreach ($legend_values as $key => $value) {
|
||||||
foreach ($data_values as $key => $value) {
|
if (isset($colors[$value])) {
|
||||||
if (isset($colors[$key])) {
|
$PieChart->setSliceColor($key, hex_2_rgb($colors[$value]));
|
||||||
$PieChart->setSliceColor($key, hex_2_rgb($colors[$key]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Description: The default Pandora FMS theme layout
|
||||||
*/
|
*/
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: Nunito, verdana, sans-serif;
|
font-family: verdana, sans-serif;
|
||||||
letter-spacing: 0.03pt;
|
letter-spacing: 0.03pt;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
color: #3F3F3F;
|
color: #3F3F3F;
|
||||||
|
@ -448,7 +448,7 @@ IMG.login_logo {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:focus, input:focus {
|
a:focus, input:focus, button:focus {
|
||||||
utline-width: 0;
|
utline-width: 0;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue