2011-02-09 Javier Lanz <javier.lanz@artica.es>
* 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
This commit is contained in:
parent
7160564d65
commit
e4217ce9d8
|
@ -1,3 +1,16 @@
|
|||
2011-02-09 Javier Lanz <javier.lanz@artica.es>
|
||||
|
||||
* 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 <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_html.php: Image path in function print_image is now
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
|||
<td style="vertical-align: top;"><?php echo __('Period'); ?></td>
|
||||
<td style=""><?php print_extended_select_for_time ($intervals, 'period', $period, '', '', '0', 10); echo __(" seconds."); ?></td>
|
||||
</tr>
|
||||
<tr id="row_only_display_wrong" style="" class="datos">
|
||||
<td><?php echo __('Only display wrong SLAs');?></td>
|
||||
<td><?php print_checkbox('checkbox_only_display_wrong', 1, $only_display_wrong);?></td>
|
||||
</tr>
|
||||
<tr id="row_working_time">
|
||||
<td style="vertical-align: top;"><?php echo __('Working time');?></td>
|
||||
<td>
|
||||
|
@ -351,6 +355,10 @@ print_input_hidden('id_item', $idItem);
|
|||
<td style="vertical-align: top;"><?php echo __('Line separator'); ?></td>
|
||||
<td style=""><?php print_input_text('line', $line, '', 2, 4); ?></td>
|
||||
</tr>
|
||||
<tr id="row_quantity" style="" class="datos">
|
||||
<td style="vertical-align: top;"><?php echo __('Quantity (n)'); ?></td>
|
||||
<td style=""><?php print_input_text('quantity', $quantity, '', 2, 4); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
|
@ -593,6 +601,7 @@ function chooseType() {
|
|||
$("#row_custom_example").css('display', 'none');
|
||||
$("#row_group").css('display', 'none');
|
||||
$("#row_working_time").css('display', 'none');
|
||||
$("#row_only_display_wrong").css('display', 'none');
|
||||
|
||||
switch (type) {
|
||||
case 'event_report_group':
|
||||
|
@ -617,6 +626,7 @@ function chooseType() {
|
|||
$("#row_period").css('display', '');
|
||||
$("#sla_list").css('display', '');
|
||||
$("#row_working_time").css('display', '');
|
||||
$("#row_only_display_wrong").css('display', '');
|
||||
break;
|
||||
case 'monitor_report':
|
||||
$("#row_description").css('display', '');
|
||||
|
|
|
@ -171,6 +171,7 @@ switch ($action) {
|
|||
$values['text'] = get_parameter('text');
|
||||
$values['id_agent_module'] = get_parameter('id_agent_module');
|
||||
$values['type'] = get_parameter('type', null);
|
||||
$values['only_display_wrong'] = get_parameter('checkbox_only_display_wrong');
|
||||
$values['monday'] = get_parameter('monday', 0);
|
||||
$values['tuesday'] = get_parameter('tuesday', 0);
|
||||
$values['wednesday'] = get_parameter('wednesday', 0);
|
||||
|
@ -210,6 +211,7 @@ switch ($action) {
|
|||
$values['id_gs'] = get_parameter('id_custom_graph');
|
||||
$values['text'] = get_parameter('text');
|
||||
$values['id_agent_module'] = get_parameter('id_agent_module');
|
||||
$values['only_display_wrong'] = get_parameter('checkbox_only_display_wrong');
|
||||
$values['monday'] = get_parameter('monday', 0);
|
||||
$values['tuesday'] = get_parameter('tuesday', 0);
|
||||
$values['wednesday'] = get_parameter('wednesday', 0);
|
||||
|
|
|
@ -1758,6 +1758,13 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
|
|||
|
||||
$sla_failed = false;
|
||||
foreach ($slas as $sla) {
|
||||
//Get the sla_value in % and store it on $sla_value
|
||||
$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']);
|
||||
//Do not show right modules if 'only_display_wrong' is active
|
||||
if ($content['only_display_wrong'] == 1 && $sla_value >= $sla['sla_limit']) continue;
|
||||
|
||||
$data = array ();
|
||||
|
||||
$data[0] = '<strong>'.__('Agent')."</strong> : ";
|
||||
|
@ -1770,8 +1777,7 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
|
|||
$data[0] .= $sla['sla_min']."<br />";
|
||||
$data[0] .= '<strong>'.__('SLA Limit')."</strong> : ";
|
||||
$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] = '<span style="font: bold '.$sizem.'em Arial, Sans-serif; color: #0000FF;">';
|
||||
$data[1] .= __('Unknown');
|
||||
|
|
|
@ -297,7 +297,7 @@ foreach ($agents as $agent) {
|
|||
$data[0] .= '</a> ';
|
||||
}
|
||||
|
||||
$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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue