mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
added summation report uncompressed module cehckbox
This commit is contained in:
parent
45c9db2b69
commit
41d8afaeea
@ -427,6 +427,7 @@ switch ($action) {
|
||||
);
|
||||
$idAgentModule = $item['id_agent_module'];
|
||||
$period = $item['period'];
|
||||
$uncompressed_module = $item['uncompressed_module'];
|
||||
break;
|
||||
|
||||
case 'historical_data':
|
||||
@ -2769,6 +2770,23 @@ $class = 'databox filters';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_uncompressed_module" style="" class="datos">
|
||||
<td style="font-weight:bold;">
|
||||
<?php
|
||||
echo __('Uncompress module').ui_print_help_tip(
|
||||
__('Use uncompressed module data.'),
|
||||
true
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<td style="">
|
||||
<?php
|
||||
html_print_checkbox('uncompressed_module', 1, false, false, false, '', false);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -4498,6 +4516,7 @@ function chooseType() {
|
||||
$('#row_select_fields').hide();
|
||||
$("#row_select_fields2").hide();
|
||||
$("#row_select_fields3").hide();
|
||||
$("#row_uncompressed_module").hide();
|
||||
|
||||
// SLA list default state.
|
||||
$("#sla_list").hide();
|
||||
@ -4706,6 +4725,7 @@ function chooseType() {
|
||||
$("#row_module").show();
|
||||
$("#row_period").show();
|
||||
$("#row_historical_db_check").hide();
|
||||
$("#row_uncompressed_module").show();
|
||||
break;
|
||||
|
||||
case 'historical_data':
|
||||
|
@ -1862,6 +1862,11 @@ switch ($action) {
|
||||
$values['id_agent'] = get_parameter('group');
|
||||
}
|
||||
|
||||
if ($values['type'] = 'sumatory') {
|
||||
$values['uncompressed_module'] = get_parameter('uncompressed_module', 0);
|
||||
}
|
||||
|
||||
|
||||
$values['header_definition'] = get_parameter('header');
|
||||
$values['column_separator'] = get_parameter('field');
|
||||
$values['line_separator'] = get_parameter('line');
|
||||
@ -2400,6 +2405,10 @@ switch ($action) {
|
||||
$values['id_agent'] = get_parameter('group');
|
||||
}
|
||||
|
||||
if ($values['type'] = 'sumatory') {
|
||||
$values['uncompressed_module'] = get_parameter('uncompressed_module', 0);
|
||||
}
|
||||
|
||||
$values['header_definition'] = get_parameter('header');
|
||||
$values['column_separator'] = get_parameter('field');
|
||||
$values['line_separator'] = get_parameter('line');
|
||||
|
@ -10654,7 +10654,8 @@ function reporting_get_agentmodule_data_min($id_agent_module, $period=0, $date=0
|
||||
function reporting_get_agentmodule_data_sum(
|
||||
$id_agent_module,
|
||||
$period=0,
|
||||
$date=0
|
||||
$date=0,
|
||||
$uncompressed_module=true
|
||||
) {
|
||||
global $config;
|
||||
|
||||
@ -10680,7 +10681,10 @@ function reporting_get_agentmodule_data_sum(
|
||||
$id_module_type
|
||||
);
|
||||
$module_interval = modules_get_interval($id_agent_module);
|
||||
$uncompressed_module = is_module_uncompressed($module_name);
|
||||
// Check if module must be compressed
|
||||
if (!$uncompressed_module) {
|
||||
$uncompressed_module = is_module_uncompressed($module_name);
|
||||
}
|
||||
|
||||
// Wrong module type
|
||||
if (is_module_data_string($module_name)) {
|
||||
@ -10735,7 +10739,9 @@ function reporting_get_agentmodule_data_sum(
|
||||
break;
|
||||
}
|
||||
|
||||
if (!$module_inc) {
|
||||
if ($uncompressed_module) {
|
||||
$total += $data['datos'];
|
||||
} else if (!$module_inc) {
|
||||
foreach ($data['data'] as $val) {
|
||||
if (is_numeric($val['datos'])) {
|
||||
$partial_total += $val['datos'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user