2014-04-10 Alejandro Gallardo <alejandro.gallardo@artica.es>
* pandoradb.sql, pandoradb.oracle.sql, pandoradb.postgreSQL.sql, extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql, extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql, extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql: Added the column "name"to the table "treport_content". * godmode/reporting/reporting_builder.item_editor.php, godmode/reporting/reporting_builder.php: Now is posible to add a name to the report items. * godmode/reporting/reporting_builder.list_items.php: Now the list shows the name of the item or the description if the name is empty. * operation/reporting/reporting_xml.php, include/functions_reporting.php: Now the XML and common reports show the item name if exists. * extensions/files_repo/files_repo_list.php: Improved the description. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9751 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ff04697d29
commit
40c3a501b9
|
@ -1,3 +1,28 @@
|
|||
2014-04-10 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
||||
|
||||
* pandoradb.sql,
|
||||
pandoradb.oracle.sql,
|
||||
pandoradb.postgreSQL.sql,
|
||||
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
|
||||
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
|
||||
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql:
|
||||
Added the column "name"to the table "treport_content".
|
||||
|
||||
* godmode/reporting/reporting_builder.item_editor.php,
|
||||
godmode/reporting/reporting_builder.php: Now is posible
|
||||
to add a name to the report items.
|
||||
|
||||
* godmode/reporting/reporting_builder.list_items.php: Now
|
||||
the list shows the name of the item or the description if
|
||||
the name is empty.
|
||||
|
||||
* operation/reporting/reporting_xml.php,
|
||||
include/functions_reporting.php: Now the XML and common
|
||||
reports show the item name if exists.
|
||||
|
||||
* extensions/files_repo/files_repo_list.php: Improved
|
||||
the description.
|
||||
|
||||
2014-04-09 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* godmode/servers/plugin.php
|
||||
|
|
|
@ -65,7 +65,7 @@ if (!empty($files)) {
|
|||
$url = ui_get_full_url("include/get_file.php?file=$file_path&hash=$hash");
|
||||
|
||||
$data[0] = "<a href=\"$url\" target=\"_blank\">" . $file['name'] . "</a>"; // Name
|
||||
$data[1] = $file['description']; // Description
|
||||
$data[1] = ui_print_truncate_text($file['description'], 'description', true, true); // Description
|
||||
$data[2] = ui_format_filesize($file['size']); // Size
|
||||
$data[3] = date('F j, Y - H:m', $file['mtime']); // Last modification
|
||||
|
||||
|
|
|
@ -145,3 +145,5 @@ ALTER TABLE `treport` ADD COLUMN `non_interactive` tinyint(1) UNSIGNED NOT NULL
|
|||
-- ---------------------------------------------------------------------
|
||||
INSERT INTO `trecon_script` VALUES (4,'SNMP L2 Recon','Pandora FMS SNMP Recon Plugin for level 2 network topology discovery.
(c) Artica ST 2014 <info@artica.es>

Usage:

   ./snmp-recon.pl <task_id> <group_id> <create_incident> <custom_field1> <custom_field2> [custom_field3] [custom_field4]

 * custom_field1 = comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)
 * custom_field2 = comma separated list of snmp communities to try.
 * custom_field3 = a router in the network. Optional but recommended.

 * custom_field4 = set to -a to add all network interfaces (by default only interfaces that are up are added).

 Additional information:
When the script is called from a recon task the task_id, group_id and create_incident parameters are automatically filled by the Pandora FMS Server.','/usr/share/pandora_server/util/recon_scripts/snmp-recon.pl');
|
||||
|
||||
/* 2014/04/10 */
|
||||
ALTER TABLE `treport_content` ADD COLUMN `name` varchar(150) NULL;
|
||||
|
|
|
@ -128,3 +128,6 @@ CREATE TABLE talert_snmp_action (
|
|||
-- Table treport
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE treport ADD (non_interactive NUMBER(5, 0) default 0 NOT NULL);
|
||||
|
||||
/* 2014/04/10 */
|
||||
ALTER TABLE treport_content ADD (name VARCHAR2(150) default NULL);
|
||||
|
|
|
@ -101,3 +101,6 @@ CREATE TABLE "talert_snmp_action" (
|
|||
-- Table treport
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE "treport" ADD COLUMN "non_interactive" SMALLINT DEFAULT 0;
|
||||
|
||||
/* 2014/04/10 */
|
||||
ALTER TABLE "treport_content" ADD COLUMN "name" varchar(150) NULL;
|
||||
|
|
|
@ -104,6 +104,7 @@ switch ($action) {
|
|||
case 'new':
|
||||
$actionParameter = 'save';
|
||||
$type = get_parameter('type', 'SLA');
|
||||
$name = '';
|
||||
$description = null;
|
||||
$sql = null;
|
||||
$show_in_two_columns = 0;
|
||||
|
@ -129,6 +130,7 @@ switch ($action) {
|
|||
$action = 'new';
|
||||
|
||||
$type = 'SLA';
|
||||
$name = '';
|
||||
$description = null;
|
||||
$sql = null;
|
||||
$show_in_two_columns = 0;
|
||||
|
@ -157,6 +159,7 @@ switch ($action) {
|
|||
$show_in_two_columns = $style['show_in_two_columns'];
|
||||
$show_in_landscape = $style['show_in_landscape'];
|
||||
$type = $item['type'];
|
||||
$name = $item['name'];
|
||||
|
||||
switch ($type) {
|
||||
case 'avg_value':
|
||||
|
@ -475,6 +478,16 @@ html_print_input_hidden('id_item', $idItem);
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row_name" style="" class="datos">
|
||||
<td style="vertical-align: top;">
|
||||
<?php echo __('Name'); ?>
|
||||
</td>
|
||||
<td style="">
|
||||
<?php
|
||||
html_print_input_text('name', $name, '', 80, 100);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row_netflow_filter" style="" class="datos">
|
||||
<td><?php echo __('Filter');?></td>
|
||||
<td><?php
|
||||
|
|
|
@ -258,7 +258,7 @@ if ($items) {
|
|||
'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report=' . $idReport . $urlFilter . '&pure=' . $config['pure'] . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
}
|
||||
$table->head[4] = __('Period');
|
||||
$table->head[5] = __('Description');
|
||||
$table->head[5] = __('Name') . " / " . __('Description');
|
||||
if (check_acl ($config['id_user'], 0, "RM")) {
|
||||
$table->head[6] = '<span title="' . __('Options') . '">' . __('Op.') . '</span>';
|
||||
}
|
||||
|
@ -369,11 +369,12 @@ foreach ($items as $item) {
|
|||
$row[4] = '-';
|
||||
}
|
||||
|
||||
if ($item['description'] == '') {
|
||||
if ($item['name'] == '' && $item['description'] == '') {
|
||||
$row[5] = '-';
|
||||
}
|
||||
else {
|
||||
$row[5] = ui_print_truncate_text($item['description'], 'description', true, true);
|
||||
$text = empty($item['name']) ? $item['description'] : $item['name'];
|
||||
$row[5] = ui_print_truncate_text($text, 'description', true, true);
|
||||
}
|
||||
|
||||
$row[6] = '';
|
||||
|
|
|
@ -700,6 +700,7 @@ switch ($action) {
|
|||
case 'update':
|
||||
$values = array();
|
||||
$values['id_report'] = $idReport;
|
||||
$values['name'] = (string) get_parameter('name');
|
||||
$values['description'] = get_parameter('description');
|
||||
$values['type'] = get_parameter('type', null);
|
||||
// Added support for projection graphs, prediction date and SLA reports
|
||||
|
@ -904,6 +905,7 @@ switch ($action) {
|
|||
$values = array();
|
||||
$values['id_report'] = $idReport;
|
||||
$values['type'] = get_parameter('type', null);
|
||||
$values['name'] = (string) get_parameter('name');
|
||||
$values['description'] = get_parameter('description');
|
||||
// Support for projection graph, prediction date and SLA reports
|
||||
// 'top_n_value', 'top_n' and 'text' fields will be reused for these types of report
|
||||
|
@ -1484,10 +1486,6 @@ if ($enterpriseEnable) {
|
|||
$resultOperationDB = $result;
|
||||
}
|
||||
}
|
||||
|
||||
$buttons = array(
|
||||
|
||||
);
|
||||
|
||||
$buttons = array(
|
||||
'list_reports' => array('active' => false,
|
||||
|
|
|
@ -3018,12 +3018,16 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
else {
|
||||
$agent_name = agents_get_name($content['id_agent']);
|
||||
}
|
||||
|
||||
|
||||
$item_title = $content['name'];
|
||||
|
||||
switch ($content["type"]) {
|
||||
case 1:
|
||||
case 'simple_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Simple graph'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Simple graph');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3068,7 +3072,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'projection_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Projection graph'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Projection graph');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3122,7 +3129,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'prediction_date':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Prediction date'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Prediction date');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3156,7 +3166,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'simple_baseline_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Simple baseline graph'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Simple baseline graph');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3198,7 +3211,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 'automatic_custom_graph':
|
||||
$graph = db_get_row ("tgraph", "id_graph", $content['id_gs']);
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table, __('Custom graph'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Custom graph');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($graph['name'], 'item_title', false));
|
||||
|
||||
//RUNNING
|
||||
|
@ -3249,7 +3265,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 3:
|
||||
case 'SLA':
|
||||
reporting_header_content($mini, $content, $report, $table, __('S.L.A.'));
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('S.L.A.');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$edge_interval = 10;
|
||||
|
||||
|
@ -3537,7 +3556,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 6:
|
||||
case 'monitor_report':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Monitor report'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Monitor report');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3575,7 +3597,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 7:
|
||||
case 'avg_value':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Avg. Value'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Avg. Value');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3605,7 +3630,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 8:
|
||||
case 'max_value':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Max. Value'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Max. Value');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> ' . ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3632,7 +3660,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 9:
|
||||
case 'min_value':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Min. Value'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Min. Value');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3663,7 +3694,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 10:
|
||||
case 'sumatory':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Summatory'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Summatory');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> ' . ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -3699,7 +3733,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'agent_detailed_event':
|
||||
case 'event_report_agent':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Agent detailed event'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Agent detailed event');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text(agents_get_name($content['id_agent']), 'agent_medium', false));
|
||||
|
||||
$style = json_decode(io_safe_output($content['style']), true);
|
||||
|
@ -3817,7 +3854,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
}
|
||||
break;
|
||||
case 'text':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Text'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Text');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
"", "");
|
||||
|
||||
$next_row = 1;
|
||||
|
@ -3834,7 +3874,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$table->colspan[$next_row][0] = 3;
|
||||
break;
|
||||
case 'sql':
|
||||
reporting_header_content($mini, $content, $report, $table, __('SQL'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('SQL');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
"", "");
|
||||
|
||||
$next_row = 1;
|
||||
|
@ -3918,7 +3961,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
if ($config['metaconsole'] == 1 && defined('METACONSOLE'))
|
||||
metaconsole_restore_db();
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table, __('User defined graph') . " (".__($content["type"]) .")",
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('User defined graph') . " (".__($content["type"]) .")";
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
"", "");
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
|
@ -3949,11 +3995,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push($table->data, $data);
|
||||
break;
|
||||
case 'event_report_group':
|
||||
reporting_header_content($mini, $content, $report, $table,
|
||||
__('Group detailed event'),
|
||||
ui_print_truncate_text(
|
||||
groups_get_name($content['id_group'], true),
|
||||
60, false));
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Group detailed event');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text(groups_get_name($content['id_group'], true), 60, false));
|
||||
|
||||
$next_row = 1;
|
||||
|
||||
|
@ -4091,7 +4137,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
}
|
||||
break;
|
||||
case 'event_report_module':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Module detailed event'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Module detailed event');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> ' . ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -4109,7 +4158,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'alert_report_group':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Alert report group'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Alert report group');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text(
|
||||
groups_get_name($content['id_group'], true),
|
||||
60, false));
|
||||
|
@ -4130,7 +4182,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'alert_report_module':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Alert report module'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Alert report module');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -4148,7 +4203,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'alert_report_agent':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Alert report agent'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Alert report agent');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
|
@ -4165,7 +4223,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'url':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Import text from URL'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Import text from URL');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($content["external_source"], 'description', false));
|
||||
|
||||
$next_row = 1;
|
||||
|
@ -4190,7 +4251,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'database_serialized':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Serialize data'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Serialize data');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
|
@ -4266,7 +4330,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push($table->data, array($cellContent));
|
||||
break;
|
||||
case 'TTRT':
|
||||
reporting_header_content($mini, $content, $report, $table, __('TTRT'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('TTRT');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -4294,7 +4361,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'TTO':
|
||||
reporting_header_content($mini, $content, $report, $table, __('TTO'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('TTO');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -4323,7 +4393,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'MTBF':
|
||||
reporting_header_content($mini, $content, $report, $table, __('MTBF'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('MTBF');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -4351,7 +4424,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'MTTR':
|
||||
reporting_header_content($mini, $content, $report, $table, __('MTTR'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('MTTR');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
|
@ -4388,8 +4464,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$events = array();
|
||||
}
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table,
|
||||
__('Group report').': "'.$group_name.'"');
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Group report').': "'.$group_name.'"';
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$table->colspan[1][0] = 3;
|
||||
|
||||
|
@ -4479,8 +4557,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
break;
|
||||
case 'general':
|
||||
reporting_header_content($mini, $content, $report, $table,
|
||||
__('General'));
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('General');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$group_by_agent = $content['group_by_agent'];
|
||||
$order_uptodown = $content['order_uptodown'];
|
||||
|
@ -5006,8 +5086,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
}
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table,
|
||||
'Top '.$content['top_n_value'] . '<br>' . $type_top_n);
|
||||
if (empty($item_title)) {
|
||||
$item_title = 'Top '.$content['top_n_value'] . '<br>' . $type_top_n;
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$order_uptodown = $content['order_uptodown'];
|
||||
|
||||
|
@ -5372,7 +5454,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
}
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table, $title_exeption);
|
||||
if (empty($item_title)) {
|
||||
$item_title = $title_exeption;
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
|
@ -5701,8 +5786,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
'id_mg', $content['id_module_group']);
|
||||
}
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table,
|
||||
__('Agents/Modules'),
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Agents/Modules');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title,
|
||||
$group_name . ' - ' . $module_group_name);
|
||||
|
||||
$id_group = $content['id_group'];
|
||||
|
@ -5895,7 +5982,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'inventory':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Inventory'));
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Inventory');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$es = json_decode($content['external_source'], true);
|
||||
|
||||
|
@ -5926,7 +6016,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
break;
|
||||
case 'inventory_changes':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Inventory changes'));
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Inventory changes');
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$es = json_decode($content['external_source'], true);
|
||||
|
||||
|
@ -5957,7 +6050,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'agent_configuration':
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table, __('Agent configuration: ').$agent_name);
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Agent configuration: ').$agent_name;
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$agent_name = agents_get_name ($content['id_agent']);
|
||||
$modules = agents_get_modules ($content['id_agent']);
|
||||
|
@ -6089,7 +6185,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'group_configuration':
|
||||
$group_name = groups_get_name($content['id_group']);
|
||||
reporting_header_content($mini, $content, $report, $table, __('Group configuration: ').$group_name);
|
||||
if (empty($item_title)) {
|
||||
$item_title = __('Group configuration: ').$group_name;
|
||||
}
|
||||
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||
|
||||
$sql = "SELECT * FROM tagente WHERE id_grupo=".$content['id_group'];
|
||||
$agents_list = db_get_all_rows_sql($sql);
|
||||
|
@ -6272,9 +6371,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
if ($description == '') {
|
||||
$description = $filter['id_name'];
|
||||
}
|
||||
|
||||
if (empty($item_title)) {
|
||||
$item_title = $description;
|
||||
}
|
||||
|
||||
$table->colspan[0][0] = 4;
|
||||
$table->data[0][0] = '<h4>' . $description . '</h4>';
|
||||
$table->data[0][0] = '<h4>' . $item_title . '</h4>';
|
||||
$table->colspan[1][0] = 4;
|
||||
$table->data[1][0] = netflow_draw_item ($start_date, $end_date, $resolution, $type, $filter, $max_aggregates, $server_name, 'HTML');
|
||||
break;
|
||||
|
|
|
@ -210,6 +210,9 @@ foreach ($contents as $content) {
|
|||
$data["period"] = human_time_description_raw ($content['period']);
|
||||
$data["uperiod"] = $content['period'];
|
||||
$data["type"] = $content["type"];
|
||||
if (isset($content['name']) && !empty($content['name'])) {
|
||||
$data["name"] = io_safe_output_xml($content["name"]);
|
||||
}
|
||||
|
||||
// Support for metaconsole
|
||||
$server_name = $content ['server_name'];
|
||||
|
|
|
@ -1115,7 +1115,8 @@ CREATE TABLE treport_content (
|
|||
id_agent_module NUMBER(19, 0) default NULL,
|
||||
type VARCHAR2(30) default 'simple_graph',
|
||||
period NUMBER(19, 0) default 0 NOT NULL,
|
||||
"order" NUMBER(19, 0) default 0 NOT NULL,
|
||||
order NUMBER(19, 0) default 0 NOT NULL,
|
||||
name VARCHAR2(150) default NULL,
|
||||
description CLOB,
|
||||
id_agent NUMBER(19, 0) default 0 NOT NULL,
|
||||
text CLOB default NULL,
|
||||
|
|
|
@ -984,6 +984,7 @@ CREATE TABLE "treport_content" (
|
|||
"type" varchar(30) default 'simple_graph',
|
||||
"period" BIGINT NOT NULL default 0,
|
||||
"order" BIGINT NOT NULL default 0,
|
||||
"name" varchar(150) NULL,
|
||||
"description" TEXT,
|
||||
"id_agent" BIGINT NOT NULL default 0,
|
||||
"text" TEXT default NULL,
|
||||
|
|
|
@ -1062,6 +1062,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
|
|||
`type` varchar(30) default 'simple_graph',
|
||||
`period` int(11) NOT NULL default 0,
|
||||
`order` int (11) NOT NULL default 0,
|
||||
`name` varchar(150) NULL,
|
||||
`description` mediumtext,
|
||||
`id_agent` int(10) unsigned NOT NULL default 0,
|
||||
`text` TEXT,
|
||||
|
|
Loading…
Reference in New Issue