mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge branch '1827-Graficas_TIP_eje_x_no_mantiene_ratio' into 'develop'
1827 graficas tip eje x no mantiene ratio See merge request artica/pandorafms!1534
This commit is contained in:
commit
0e199a377e
@ -41,16 +41,9 @@ if (is_ajax()){
|
|||||||
$id_agent = get_parameter('id_agent');
|
$id_agent = get_parameter('id_agent');
|
||||||
$id_agent_module = get_parameter('id_agent_module');
|
$id_agent_module = get_parameter('id_agent_module');
|
||||||
$time_lapse = get_parameter('time_lapse');
|
$time_lapse = get_parameter('time_lapse');
|
||||||
$only_avg = get_parameter('only_avg');
|
|
||||||
$simple_type_graph = get_parameter('simple_type_graph');
|
$simple_type_graph = get_parameter('simple_type_graph');
|
||||||
$fullscale = get_parameter('fullscale');
|
$fullscale = get_parameter('fullscale');
|
||||||
|
|
||||||
if($only_avg != 'false'){
|
|
||||||
$only_avg = 1;
|
|
||||||
} else{
|
|
||||||
$only_avg = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($fullscale != 'false'){
|
if($fullscale != 'false'){
|
||||||
$fullscale = 1;
|
$fullscale = 1;
|
||||||
}
|
}
|
||||||
@ -64,7 +57,6 @@ if (is_ajax()){
|
|||||||
'id_agent' => $id_agent,
|
'id_agent' => $id_agent,
|
||||||
'id_agent_module' => $id_agent_module,
|
'id_agent_module' => $id_agent_module,
|
||||||
'time_lapse' => $time_lapse,
|
'time_lapse' => $time_lapse,
|
||||||
'only_average' => $only_avg,
|
|
||||||
'type_graph' => $simple_type_graph,
|
'type_graph' => $simple_type_graph,
|
||||||
'fullscale' => $fullscale);
|
'fullscale' => $fullscale);
|
||||||
|
|
||||||
@ -72,7 +64,7 @@ if (is_ajax()){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($add_custom) {
|
if($add_custom) {
|
||||||
$time_lapse = get_parameter('time_lapse');
|
$time_lapse = get_parameter('time_lapse');
|
||||||
$id_custom = get_parameter('id_custom');
|
$id_custom = get_parameter('id_custom');
|
||||||
$fullscale = get_parameter('fullscale');
|
$fullscale = get_parameter('fullscale');
|
||||||
@ -93,7 +85,7 @@ if (is_ajax()){
|
|||||||
|
|
||||||
$id_item = db_process_sql_insert('tcontainer_item', $values);
|
$id_item = db_process_sql_insert('tcontainer_item', $values);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($add_dynamic) {
|
if($add_dynamic) {
|
||||||
$time_lapse = get_parameter('time_lapse');
|
$time_lapse = get_parameter('time_lapse');
|
||||||
@ -102,14 +94,9 @@ if (is_ajax()){
|
|||||||
$agent_alias = get_parameter('agent_alias','');
|
$agent_alias = get_parameter('agent_alias','');
|
||||||
$module_name = get_parameter('module_name','');
|
$module_name = get_parameter('module_name','');
|
||||||
$tag = get_parameter('tag',0);
|
$tag = get_parameter('tag',0);
|
||||||
$only_avg = get_parameter('only_avg');
|
|
||||||
$simple_type_graph2 = get_parameter('simple_type_graph2');
|
$simple_type_graph2 = get_parameter('simple_type_graph2');
|
||||||
$fullscale = get_parameter('fullscale');
|
$fullscale = get_parameter('fullscale');
|
||||||
if($only_avg != 'false') {
|
|
||||||
$only_avg = 1;
|
|
||||||
} else {
|
|
||||||
$only_avg = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($fullscale != 'false'){
|
if($fullscale != 'false'){
|
||||||
$fullscale = 1;
|
$fullscale = 1;
|
||||||
@ -127,9 +114,9 @@ if (is_ajax()){
|
|||||||
'agent' => $agent_alias,
|
'agent' => $agent_alias,
|
||||||
'module' => $module_name,
|
'module' => $module_name,
|
||||||
'id_tag' => $tag,
|
'id_tag' => $tag,
|
||||||
'only_average' => $only_avg,
|
|
||||||
'type_graph' => $simple_type_graph2,
|
'type_graph' => $simple_type_graph2,
|
||||||
'fullscale' => $fullscale);
|
'fullscale' => $fullscale
|
||||||
|
);
|
||||||
|
|
||||||
$id_item = db_process_sql_insert('tcontainer_item', $values);
|
$id_item = db_process_sql_insert('tcontainer_item', $values);
|
||||||
return;
|
return;
|
||||||
@ -357,16 +344,7 @@ if($edit_container){
|
|||||||
$single_table .= "</td>";
|
$single_table .= "</td>";
|
||||||
$single_table .= "</tr>";
|
$single_table .= "</tr>";
|
||||||
|
|
||||||
$single_table .= "<tr id='row_only_avg' style='' class='datos'>";
|
$single_table .= "<tr id='row_type_graphs' style='' class='datos'>";
|
||||||
$single_table .= "<td style='font-weight:bold;'>";
|
|
||||||
$single_table .= __('Only average');
|
|
||||||
$single_table .= "</td>";
|
|
||||||
$single_table .= "<td>";
|
|
||||||
$single_table .= html_print_checkbox('only_avg', 1, true,true);
|
|
||||||
$single_table .= "</td>";
|
|
||||||
$single_table .= "</tr>";
|
|
||||||
|
|
||||||
$single_table .= "<tr id='row_only_avg' style='' class='datos'>";
|
|
||||||
$single_table .= "<td style='font-weight:bold;'>";
|
$single_table .= "<td style='font-weight:bold;'>";
|
||||||
$single_table .= __('Type of graph');
|
$single_table .= __('Type of graph');
|
||||||
$single_table .= "</td>";
|
$single_table .= "</td>";
|
||||||
@ -514,12 +492,6 @@ if($edit_container){
|
|||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
$data = array();
|
|
||||||
$data[0] = __('Only average');
|
|
||||||
$data[1] = html_print_checkbox('only_avg_2', 1, false,true);
|
|
||||||
$table->data[] = $data;
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Show full scale graph (TIP)') .
|
$data[0] = __('Show full scale graph (TIP)') .
|
||||||
ui_print_help_tip('This option may cause performance issues', true);
|
ui_print_help_tip('This option may cause performance issues', true);
|
||||||
@ -637,20 +609,18 @@ echo html_print_input_hidden('id_agent', 0);
|
|||||||
var id_agent = $("#hidden-id_agent").attr('value');
|
var id_agent = $("#hidden-id_agent").attr('value');
|
||||||
var time_lapse = $("#hidden-period_single").attr('value');
|
var time_lapse = $("#hidden-period_single").attr('value');
|
||||||
var simple_type_graph = $("#simple_type_graph option:selected").attr('value');
|
var simple_type_graph = $("#simple_type_graph option:selected").attr('value');
|
||||||
var only_avg = $("#checkbox-only_avg").prop("checked");
|
|
||||||
var fullscale = $("#checkbox-fullscale").prop("checked");
|
var fullscale = $("#checkbox-fullscale").prop("checked");
|
||||||
var id_container = <?php echo $id_container; ?>;
|
var id_container = <?php echo $id_container; ?>;
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post (
|
||||||
|
"ajax.php",
|
||||||
{"page" : "godmode/reporting/create_container",
|
{"page" : "godmode/reporting/create_container",
|
||||||
"add_single" : 1,
|
"add_single" : 1,
|
||||||
"id_agent" : id_agent,
|
"id_agent" : id_agent,
|
||||||
"id_agent_module" : id_agent_module,
|
"id_agent_module" : id_agent_module,
|
||||||
"time_lapse" : time_lapse,
|
"time_lapse" : time_lapse,
|
||||||
"simple_type_graph": simple_type_graph,
|
"simple_type_graph": simple_type_graph,
|
||||||
"only_avg" : only_avg,
|
|
||||||
"fullscale" : fullscale,
|
"fullscale" : fullscale,
|
||||||
"id_container" : id_container,
|
"id_container" : id_container},
|
||||||
},
|
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
var url = location.href.replace('&update_container=1', "");
|
var url = location.href.replace('&update_container=1', "");
|
||||||
url = url.replace('&delete_item=1', "");
|
url = url.replace('&delete_item=1', "");
|
||||||
@ -691,7 +661,7 @@ echo html_print_input_hidden('id_agent', 0);
|
|||||||
var module_group = $("#combo_modulegroup").val();
|
var module_group = $("#combo_modulegroup").val();
|
||||||
var simple_type_graph2 = $("#simple_type_graph2 option:selected").attr('value');
|
var simple_type_graph2 = $("#simple_type_graph2 option:selected").attr('value');
|
||||||
var tag = $("#tag").val();
|
var tag = $("#tag").val();
|
||||||
var only_avg = $("#checkbox-only_avg_2").prop("checked");
|
|
||||||
var id_container = <?php echo $id_container; ?>;
|
var id_container = <?php echo $id_container; ?>;
|
||||||
var fullscale = $("#checkbox-fullscale_3").prop("checked");
|
var fullscale = $("#checkbox-fullscale_3").prop("checked");
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
@ -705,8 +675,7 @@ echo html_print_input_hidden('id_agent', 0);
|
|||||||
"simple_type_graph2": simple_type_graph2,
|
"simple_type_graph2": simple_type_graph2,
|
||||||
"tag" : tag,
|
"tag" : tag,
|
||||||
"id_container" : id_container,
|
"id_container" : id_container,
|
||||||
"only_avg" : only_avg,
|
"fullscale" : fullscale
|
||||||
"fullscale" : fullscale,
|
|
||||||
},
|
},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
var url = location.href.replace('&update_container=1', "");
|
var url = location.href.replace('&update_container=1', "");
|
||||||
|
@ -93,7 +93,6 @@ $id_agents = '';
|
|||||||
$inventory_modules = array();
|
$inventory_modules = array();
|
||||||
$date = null;
|
$date = null;
|
||||||
// Only avg is selected by default for the simple graphs
|
// Only avg is selected by default for the simple graphs
|
||||||
$only_avg = true;
|
|
||||||
$fullscale = false;
|
$fullscale = false;
|
||||||
$percentil = false;
|
$percentil = false;
|
||||||
$time_compare_overlapped = false;
|
$time_compare_overlapped = false;
|
||||||
@ -215,7 +214,6 @@ switch ($action) {
|
|||||||
$log_number = empty($es['log_number']) ? $log_number : $es['log_number'];
|
$log_number = empty($es['log_number']) ? $log_number : $es['log_number'];
|
||||||
break;
|
break;
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
|
|
||||||
$fullscale = isset($style['fullscale']) ? (bool) $style['fullscale'] : 0;
|
$fullscale = isset($style['fullscale']) ? (bool) $style['fullscale'] : 0;
|
||||||
$percentil = isset($style['percentil']) ? $config['percentil'] : 0;
|
$percentil = isset($style['percentil']) ? $config['percentil'] : 0;
|
||||||
// The break hasn't be forgotten.
|
// The break hasn't be forgotten.
|
||||||
@ -1378,19 +1376,17 @@ You can of course remove the warnings, that's why we include the source and do n
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="row_only_avg" style="" class="datos">
|
|
||||||
<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">
|
<tr id="row_fullscale" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Full resolution graph (TIP)').
|
<td style="font-weight:bold;"><?php echo __('Full resolution graph (TIP)').
|
||||||
ui_print_help_tip(__('This option may cause performance issues.'), true);?></td>
|
ui_print_help_tip(__('This option may cause performance issues.'), true);?></td>
|
||||||
<td><?php html_print_checkbox('fullscale', 1, $fullscale);?></td>
|
<td><?php html_print_checkbox('fullscale', 1, $fullscale);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="row_percentil" style="" class="datos">
|
<tr id="row_percentil" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Percentil');?></td>
|
<td style="font-weight:bold;"><?php echo __('Percentil');?></td>
|
||||||
<td><?php html_print_checkbox('percentil', 1, $percentil);?></td>
|
<td><?php html_print_checkbox('percentil', 1, $percentil);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="row_exception_condition_value" style="" class="datos">
|
<tr id="row_exception_condition_value" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Value'); ?></td>
|
<td style="font-weight:bold;"><?php echo __('Value'); ?></td>
|
||||||
<td style="">
|
<td style="">
|
||||||
@ -1400,6 +1396,7 @@ You can of course remove the warnings, that's why we include the source and do n
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="row_exception_condition" style="" class="datos">
|
<tr id="row_exception_condition" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Condition');?></td>
|
<td style="font-weight:bold;"><?php echo __('Condition');?></td>
|
||||||
<td>
|
<td>
|
||||||
@ -2825,7 +2822,6 @@ function chooseType() {
|
|||||||
$("#row_show_address_agent").hide();
|
$("#row_show_address_agent").hide();
|
||||||
$("#row_show_graph").hide();
|
$("#row_show_graph").hide();
|
||||||
$("#row_max_min_avg").hide();
|
$("#row_max_min_avg").hide();
|
||||||
$("#row_only_avg").hide();
|
|
||||||
$("#row_fullscale").hide();
|
$("#row_fullscale").hide();
|
||||||
$("#row_time_compare_overlapped").hide();
|
$("#row_time_compare_overlapped").hide();
|
||||||
$("#row_quantity").hide();
|
$("#row_quantity").hide();
|
||||||
@ -2920,7 +2916,6 @@ function chooseType() {
|
|||||||
|
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
$("#row_time_compare_overlapped").show();
|
$("#row_time_compare_overlapped").show();
|
||||||
// $("#row_only_avg").show();
|
|
||||||
$("#row_fullscale").show();
|
$("#row_fullscale").show();
|
||||||
if ($("#checkbox-percentil").prop("checked"))
|
if ($("#checkbox-percentil").prop("checked"))
|
||||||
$("#row_percentil").show();
|
$("#row_percentil").show();
|
||||||
|
@ -1232,7 +1232,6 @@ switch ($action) {
|
|||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
// Warning. We are using this column to hold this value to avoid
|
// Warning. We are using this column to hold this value to avoid
|
||||||
// the modification of the database for compatibility reasons.
|
// the modification of the database for compatibility reasons.
|
||||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
|
||||||
$style['percentil'] = (int) get_parameter('percentil');
|
$style['percentil'] = (int) get_parameter('percentil');
|
||||||
$style['fullscale'] = (int) get_parameter('fullscale');
|
$style['fullscale'] = (int) get_parameter('fullscale');
|
||||||
if ($label != '')
|
if ($label != '')
|
||||||
@ -1592,7 +1591,6 @@ switch ($action) {
|
|||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
// Warning. We are using this column to hold this value to avoid
|
// Warning. We are using this column to hold this value to avoid
|
||||||
// the modification of the database for compatibility reasons.
|
// the modification of the database for compatibility reasons.
|
||||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
|
||||||
$style['percentil'] = (int) get_parameter('percentil');
|
$style['percentil'] = (int) get_parameter('percentil');
|
||||||
$style['fullscale'] = (int) get_parameter('fullscale');
|
$style['fullscale'] = (int) get_parameter('fullscale');
|
||||||
if ($label != '')
|
if ($label != '')
|
||||||
|
@ -580,15 +580,15 @@ $table_chars->style[0] = 'font-weight: bold;';
|
|||||||
$table_chars->size[0] = '50%';
|
$table_chars->size[0] = '50%';
|
||||||
$table_chars->data = array ();
|
$table_chars->data = array ();
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Graph color (min)');
|
$table_chars->data[$row][0] = __('Graph color #1');
|
||||||
$table_chars->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
|
$table_chars->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Graph color (avg)');
|
$table_chars->data[$row][0] = __('Graph color #2');
|
||||||
$table_chars->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
|
$table_chars->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Graph color (max)');
|
$table_chars->data[$row][0] = __('Graph color #3');
|
||||||
$table_chars->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
|
$table_chars->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
@ -655,15 +655,6 @@ $table_chars->data[$row][1] = __('Yes').' '.html_print_radio_button ('round
|
|||||||
$table_chars->data[$row][1] .= __('No').' '.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
|
$table_chars->data[$row][1] .= __('No').' '.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Interactive charts') .
|
|
||||||
ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
|
|
||||||
$table_chars->data[$row][1] = __('Yes').' ' .
|
|
||||||
html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).' ';
|
|
||||||
$table_chars->data[$row][1] .= __('No').' ' .
|
|
||||||
html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
|
|
||||||
$row++;
|
|
||||||
|
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Type of module charts');
|
$table_chars->data[$row][0] = __('Type of module charts');
|
||||||
$table_chars->data[$row][1] = __('Area').' ' .
|
$table_chars->data[$row][1] = __('Area').' ' .
|
||||||
html_print_radio_button ('type_module_charts', 'area', '',
|
html_print_radio_button ('type_module_charts', 'area', '',
|
||||||
@ -682,14 +673,6 @@ $table_chars->data[$row][1] .= __('Line').' ' .
|
|||||||
$config["type_interface_charts"] != 'area', true);
|
$config["type_interface_charts"] != 'area', true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Show only average');
|
|
||||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Hide Max and Min values in graphs'), true);
|
|
||||||
$table_chars->data[$row][1] = __('Yes').' ' .
|
|
||||||
html_print_radio_button ('only_average', 1, '', $config["only_average"], true).' ';
|
|
||||||
$table_chars->data[$row][1] .= __('No').' ' .
|
|
||||||
html_print_radio_button ('only_average', 0, '', $config["only_average"], true);
|
|
||||||
$row++;
|
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Percentile');
|
$table_chars->data[$row][0] = __('Percentile');
|
||||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Show percentile 95 in graphs'), true);
|
$table_chars->data[$row][0] .= ui_print_help_tip(__('Show percentile 95 in graphs'), true);
|
||||||
$table_chars->data[$row][1] = html_print_input_text ('percentil', $config['percentil'], '', 20, 20, true);
|
$table_chars->data[$row][1] = html_print_input_text ('percentil', $config['percentil'], '', 20, 20, true);
|
||||||
|
@ -88,7 +88,6 @@ if ($print_sparse_graph) {
|
|||||||
'title' => (string) get_parameter('title'),
|
'title' => (string) get_parameter('title'),
|
||||||
'unit_name' => (string) get_parameter('unit_name'),
|
'unit_name' => (string) get_parameter('unit_name'),
|
||||||
'show_alerts' => (bool) get_parameter('show_alerts'),
|
'show_alerts' => (bool) get_parameter('show_alerts'),
|
||||||
'avg_only' => (int) get_parameter('avg_only'),
|
|
||||||
'pure' => (bool) get_parameter('pure'),
|
'pure' => (bool) get_parameter('pure'),
|
||||||
'date' => (int) get_parameter('date', time()),
|
'date' => (int) get_parameter('date', time()),
|
||||||
'unit' => (string) get_parameter('unit'),
|
'unit' => (string) get_parameter('unit'),
|
||||||
@ -177,7 +176,6 @@ if ($get_graphs){
|
|||||||
$params =array(
|
$params =array(
|
||||||
'agent_module_id' => $value['id_agent_module'],
|
'agent_module_id' => $value['id_agent_module'],
|
||||||
'period' => $value['time_lapse'],
|
'period' => $value['time_lapse'],
|
||||||
'avg_only' => $value['only_average'],
|
|
||||||
'homeurl' => ui_get_full_url(false, false, false, false),
|
'homeurl' => ui_get_full_url(false, false, false, false),
|
||||||
'type_graph' => $type_graph,
|
'type_graph' => $type_graph,
|
||||||
'fullscale' => $value['fullscale']
|
'fullscale' => $value['fullscale']
|
||||||
@ -271,7 +269,6 @@ if ($get_graphs){
|
|||||||
$params =array(
|
$params =array(
|
||||||
'agent_module_id' => $value2['id_agente_modulo'],
|
'agent_module_id' => $value2['id_agente_modulo'],
|
||||||
'period' => $value['time_lapse'],
|
'period' => $value['time_lapse'],
|
||||||
'avg_only' => $value['only_average'],
|
|
||||||
'homeurl' => ui_get_full_url(false, false, false, false),
|
'homeurl' => ui_get_full_url(false, false, false, false),
|
||||||
'type_graph' => $type_graph,
|
'type_graph' => $type_graph,
|
||||||
'fullscale' => $value['fullscale']
|
'fullscale' => $value['fullscale']
|
||||||
|
@ -1668,7 +1668,6 @@ class Tree {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (is_metaconsole() && !empty($server)) {
|
if (is_metaconsole() && !empty($server)) {
|
||||||
$graph_params["avg_only"] = 1;
|
|
||||||
// Set the server id
|
// Set the server id
|
||||||
$graph_params["server"] = $module['serverID'];
|
$graph_params["server"] = $module['serverID'];
|
||||||
}
|
}
|
||||||
|
@ -199,8 +199,6 @@ else {
|
|||||||
|
|
||||||
// Save the global values
|
// Save the global values
|
||||||
$config["global_block_size"] = $config["block_size"];
|
$config["global_block_size"] = $config["block_size"];
|
||||||
$config["global_flash_charts"] = $config["flash_charts"];
|
|
||||||
|
|
||||||
|
|
||||||
if (isset ($config['id_user'])) {
|
if (isset ($config['id_user'])) {
|
||||||
config_user_set_custom_config();
|
config_user_set_custom_config();
|
||||||
|
@ -2895,8 +2895,6 @@ function color_graph_array(){
|
|||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
|
|
||||||
//XXX Hablar con Sancho del tema de los slices
|
|
||||||
/*
|
|
||||||
$color_series[1] = array(
|
$color_series[1] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color2'],
|
'color' => $config['graph_color2'],
|
||||||
@ -2907,64 +2905,63 @@ function color_graph_array(){
|
|||||||
'color' => $config['graph_color3'],
|
'color' => $config['graph_color3'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
*/
|
|
||||||
|
|
||||||
$color_series[1] = array(
|
$color_series[3] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color4'],
|
'color' => $config['graph_color4'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[2] = array(
|
$color_series[4] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color5'],
|
'color' => $config['graph_color5'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[3] = array(
|
$color_series[5] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color6'],
|
'color' => $config['graph_color6'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[4] = array(
|
$color_series[6] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color7'],
|
'color' => $config['graph_color7'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[5] = array(
|
$color_series[7] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color8'],
|
'color' => $config['graph_color8'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[6] = array(
|
$color_series[8] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color9'],
|
'color' => $config['graph_color9'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[7] = array(
|
$color_series[9] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $config['graph_color10'],
|
'color' => $config['graph_color10'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[8] = array(
|
$color_series[10] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => COL_GRAPH9,
|
'color' => COL_GRAPH9,
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[9] = array(
|
$color_series[11] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => COL_GRAPH10,
|
'color' => COL_GRAPH10,
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[10] = array(
|
$color_series[12] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => COL_GRAPH11,
|
'color' => COL_GRAPH11,
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[11] = array(
|
$color_series[13] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => COL_GRAPH12,
|
'color' => COL_GRAPH12,
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
$color_series[12] = array(
|
$color_series[14] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => COL_GRAPH13,
|
'color' => COL_GRAPH13,
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
|
@ -7012,7 +7012,6 @@ function api_get_graph_module_data($id, $thrash1, $other, $thrash2) {
|
|||||||
$draw_events = 0;
|
$draw_events = 0;
|
||||||
$zoom = 1;
|
$zoom = 1;
|
||||||
$label = $other['data'][3];
|
$label = $other['data'][3];
|
||||||
$avg_only = 0;
|
|
||||||
$start_date = $other['data'][4];
|
$start_date = $other['data'][4];
|
||||||
$date = strtotime($start_date);
|
$date = strtotime($start_date);
|
||||||
|
|
||||||
|
@ -498,8 +498,6 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Font path');
|
$error_update[] = __('Font path');
|
||||||
if (!config_update_value ('font_size', get_parameter('font_size')))
|
if (!config_update_value ('font_size', get_parameter('font_size')))
|
||||||
$error_update[] = __('Font size');
|
$error_update[] = __('Font size');
|
||||||
if (!config_update_value ('flash_charts', (bool) get_parameter ('flash_charts')))
|
|
||||||
$error_update[] = __('Interactive charts');
|
|
||||||
|
|
||||||
if (!config_update_value ('custom_favicon', (string) get_parameter ('custom_favicon')))
|
if (!config_update_value ('custom_favicon', (string) get_parameter ('custom_favicon')))
|
||||||
$error_update[] = __('Custom favicon');
|
$error_update[] = __('Custom favicon');
|
||||||
@ -610,8 +608,6 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Default type of module charts.');
|
$error_update[] = __('Default type of module charts.');
|
||||||
if (!config_update_value ('type_interface_charts', (string) get_parameter('type_interface_charts', 'line')))
|
if (!config_update_value ('type_interface_charts', (string) get_parameter('type_interface_charts', 'line')))
|
||||||
$error_update[] = __('Default type of interface charts.');
|
$error_update[] = __('Default type of interface charts.');
|
||||||
if (!config_update_value ('only_average', (bool) get_parameter('only_average', false)))
|
|
||||||
$error_update[] = __('Default show only average or min and max');
|
|
||||||
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
|
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
|
||||||
$error_update[] = __('Display data of proc modules in other format');
|
$error_update[] = __('Display data of proc modules in other format');
|
||||||
if (!config_update_value ('render_proc_ok', (string) get_parameter('render_proc_ok', __('Ok') )))
|
if (!config_update_value ('render_proc_ok', (string) get_parameter('render_proc_ok', __('Ok') )))
|
||||||
@ -1176,10 +1172,6 @@ function config_process_config () {
|
|||||||
config_update_value ( 'style', 'pandora');
|
config_update_value ( 'style', 'pandora');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset ($config['flash_charts'])) {
|
|
||||||
config_update_value ( 'flash_charts', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset ($config["login_background"])) {
|
if (!isset ($config["login_background"])) {
|
||||||
config_update_value ('login_background', '');
|
config_update_value ('login_background', '');
|
||||||
}
|
}
|
||||||
@ -2241,9 +2233,6 @@ function config_user_set_custom_config() {
|
|||||||
if (!empty($userinfo["block_size"]) && ($userinfo["block_size"] != 0))
|
if (!empty($userinfo["block_size"]) && ($userinfo["block_size"] != 0))
|
||||||
$config["block_size"] = $userinfo["block_size"];
|
$config["block_size"] = $userinfo["block_size"];
|
||||||
|
|
||||||
if ($userinfo["flash_chart"] != -1)
|
|
||||||
$config["flash_charts"] = $userinfo["flash_chart"];
|
|
||||||
|
|
||||||
// Each user could have it's own timezone)
|
// Each user could have it's own timezone)
|
||||||
if (isset($userinfo["timezone"])) {
|
if (isset($userinfo["timezone"])) {
|
||||||
if ($userinfo["timezone"] != "") {
|
if ($userinfo["timezone"] != "") {
|
||||||
|
@ -2239,7 +2239,6 @@ function events_page_details ($event, $server = "") {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
$graph_params["avg_only"] = 1;
|
|
||||||
// Set the server id
|
// Set the server id
|
||||||
$graph_params["server"] = $server["id"];
|
$graph_params["server"] = $server["id"];
|
||||||
}
|
}
|
||||||
|
@ -234,8 +234,11 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
//XXX add zoom
|
//XXXXX
|
||||||
$data_slice = $date_array['period'] / 250; //zoom
|
//Para evitar mostrar todos los datos a la vez lo cual puede recargar se hace un sistema de cajas que parte de una constante = 250
|
||||||
|
//y el periodo de tiempo seleccionado ademas de poder ir reducciendo el nivel de cajas es decir aumentando el nivel de detalle de la grafica
|
||||||
|
//hasta la opcion full que mostraria todos los puntos(datos) que contiene ese periodo.
|
||||||
|
$data_slice = $date_array['period'] / (250 * $params['zoom']);
|
||||||
|
|
||||||
if( $data_module_graph['id_module_type'] == 23 ||
|
if( $data_module_graph['id_module_type'] == 23 ||
|
||||||
$data_module_graph['id_module_type'] == 3 ||
|
$data_module_graph['id_module_type'] == 3 ||
|
||||||
@ -254,6 +257,20 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
$data_module_graph['history_db']
|
$data_module_graph['history_db']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
//all points(data)
|
||||||
|
if($params['zoom'] == 5){
|
||||||
|
$data = db_get_all_rows_filter (
|
||||||
|
'tagente_datos',
|
||||||
|
array ('id_agente_modulo' => (int)$agent_module_id,
|
||||||
|
"utimestamp > '". $date_array['start_date']. "'",
|
||||||
|
"utimestamp < '". $date_array['final_date'] . "'",
|
||||||
|
'order' => 'utimestamp ASC'),
|
||||||
|
array ('datos', 'utimestamp'),
|
||||||
|
'AND',
|
||||||
|
$data_module_graph['history_db']
|
||||||
|
);
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
$data = db_get_all_rows_filter (
|
$data = db_get_all_rows_filter (
|
||||||
'tagente_datos',
|
'tagente_datos',
|
||||||
@ -262,11 +279,12 @@ function grafico_modulo_sparse_data_chart (
|
|||||||
"utimestamp < '". $date_array['final_date'] . "'",
|
"utimestamp < '". $date_array['final_date'] . "'",
|
||||||
'group' => "ROUND(utimestamp / $data_slice)",
|
'group' => "ROUND(utimestamp / $data_slice)",
|
||||||
'order' => 'utimestamp ASC'),
|
'order' => 'utimestamp ASC'),
|
||||||
array ('max(datos) as datos', 'min(utimestamp) as utimestamp'),
|
array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'),
|
||||||
'AND',
|
'AND',
|
||||||
$data_module_graph['history_db']
|
$data_module_graph['history_db']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($data === false){
|
if($data === false){
|
||||||
$data = array();
|
$data = array();
|
||||||
@ -847,10 +865,13 @@ function grafico_modulo_sparse ($params) {
|
|||||||
$params['graph_combined'] = false;
|
$params['graph_combined'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isset($params['zoom'])){
|
||||||
|
$params['zoom'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
//XXXX Configurable
|
//XXXX Configurable
|
||||||
$params['grid_color'] = '#C1C1C1';
|
$params['grid_color'] = '#C1C1C1';
|
||||||
$params['legend_color'] = '#636363';
|
$params['legend_color'] = '#636363';
|
||||||
|
|
||||||
$params['font'] = $config['fontpath'];
|
$params['font'] = $config['fontpath'];
|
||||||
$params['font-size'] = $config['font_size'];
|
$params['font-size'] = $config['font_size'];
|
||||||
$params['short_data'] = $config['short_module_graph_data'];
|
$params['short_data'] = $config['short_module_graph_data'];
|
||||||
@ -1318,6 +1339,18 @@ function graphic_combined_module (
|
|||||||
return generator_chart_to_pdf('combined', $params, $params_combined, $module_list);
|
return generator_chart_to_pdf('combined', $params, $params_combined, $module_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isset($params['zoom'])){
|
||||||
|
$params['zoom'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//XXXXXXXX
|
||||||
|
//XXXX Configurable
|
||||||
|
$params['grid_color'] = '#C1C1C1';
|
||||||
|
$params['legend_color'] = '#636363';
|
||||||
|
$params['font'] = $config['fontpath'];
|
||||||
|
$params['font-size'] = $config['font_size'];
|
||||||
|
$params['short_data'] = $config['short_module_graph_data'];
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
global $graphic_type;
|
global $graphic_type;
|
||||||
|
|
||||||
|
@ -6447,13 +6447,6 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||||||
$label = reporting_label_macro($content, $label);
|
$label = reporting_label_macro($content, $label);
|
||||||
}
|
}
|
||||||
|
|
||||||
$only_avg = true;
|
|
||||||
// Due to database compatibility problems, the 'only_avg' value
|
|
||||||
// is stored into the json contained into the 'style' column.
|
|
||||||
if (isset($content['style']['only_avg'])) {
|
|
||||||
$only_avg = (bool) $content['style']['only_avg'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($content['style']['fullscale'])) {
|
if (isset($content['style']['fullscale'])) {
|
||||||
$fullscale = (bool) $content['style']['fullscale'];
|
$fullscale = (bool) $content['style']['fullscale'];
|
||||||
}
|
}
|
||||||
@ -6484,7 +6477,6 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||||||
'agent_module_id' => $content['id_agent_module'],
|
'agent_module_id' => $content['id_agent_module'],
|
||||||
'period' => $content['period'],
|
'period' => $content['period'],
|
||||||
'title' => $label,
|
'title' => $label,
|
||||||
'avg_only' => $only_avg,
|
|
||||||
'pure' => false,
|
'pure' => false,
|
||||||
'date' => $report["datetime"],
|
'date' => $report["datetime"],
|
||||||
'only_image' => $only_image,
|
'only_image' => $only_image,
|
||||||
|
@ -902,9 +902,6 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
//XXXXX
|
//XXXXX
|
||||||
var markins_graph = true;
|
var markins_graph = true;
|
||||||
|
|
||||||
var legend_events = null;
|
|
||||||
var legend_alerts = null;
|
|
||||||
|
|
||||||
// If threshold and up are the same, that critical or warning is disabled
|
// If threshold and up are the same, that critical or warning is disabled
|
||||||
if (yellow_threshold == yellow_up){
|
if (yellow_threshold == yellow_up){
|
||||||
yellow_inverse = false;
|
yellow_inverse = false;
|
||||||
@ -923,10 +920,6 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
var red_only_min = ((red_up == 0) && (red_threshold != 0));
|
var red_only_min = ((red_up == 0) && (red_threshold != 0));
|
||||||
|
|
||||||
//color
|
//color
|
||||||
var normalw = '#efe';
|
|
||||||
var warningw = '#ffe';
|
|
||||||
var criticalw = '#fee';
|
|
||||||
var normal = '#0f0';
|
|
||||||
var warning = 'yellow';
|
var warning = 'yellow';
|
||||||
var critical = 'red';
|
var critical = 'red';
|
||||||
|
|
||||||
@ -1629,8 +1622,8 @@ console.log(grid_color);
|
|||||||
autoHighlight: true
|
autoHighlight: true
|
||||||
},
|
},
|
||||||
xaxis: {
|
xaxis: {
|
||||||
min: date_array.start_date * 1000,
|
min: min_x,
|
||||||
max: date_array.final_date * 1000
|
max: max_x
|
||||||
},
|
},
|
||||||
xaxes: [{
|
xaxes: [{
|
||||||
axisLabelUseCanvas: true,
|
axisLabelUseCanvas: true,
|
||||||
@ -2004,7 +1997,7 @@ if (vconsole) {
|
|||||||
.eq(i).css('color', legend_color);
|
.eq(i).css('color', legend_color);
|
||||||
|
|
||||||
$('#legend_' + graph_id + ' .legendLabel')
|
$('#legend_' + graph_id + ' .legendLabel')
|
||||||
.eq(i).css('font-family',font+'Font');
|
.eq(i).css('font-family',font);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ class ModuleGraph {
|
|||||||
private $width = 0;
|
private $width = 0;
|
||||||
private $height = 0;
|
private $height = 0;
|
||||||
private $draw_alerts = 0;
|
private $draw_alerts = 0;
|
||||||
private $avg_only = 0;
|
|
||||||
private $start_date = 0;
|
private $start_date = 0;
|
||||||
private $time_compare_separated = 0;
|
private $time_compare_separated = 0;
|
||||||
private $time_compare_overlapped = 0;
|
private $time_compare_overlapped = 0;
|
||||||
@ -65,7 +64,6 @@ class ModuleGraph {
|
|||||||
}
|
}
|
||||||
$this->draw_events = (int)$system->getRequest('draw_events', 0);
|
$this->draw_events = (int)$system->getRequest('draw_events', 0);
|
||||||
$this->draw_alerts = (int)$system->getRequest('draw_alerts', 0);
|
$this->draw_alerts = (int)$system->getRequest('draw_alerts', 0);
|
||||||
$this->avg_only = (int)$system->getRequest('avg_only', 0);
|
|
||||||
$this->start_date = $system->getRequest('start_date', false);
|
$this->start_date = $system->getRequest('start_date', false);
|
||||||
if ($this->start_date === false) {
|
if ($this->start_date === false) {
|
||||||
$this->start_date = date("Y-m-d");
|
$this->start_date = date("Y-m-d");
|
||||||
@ -144,7 +142,6 @@ class ModuleGraph {
|
|||||||
'width' => $this->width,
|
'width' => $this->width,
|
||||||
'height' => $this->height,
|
'height' => $this->height,
|
||||||
'show_alerts' => $this->draw_alerts,
|
'show_alerts' => $this->draw_alerts,
|
||||||
'avg_only' => $this->avg_only,
|
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
'unit' => $unit,
|
'unit' => $unit,
|
||||||
'baseline' => $this->baseline,
|
'baseline' => $this->baseline,
|
||||||
@ -245,7 +242,6 @@ class ModuleGraph {
|
|||||||
postvars["time_compare_separated"] = ($("input[name = 'time_compare_separated']").is(":checked"))?1:0;
|
postvars["time_compare_separated"] = ($("input[name = 'time_compare_separated']").is(":checked"))?1:0;
|
||||||
postvars["time_compare_overlapped"] = ($("input[name = 'time_compare_overlapped']").is(":checked"))?1:0;
|
postvars["time_compare_overlapped"] = ($("input[name = 'time_compare_overlapped']").is(":checked"))?1:0;
|
||||||
postvars["unknown_graph"] = ($("input[name = 'unknown_graph']").is(":checked"))?1:0;;
|
postvars["unknown_graph"] = ($("input[name = 'unknown_graph']").is(":checked"))?1:0;;
|
||||||
postvars["avg_only"] = ($("input[name = 'avg_only']").is(":checked"))?1:0;;
|
|
||||||
|
|
||||||
postvars["period_hours"] = $("input[name = 'period_hours']").val();
|
postvars["period_hours"] = $("input[name = 'period_hours']").val();
|
||||||
postvars["zoom"] = $("input[name = 'zoom']").val();
|
postvars["zoom"] = $("input[name = 'zoom']").val();
|
||||||
@ -358,14 +354,6 @@ class ModuleGraph {
|
|||||||
);
|
);
|
||||||
$ui->formAddCheckbox($options);
|
$ui->formAddCheckbox($options);
|
||||||
|
|
||||||
$options = array(
|
|
||||||
'name' => 'avg_only',
|
|
||||||
'value' => 1,
|
|
||||||
'checked' => (bool)$this->avg_only,
|
|
||||||
'label' => __('Avg Only')
|
|
||||||
);
|
|
||||||
$ui->formAddCheckbox($options);
|
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
'label' => __('Time range (hours)'),
|
'label' => __('Time range (hours)'),
|
||||||
'name' => 'period_hours',
|
'name' => 'period_hours',
|
||||||
|
@ -29,7 +29,6 @@ if (! check_acl ($config['id_user'], $id_grupo, "AR") && ! check_acl ($config['i
|
|||||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||||
|
|
||||||
$draw_alerts = get_parameter("draw_alerts", 0);
|
$draw_alerts = get_parameter("draw_alerts", 0);
|
||||||
$avg_only = get_parameter ("avg_only", 1);
|
|
||||||
$period = get_parameter ("period", SECONDS_1HOUR);
|
$period = get_parameter ("period", SECONDS_1HOUR);
|
||||||
$width = get_parameter ("width", 555);
|
$width = get_parameter ("width", 555);
|
||||||
$height = get_parameter ("height", 245);
|
$height = get_parameter ("height", 245);
|
||||||
@ -228,7 +227,6 @@ else {
|
|||||||
. 'data-draw_events="'. (int)$draw_events . '"'
|
. 'data-draw_events="'. (int)$draw_events . '"'
|
||||||
. 'data-title="'. $title . '"'
|
. 'data-title="'. $title . '"'
|
||||||
. 'data-draw_alerts="'. (int)$draw_alerts . '"'
|
. 'data-draw_alerts="'. (int)$draw_alerts . '"'
|
||||||
. 'data-avg_only="'. (int)$avg_only . '"'
|
|
||||||
. 'data-date="'. $date . '"'
|
. 'data-date="'. $date . '"'
|
||||||
. 'data-unit="'. $unit . '"'
|
. 'data-unit="'. $unit . '"'
|
||||||
. 'data-date="'. $date . '"'
|
. 'data-date="'. $date . '"'
|
||||||
@ -401,7 +399,6 @@ echo "</div>";
|
|||||||
height: height,
|
height: height,
|
||||||
title: title,
|
title: title,
|
||||||
show_alerts: showAlerts,
|
show_alerts: showAlerts,
|
||||||
avg_only: avgOnly,
|
|
||||||
date: date,
|
date: date,
|
||||||
unit: unit,
|
unit: unit,
|
||||||
type_g: type_g
|
type_g: type_g
|
||||||
@ -467,7 +464,6 @@ echo "</div>";
|
|||||||
var showEvents = $container.data('draw_events');
|
var showEvents = $container.data('draw_events');
|
||||||
var title = $container.data('title');
|
var title = $container.data('title');
|
||||||
var showAlerts = $container.data('draw_alerts');
|
var showAlerts = $container.data('draw_alerts');
|
||||||
var avgOnly = $container.data('avg_only');
|
|
||||||
var date = $container.data('date');
|
var date = $container.data('date');
|
||||||
var unit = $container.data('unit');
|
var unit = $container.data('unit');
|
||||||
var date = $container.data('date');
|
var date = $container.data('date');
|
||||||
|
@ -102,15 +102,6 @@ $interface_traffic_modules = array(
|
|||||||
|
|
||||||
period_select_init(periodSelectId);
|
period_select_init(periodSelectId);
|
||||||
};
|
};
|
||||||
|
|
||||||
function show_others() {
|
|
||||||
if (!$("#checkbox-avg_only").attr('checked')) {
|
|
||||||
$("#hidden-show_other").val(1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#hidden-show_other").val(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-->
|
-->
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
@ -165,19 +156,6 @@ $interface_traffic_modules = array(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($zoom > 1) {
|
|
||||||
$height = $height * ($zoom / 2.1);
|
|
||||||
$width = $width * ($zoom / 1.4);
|
|
||||||
echo "<script type='text/javascript'>window.resizeTo($width + 120, $height + 320);</script>";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*$current = date("Y-m-d");
|
|
||||||
|
|
||||||
if ($start_date != $current)
|
|
||||||
$date = strtotime($start_date);
|
|
||||||
else
|
|
||||||
$date = $utime;
|
|
||||||
*/
|
|
||||||
$date = strtotime("$start_date $start_time");
|
$date = strtotime("$start_date $start_time");
|
||||||
$now = time();
|
$now = time();
|
||||||
|
|
||||||
@ -203,16 +181,25 @@ $interface_traffic_modules = array(
|
|||||||
'date' => $date,
|
'date' => $date,
|
||||||
'homeurl' => $config['homeurl'],
|
'homeurl' => $config['homeurl'],
|
||||||
'percentil' => (($show_percentil)? $config['percentil'] : null),
|
'percentil' => (($show_percentil)? $config['percentil'] : null),
|
||||||
'fullscale' => $fullscale
|
'fullscale' => $fullscale,
|
||||||
|
'zoom' => $zoom
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($config['type_interface_charts'] == 'line'){
|
||||||
|
$stacked = CUSTOM_GRAPH_LINE;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$stacked = CUSTOM_GRAPH_AREA;
|
||||||
|
}
|
||||||
|
|
||||||
$params_combined = array(
|
$params_combined = array(
|
||||||
'weight_list' => array(),
|
'weight_list' => array(),
|
||||||
'projection' => false,
|
'projection' => false,
|
||||||
'labels' => array_keys($interface_traffic_modules),
|
'labels' => array_keys($interface_traffic_modules),
|
||||||
'from_interface' => true,
|
'from_interface' => true,
|
||||||
'modules_series' => array_values($interface_traffic_modules),
|
'modules_series' => array_values($interface_traffic_modules),
|
||||||
'return' => 0
|
'return' => 0,
|
||||||
|
'stacked' => $stacked
|
||||||
);
|
);
|
||||||
|
|
||||||
graphic_combined_module(
|
graphic_combined_module(
|
||||||
@ -297,7 +284,8 @@ $interface_traffic_modules = array(
|
|||||||
$options[2] = 'x2';
|
$options[2] = 'x2';
|
||||||
$options[3] = 'x3';
|
$options[3] = 'x3';
|
||||||
$options[4] = 'x4';
|
$options[4] = 'x4';
|
||||||
$data[1] = html_print_select($options, "zoom", $zoom, '', '', 0, true);
|
$options[5] = __('Full');
|
||||||
|
$data[1] = html_print_select($options, "zoom", $zoom, '', '', 0, true, false, false);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
|
@ -96,15 +96,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
|
|
||||||
period_select_init(periodSelectId);
|
period_select_init(periodSelectId);
|
||||||
};
|
};
|
||||||
|
|
||||||
function show_others() {
|
|
||||||
if ($('#checkbox-avg_only').is(":checked") == true) {
|
|
||||||
$("#hidden-show_other").val(1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#hidden-show_other").val(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
||||||
@ -142,16 +133,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
|
|
||||||
$draw_alerts = get_parameter("draw_alerts", 0);
|
$draw_alerts = get_parameter("draw_alerts", 0);
|
||||||
|
|
||||||
if(isset($config['only_average'])){
|
|
||||||
$avg_only = $config['only_average'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$show_other = get_parameter('show_other',-1);
|
|
||||||
|
|
||||||
if ($show_other != -1) {
|
|
||||||
$avg_only = $show_other;
|
|
||||||
}
|
|
||||||
|
|
||||||
$period = get_parameter ("period");
|
$period = get_parameter ("period");
|
||||||
$id = get_parameter ("id", 0);
|
$id = get_parameter ("id", 0);
|
||||||
$label = get_parameter ("label", "");
|
$label = get_parameter ("label", "");
|
||||||
@ -236,7 +217,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
'title' => $label_graph,
|
'title' => $label_graph,
|
||||||
'unit_name' => $unit,
|
'unit_name' => $unit,
|
||||||
'show_alerts' => $draw_alerts,
|
'show_alerts' => $draw_alerts,
|
||||||
'avg_only' => $avg_only,
|
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
'unit' => $unit,
|
'unit' => $unit,
|
||||||
'baseline' => $baseline,
|
'baseline' => $baseline,
|
||||||
@ -246,7 +226,8 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
'show_unknown' => $unknown_graph,
|
'show_unknown' => $unknown_graph,
|
||||||
'percentil' => (($show_percentil)? $config['percentil'] : null),
|
'percentil' => (($show_percentil)? $config['percentil'] : null),
|
||||||
'type_graph' => $config['type_module_charts'],
|
'type_graph' => $config['type_module_charts'],
|
||||||
'fullscale' => $fullscale
|
'fullscale' => $fullscale,
|
||||||
|
'zoom' => $zoom
|
||||||
);
|
);
|
||||||
echo grafico_modulo_sparse ($params);
|
echo grafico_modulo_sparse ($params);
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
@ -303,16 +284,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
if ($graph_type != "boolean" && $graph_type != "string") {
|
|
||||||
$data = array();
|
|
||||||
$data[0] = __('Avg. Only');
|
|
||||||
$data[1] = html_print_checkbox ("avg_only", 1,
|
|
||||||
(bool)$avg_only, true, false, 'show_others()');
|
|
||||||
$data[1] .= html_print_input_hidden('show_other', 0, true);
|
|
||||||
$table->data[] = $data;
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Begin date');
|
$data[0] = __('Begin date');
|
||||||
$data[1] = html_print_input_text ("start_date", $start_date,'', 10, 20, true);
|
$data[1] = html_print_input_text ("start_date", $start_date,'', 10, 20, true);
|
||||||
@ -326,14 +297,15 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Zoom factor');
|
$data[0] = __('Zoom');
|
||||||
$options = array ();
|
$options = array ();
|
||||||
$options[$zoom] = 'x' . $zoom;
|
$options[$zoom] = 'x' . $zoom;
|
||||||
$options[1] = 'x1';
|
$options[1] = 'x1';
|
||||||
$options[2] = 'x2';
|
$options[2] = 'x2';
|
||||||
$options[3] = 'x3';
|
$options[3] = 'x3';
|
||||||
$options[4] = 'x4';
|
$options[4] = 'x4';
|
||||||
$data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true);
|
$options[5] = __('full');
|
||||||
|
$data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
@ -367,11 +339,13 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Show event graph');
|
$data[0] = __('Show event graph');
|
||||||
$data[1] = html_print_checkbox ("show_events_graph", 1, (bool) $show_events_graph, true);
|
$data[1] = html_print_checkbox ("show_events_graph", 1, (bool) $show_events_graph, true);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
*/
|
||||||
|
|
||||||
switch ($graph_type) {
|
switch ($graph_type) {
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
|
@ -1268,7 +1268,6 @@ if (!empty($result)) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (is_metaconsole() && isset($row['server_id'])) {
|
if (is_metaconsole() && isset($row['server_id'])) {
|
||||||
$graph_params['avg_only'] = 1;
|
|
||||||
// Set the server id
|
// Set the server id
|
||||||
$graph_params['server'] = $row['server_id'];
|
$graph_params['server'] = $row['server_id'];
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,6 @@ function main_intel_dcm_agent_view () {
|
|||||||
$draw_events = false;
|
$draw_events = false;
|
||||||
$draw_alerts = false;
|
$draw_alerts = false;
|
||||||
$period = 7200;
|
$period = 7200;
|
||||||
$avg_only = true;
|
|
||||||
|
|
||||||
$module = modules_get_agentmodule_id (io_safe_input("Avg. Power"), $id_agent);
|
$module = modules_get_agentmodule_id (io_safe_input("Avg. Power"), $id_agent);
|
||||||
$unit = modules_get_unit ($module['id_agente_modulo']);
|
$unit = modules_get_unit ($module['id_agente_modulo']);
|
||||||
@ -178,7 +177,6 @@ function main_intel_dcm_agent_view () {
|
|||||||
'title' => $module['nombre'],
|
'title' => $module['nombre'],
|
||||||
'unit_name' => null,
|
'unit_name' => null,
|
||||||
'show_alerts' => $draw_alerts,
|
'show_alerts' => $draw_alerts,
|
||||||
'avg_only' => $avg_only,
|
|
||||||
'pure' => false,
|
'pure' => false,
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
'unit' => $unit
|
'unit' => $unit
|
||||||
@ -213,7 +211,6 @@ function main_intel_dcm_agent_view () {
|
|||||||
'title' => $module['nombre'],
|
'title' => $module['nombre'],
|
||||||
'unit_name' => null,
|
'unit_name' => null,
|
||||||
'show_alerts' => $draw_alerts,
|
'show_alerts' => $draw_alerts,
|
||||||
'avg_only' => $avg_only,
|
|
||||||
'pure' => false,
|
'pure' => false,
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
'unit' => $unit
|
'unit' => $unit
|
||||||
@ -232,7 +229,6 @@ function main_intel_dcm_agent_view () {
|
|||||||
'title' => $module['nombre'],
|
'title' => $module['nombre'],
|
||||||
'unit_name' => null,
|
'unit_name' => null,
|
||||||
'show_alerts' => $draw_alerts,
|
'show_alerts' => $draw_alerts,
|
||||||
'avg_only' => $avg_only,
|
|
||||||
'pure' => false,
|
'pure' => false,
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
'unit' => $unit
|
'unit' => $unit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user