Merge branch '1338-Graficas_TIP_en_informes_open' into 'develop'
add tip reports simple graph See merge request !845
This commit is contained in:
commit
07ba50e499
|
@ -94,6 +94,7 @@ $inventory_modules = array();
|
|||
$date = null;
|
||||
// Only avg is selected by default for the simple graphs
|
||||
$only_avg = true;
|
||||
$fullscale = false;
|
||||
$percentil = false;
|
||||
$time_compare_overlapped = false;
|
||||
|
||||
|
@ -212,6 +213,7 @@ switch ($action) {
|
|||
break;
|
||||
case 'simple_graph':
|
||||
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
|
||||
$fullscale = isset($style['fullscale']) ? (bool) $style['fullscale'] : 0;
|
||||
$percentil = isset($style['percentil']) ? $config['percentil'] : 0;
|
||||
// The break hasn't be forgotten.
|
||||
case 'simple_baseline_graph':
|
||||
|
@ -1353,6 +1355,10 @@ You can of course remove the warnings, that's why we include the source and do n
|
|||
<td style="font-weight:bold;"><?php echo __('Only average');?></td>
|
||||
<td><?php html_print_checkbox('only_avg', 1, $only_avg);?></td>
|
||||
</tr>
|
||||
<tr id="row_fullscale" style="" class="datos">
|
||||
<td style="font-weight:bold;"><?php echo __('Full resolution graph (TIP)');?></td>
|
||||
<td><?php html_print_checkbox('fullscale', 1, $fullscale);?></td>
|
||||
</tr>
|
||||
<tr id="row_percentil" style="" class="datos">
|
||||
<td style="font-weight:bold;"><?php echo __('Percentil');?></td>
|
||||
<td><?php html_print_checkbox('percentil', 1, $percentil);?></td>
|
||||
|
@ -2643,6 +2649,7 @@ function chooseType() {
|
|||
$("#row_show_graph").hide();
|
||||
$("#row_max_min_avg").hide();
|
||||
$("#row_only_avg").hide();
|
||||
$("#row_fullscale").hide();
|
||||
$("#row_time_compare_overlapped").hide();
|
||||
$("#row_quantity").hide();
|
||||
$("#row_exception_condition_value").hide();
|
||||
|
@ -2725,6 +2732,7 @@ function chooseType() {
|
|||
case 'simple_graph':
|
||||
$("#row_time_compare_overlapped").show();
|
||||
$("#row_only_avg").show();
|
||||
$("#row_fullscale").show();
|
||||
if ($("#checkbox-percentil").prop("checked"))
|
||||
$("#row_percentil").show();
|
||||
// The break hasn't be forgotten, this element
|
||||
|
|
|
@ -1172,8 +1172,9 @@ switch ($action) {
|
|||
case 'simple_graph':
|
||||
// Warning. We are using this column to hold this value to avoid
|
||||
// the modification of the database for compatibility reasons.
|
||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
||||
$style['percentil'] = (int) get_parameter('percentil');
|
||||
$style['fullscale'] = (int) get_parameter('fullscale');
|
||||
if ($label != '')
|
||||
$style['label'] = $label;
|
||||
else
|
||||
|
@ -1516,8 +1517,9 @@ switch ($action) {
|
|||
case 'simple_graph':
|
||||
// Warning. We are using this column to hold this value to avoid
|
||||
// the modification of the database for compatibility reasons.
|
||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
||||
$style['percentil'] = (int) get_parameter('percentil');
|
||||
$style['fullscale'] = (int) get_parameter('fullscale');
|
||||
if ($label != '')
|
||||
$style['label'] = $label;
|
||||
else
|
||||
|
|
|
@ -6034,13 +6034,15 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||
if (isset($content['style']['only_avg'])) {
|
||||
$only_avg = (bool) $content['style']['only_avg'];
|
||||
}
|
||||
|
||||
if (isset($content['style']['fullscale'])) {
|
||||
$fullscale = (bool) $content['style']['fullscale'];
|
||||
}
|
||||
|
||||
$moduletype_name = modules_get_moduletype_name(
|
||||
modules_get_agentmodule_type(
|
||||
$content['id_agent_module']));
|
||||
|
||||
|
||||
|
||||
$return['chart'] = '';
|
||||
// Get chart
|
||||
reporting_set_conf_charts($width, $height, $only_image, $type,
|
||||
|
@ -6114,7 +6116,8 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||
($content['style']['percentil'] == 1) ? $config['percentil'] : null,
|
||||
false,
|
||||
false,
|
||||
$config['type_module_charts']);
|
||||
$config['type_module_charts'],
|
||||
$fullscale);
|
||||
}
|
||||
break;
|
||||
case 'data':
|
||||
|
|
Loading…
Reference in New Issue