From e4217ce9d8ed0a8da25909fa7be1c51899a26dac Mon Sep 17 00:00:00 2001 From: javilanz Date: Wed, 9 Feb 2011 12:57:00 +0000 Subject: [PATCH] 2011-02-09 Javier Lanz * include/functions_reportings.php: Added functionality to show only wrong modules * pandoradb.sql: Added column 'only_display_wrong" to treports_content * operation/agentes/estado_agente.php: Truncated agent name to 25 chars * extras/pandoradb_migrate_v3.2_to_v4.0.sql: Added column 'only_display_wrong" to treports_content * godmode/reporting/reporting_builder.php: Added functionality to show only wrong modules * godmode/reporting/reporting_builder.item_editor.php: Added functionality to show only wrong modules git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3814 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 13 +++++++++++++ .../extras/pandoradb_migrate_v3.2_to_v4.0.sql | 5 +++++ .../reporting/reporting_builder.item_editor.php | 14 ++++++++++++-- .../godmode/reporting/reporting_builder.php | 2 ++ pandora_console/include/functions_reporting.php | 10 ++++++++-- .../operation/agentes/estado_agente.php | 2 +- pandora_console/pandoradb.sql | 3 ++- 7 files changed, 43 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6a30a36923..2c071c2d3f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,16 @@ +2011-02-09 Javier Lanz + + * include/functions_reportings.php: Added functionality to show only + wrong modules + * pandoradb.sql: Added column 'only_display_wrong" to treports_content + * operation/agentes/estado_agente.php: Truncated agent name to 25 chars + * extras/pandoradb_migrate_v3.2_to_v4.0.sql: Added column + 'only_display_wrong" to treports_content + * godmode/reporting/reporting_builder.php: Added functionality to show + only wrong modules + * godmode/reporting/reporting_builder.item_editor.php: Added functionality + to show only wrong modules + 2011-02-08 Juan Manuel Ramon * include/functions_html.php: Image path in function print_image is now diff --git a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql index e7a9fda852..84b491cb99 100644 --- a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql +++ b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql @@ -27,3 +27,8 @@ ALTER TABLE `tgrupo` MODIFY `nombre` text; -- Table `tnetwork_component` -- ----------------------------------------------------- ALTER TABLE `tnetwork_component` ADD COLUMN `post_process` double(18,13) default 0; + +-- ----------------------------------------------------- +-- Table `treport_content` +-- ----------------------------------------------------- +ALTER TABLE treport_content ADD only_display_wrong tinyint(1) unsigned DEFAULT 0 NOT NULL; diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 7b6dd8c2c8..ea755c4d1c 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -39,7 +39,7 @@ switch ($action) { $description = null; $sql = null; $group = null; - + $only_display_wrong = 0; $monday = true; $tuesday = true; $wednesday = true; @@ -77,7 +77,7 @@ switch ($action) { case 'SLA': $description = $item['description']; $period = $item['period']; - + $only_display_wrong = $item['only_display_wrong']; $monday = $item['monday']; $tuesday = $item['tuesday']; $wednesday = $item['wednesday']; @@ -254,6 +254,10 @@ print_input_hidden('id_item', $idItem); + + + + @@ -351,6 +355,10 @@ print_input_hidden('id_item', $idItem); + + + + = $sla['sla_limit']) continue; + $data = array (); $data[0] = ''.__('Agent')." : "; @@ -1770,8 +1777,7 @@ function render_report_html_item ($content, $table, $report, $mini = false) { $data[0] .= $sla['sla_min']."
"; $data[0] .= ''.__('SLA Limit')." : "; $data[0] .= $sla['sla_limit']; - $sla_value = get_agentmodule_sla ($sla['id_agent_module'], $content['period'], - $sla['sla_min'], $sla['sla_max'], $report["datetime"], $content, $content['time_from'], $content['time_to']); + if ($sla_value === false) { $data[1] = ''; $data[1] .= __('Unknown'); diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 643eefd85d..6ce6d52d47 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -297,7 +297,7 @@ foreach ($agents as $agent) { $data[0] .= ' '; } - $data[0] .= print_agent_name($agent["id_agente"], true, 0, 'none', true); + $data[0] .= print_agent_name($agent["id_agente"], true, 25, 'none', true); $data[1] = print_os_icon ($agent["id_os"], false, true); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 31698f48ba..187d2ee587 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1,6 +1,6 @@ -- Pandora FMS - the Flexible Monitoring System -- ============================================ --- Copyright (c) 2005-2010 Artica Soluciones Tecnológicas, http://www.artica.es +-- Copyright (c) 2005-2011 Artica Soluciones Tecnológicas, http://www.artica.es -- Please see http://pandora.sourceforge.net for full contribution list -- This program is free software; you can redistribute it and/or @@ -809,6 +809,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` ( `friday` tinyint(1) default 1, `saturday` tinyint(1) default 1, `sunday` tinyint(1) default 1, + `only_display_wrong` tinyint (1) unsigned default 0 not null, PRIMARY KEY(`id_rc`), FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`) ON UPDATE CASCADE ON DELETE CASCADE