Merge branch '528-informes-pdf-no-muestra-titulo-por-defecto-en-los-items-6-open' into 'pandora_6.0'

Show agent - module in pdf reports items / 6 / open - #528

See merge request !272
This commit is contained in:
vgilc 2017-03-17 10:32:23 +01:00
commit 1b02b0b8ed

View File

@ -2353,7 +2353,13 @@ function reporting_historical_data($report, $content) {
$content['name'] = __('Historical data'); $content['name'] = __('Historical data');
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name . " - " . $module_name;
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -2410,7 +2416,13 @@ function reporting_database_serialized($report, $content) {
$content['name'] = __('Database Serialized'); $content['name'] = __('Database Serialized');
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name . " - " . $module_name;
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -3116,13 +3128,13 @@ function reporting_sql_graph($report, $content, $type,
if (empty($content['name'])) { if (empty($content['name'])) {
switch ($type_sql_graph) { switch ($type_sql_graph) {
case 'sql_graph_vbar': case 'sql_graph_vbar':
$return['name'] = __('SQL Graph Vertical Bars'); $content['name'] = __('SQL Graph Vertical Bars');
break; break;
case 'sql_graph_hbar': case 'sql_graph_hbar':
$return['name'] = __('SQL Graph Horizontal Bars'); $content['name'] = __('SQL Graph Horizontal Bars');
break; break;
case 'sql_graph_pie': case 'sql_graph_pie':
$return['name'] = __('SQL Graph Pie'); $content['name'] = __('SQL Graph Pie');
break; break;
} }
} }
@ -3172,7 +3184,13 @@ function reporting_monitor_report($report, $content) {
$content['name'] = __('Monitor Report'); $content['name'] = __('Monitor Report');
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name . " - " . $module_name;
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -3185,11 +3203,6 @@ function reporting_monitor_report($report, $content) {
metaconsole_connect($server); metaconsole_connect($server);
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['agent_name'] = $agent_name; $return['agent_name'] = $agent_name;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
@ -3240,19 +3253,19 @@ function reporting_netflow($report, $content, $type,
if (empty($content['name'])) { if (empty($content['name'])) {
switch ($type_netflow) { switch ($type_netflow) {
case 'netflow_area': case 'netflow_area':
$return['name'] = __('Netflow Area'); $content['name'] = __('Netflow Area');
break; break;
case 'netflow_pie': case 'netflow_pie':
$return['name'] = __('Netflow Pie'); $content['name'] = __('Netflow Pie');
break; break;
case 'netflow_data': case 'netflow_data':
$return['name'] = __('Netflow Data'); $content['name'] = __('Netflow Data');
break; break;
case 'netflow_statistics': case 'netflow_statistics':
$return['name'] = __('Netflow Statistics'); $content['name'] = __('Netflow Statistics');
break; break;
case 'netflow_summary': case 'netflow_summary':
$return['name'] = __('Netflow Summary'); $content['name'] = __('Netflow Summary');
break; break;
} }
} }
@ -3318,7 +3331,13 @@ function reporting_simple_baseline_graph($report, $content,
$content['name'] = __('Simple baseline graph'); $content['name'] = __('Simple baseline graph');
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name . " - " . $module_name;
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -3379,7 +3398,13 @@ function reporting_prediction_date($report, $content) {
$content['name'] = __('Prediction Date'); $content['name'] = __('Prediction Date');
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name . " - " . $module_name;
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -3429,7 +3454,13 @@ function reporting_projection_graph($report, $content,
$content['name'] = __('Projection Graph'); $content['name'] = __('Projection Graph');
} }
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name . " - " . $module_name;
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -3681,7 +3712,7 @@ function reporting_value($report, $content, $type) {
$content['name'] = __('TTO'); $content['name'] = __('TTO');
break; break;
case 'TTRT': case 'TTRT':
$return['type'] = __('TTRT'); $content['name'] = __('TTRT');
break; break;
} }
} }