mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2013-05-23 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.item_editor.php, include/functions_reporting.php: change the title of "avg" for the real "rate". Fixes: #2223 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8197 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9337a2c0eb
commit
99ef7c85ea
@ -1,3 +1,11 @@
|
||||
2013-05-23 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/reporting/reporting_builder.item_editor.php,
|
||||
include/functions_reporting.php: change the title of "avg" for
|
||||
the real "rate".
|
||||
|
||||
Fixes: #2223
|
||||
|
||||
2013-05-23 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/reporting/reporting_builder.item_editor.php: fixed ACL for
|
||||
|
@ -1309,7 +1309,13 @@ function print_General_list($width, $action, $idItem = null) {
|
||||
?>
|
||||
</td>
|
||||
<td><select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px"><option value="0"><?php echo __('Select an Agent first'); ?></option></select></td>
|
||||
<?php $operation = array ('avg'=>'avg','max'=>'max','min'=>'min','sum'=>'sum'); ?>
|
||||
<?php
|
||||
$operation = array(
|
||||
'avg' => __('rate'),
|
||||
'max' => __('max'),
|
||||
'min' => __('min'),
|
||||
'sum' => __('sum'));
|
||||
?>
|
||||
<td><?php html_print_select ($operation, 'id_operation_module_general', 0, false, '', '', false, false, true, 'width: 200px', false); ?></td>
|
||||
<td style="text-align: center;"><a href="javascript: addGeneralRow();"><?php html_print_image("images/disk.png", false); ?></a></td>
|
||||
</tr>
|
||||
|
@ -4483,17 +4483,25 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
|
||||
switch ($row['operation']) {
|
||||
case 'sum':
|
||||
$data_res[$key] = reporting_get_agentmodule_data_sum ($row['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
$data_res[$key] =
|
||||
reporting_get_agentmodule_data_sum(
|
||||
$row['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
break;
|
||||
case 'max':
|
||||
$data_res[$key] = reporting_get_agentmodule_data_max ($row['id_agent_module'], $content['period']);
|
||||
$data_res[$key] =
|
||||
reporting_get_agentmodule_data_max(
|
||||
$row['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'min':
|
||||
$data_res[$key] = reporting_get_agentmodule_data_min ($row['id_agent_module'], $content['period']);
|
||||
$data_res[$key] =
|
||||
reporting_get_agentmodule_data_min(
|
||||
$row['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$data_res[$key] = reporting_get_agentmodule_data_average ($row['id_agent_module'], $content['period']);
|
||||
$data_res[$key] =
|
||||
reporting_get_agentmodule_data_average(
|
||||
$row['id_agent_module'], $content['period']);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4553,7 +4561,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$op = __('Average');
|
||||
$op = __('Rate');
|
||||
break;
|
||||
}
|
||||
$data[2] = $op;
|
||||
@ -5201,34 +5209,47 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
|
||||
$table->style[1] = 'text-align: right';
|
||||
|
||||
$title_exeption = __('Exception');
|
||||
switch ($exception_condition) {
|
||||
case REPORT_EXCEPTION_CONDITION_EVERYTHING:
|
||||
$title_exeption .= ' - '.__('Everything');
|
||||
$title_exeption = __('Exception - Everything');
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_GE:
|
||||
$title_exeption .= ' - '.__('Modules over or equal to').' '.$exception_condition_value;
|
||||
$title_exeption =
|
||||
sprintf(__('Exception - Modules over or equal to %s'),
|
||||
$exception_condition_value);
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_LE:
|
||||
$title_exeption .= ' - '.__('Modules under or equal to').' '.$exception_condition_value;
|
||||
$title_exeption =
|
||||
sprintf(__('Exception - Modules under or equal to %s'),
|
||||
$exception_condition_value);
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_L:
|
||||
$title_exeption .= ' - '.__('Modules under').' '.$exception_condition_value;
|
||||
$title_exeption =
|
||||
sprintf(__('Exception - Modules under %s'),
|
||||
$exception_condition_value);
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_G:
|
||||
$title_exeption .= ' - '.__('Modules over').' '.$exception_condition_value;
|
||||
$title_exeption =
|
||||
sprintf(__('Exception - Modules over %s'),
|
||||
$exception_condition_value);
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_E:
|
||||
$title_exeption .= ' - '.__('Equal to').' '.$exception_condition_value;
|
||||
$title_exeption =
|
||||
sprintf(__('Exception - Equal to'),
|
||||
$exception_condition_value);
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_NE:
|
||||
$title_exeption .= ' - '.__('Not equal to').' '.$exception_condition_value;
|
||||
$title_exeption =
|
||||
sprintf(__('Exception - Not equal to %s'),
|
||||
$exception_condition_value);
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_OK:
|
||||
$title_exeption .= ' - '.__('Modules at normal status');
|
||||
$title_exeption =
|
||||
__('Exception - Modules at normal status');
|
||||
break;
|
||||
case REPORT_EXCEPTION_CONDITION_NOT_OK:
|
||||
$title_exeption .= ' - '.__('Modules at critical or warning status');
|
||||
$title_exeption =
|
||||
__('Exception - Modules at critical or warning status');
|
||||
break;
|
||||
}
|
||||
|
||||
@ -5242,7 +5263,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
array_push ($table->data, $data_desc);
|
||||
}
|
||||
//Get all the related data
|
||||
$sql = sprintf("SELECT id_agent_module, server_name, operation
|
||||
$sql = sprintf("
|
||||
SELECT id_agent_module, server_name, operation
|
||||
FROM treport_content_item
|
||||
WHERE id_report_content = %d", $content['id_rc']);
|
||||
|
||||
@ -5318,7 +5340,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
|
||||
$ag_name = modules_get_agentmodule_agent_name ($exc ['id_agent_module']);
|
||||
$mod_name = modules_get_agentmodule_name ($exc ['id_agent_module']);
|
||||
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $exc ['id_agent_module']);
|
||||
$unit = db_get_value('unit', 'tagente_modulo',
|
||||
'id_agente_modulo', $exc['id_agent_module']);
|
||||
|
||||
switch ($exc['operation']) {
|
||||
case 'avg':
|
||||
@ -5389,8 +5412,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
$agent_name[] = $ag_name;
|
||||
$module_name[] = $mod_name;
|
||||
$units[] = $unit;
|
||||
if ($exc['operation'] == 'avg') {
|
||||
$operation[] = "rate";
|
||||
}
|
||||
else {
|
||||
$operation[] = $exc['operation'];
|
||||
}
|
||||
}
|
||||
//Restore dbconnection
|
||||
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
||||
metaconsole_restore_db();
|
||||
|
Loading…
x
Reference in New Issue
Block a user