add new select to setup for TIP
This commit is contained in:
parent
5ab5e04630
commit
4ec6b4e053
|
@ -535,6 +535,26 @@ $table_chars->data[$row][0] .= ui_print_help_tip(__('Show percentile 95 in graph
|
|||
$table_chars->data[$row][1] = html_print_input_text ('percentil', $config['percentil'], '', 20, 20, true);
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Graph TIP view:');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('This option may cause performance issues'), true);
|
||||
|
||||
$options_full_escale = array();
|
||||
$options_full_escale[0] = __('None');
|
||||
$options_full_escale[1] = __('All');
|
||||
$options_full_escale[2] = __('On Boolean graphs');
|
||||
|
||||
$table_chars->data[$row][1] = html_print_select($options_full_escale, 'full_scale_option', $config["full_scale_option"], '', '', 0, true, false, false);
|
||||
$row++;
|
||||
|
||||
/*
|
||||
$table_font->data[$row][0] = __('Font path');
|
||||
$fonts = load_fonts();
|
||||
$table_font->data[$row][1] = html_print_select($fonts, 'fontpath',
|
||||
io_safe_output($config["fontpath"]), '', '', 0, true);
|
||||
|
||||
$row++;
|
||||
*/
|
||||
|
||||
echo "<fieldset>";
|
||||
echo "<legend>" . __('Charts configuration') . "</legend>";
|
||||
html_print_table ($table_chars);
|
||||
|
|
|
@ -569,6 +569,10 @@ function config_update_config () {
|
|||
}
|
||||
if (!config_update_value ('percentil', (int) get_parameter('percentil', 0)))
|
||||
$error_update[] = __('Default percentil');
|
||||
|
||||
if (!config_update_value ('full_scale_option', (int) get_parameter('full_scale_option', 0)))
|
||||
$error_update[] = __('Default full scale (TIP)');
|
||||
|
||||
if (!config_update_value ('classic_menu', (bool) get_parameter('classic_menu', false)))
|
||||
$error_update[] = __('Classic menu mode');
|
||||
|
||||
|
|
|
@ -150,7 +150,18 @@ $interface_traffic_modules = array(
|
|||
$zoom = (int) get_parameter ("zoom", 1);
|
||||
$baseline = get_parameter ("baseline", 0);
|
||||
$show_percentil = get_parameter ("show_percentil", 0);
|
||||
$fullscale = get_parameter("fullscale", 0);
|
||||
$fullscale = get_parameter("fullscale");
|
||||
|
||||
if(!isset($_GET["fullscale_sent"]) ){
|
||||
if(!isset($config['full_scale_option']) ||
|
||||
$config['full_scale_option'] == 0 ||
|
||||
$config['full_scale_option'] == 2 ){
|
||||
$fullscale = 0;
|
||||
}
|
||||
else{
|
||||
$fullscale = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($zoom > 1) {
|
||||
$height = $height * ($zoom / 2.1);
|
||||
|
|
|
@ -93,6 +93,15 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||
period_select_init(periodSelectId);
|
||||
};
|
||||
|
||||
function fullscal_other() {
|
||||
if ($('#checkbox-fullscale').is(":checked") == true) {
|
||||
$("#hidden-fullscale_other").val(1);
|
||||
}
|
||||
else {
|
||||
$("#hidden-fullscale_other").val(0);
|
||||
}
|
||||
}
|
||||
|
||||
function show_others() {
|
||||
if ($('#checkbox-avg_only').is(":checked") == true) {
|
||||
$("#hidden-show_other").val(1);
|
||||
|
@ -101,6 +110,8 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||
$("#hidden-show_other").val(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
|
@ -154,6 +165,7 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||
if ($period == "") {
|
||||
$period = get_parameter ("period_select", SECONDS_1DAY);
|
||||
}
|
||||
|
||||
$id = get_parameter ("id", 0);
|
||||
$width = get_parameter ("width", STATWIN_DEFAULT_CHART_WIDTH);
|
||||
$height = get_parameter ("height", STATWIN_DEFAULT_CHART_HEIGHT);
|
||||
|
@ -170,7 +182,26 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||
$time_compare_separated = get_parameter ("time_compare_separated", 0);
|
||||
$time_compare_overlapped = get_parameter ("time_compare_overlapped", 0);
|
||||
$unknown_graph = get_parameter_checkbox ("unknown_graph", 1);
|
||||
$fullscale = get_parameter ("fullscale", 0);
|
||||
|
||||
if(!isset($config['full_scale_option']) || $config['full_scale_option'] == 0){
|
||||
$fullscale = 0;
|
||||
}
|
||||
elseif($config['full_scale_option'] == 1){
|
||||
$fullscale = 1;
|
||||
}
|
||||
elseif($config['full_scale_option'] == 2){
|
||||
if($graph_type == 'boolean'){
|
||||
$fullscale = 1;
|
||||
}else{
|
||||
$fullscale = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$fullscale_other = get_parameter ("fullscale_other", $fullscale);
|
||||
|
||||
if(isset($fullscale_other)){
|
||||
$fullscale = $fullscale_other;
|
||||
}
|
||||
|
||||
// To avoid the horizontal overflow
|
||||
$width -= 20;
|
||||
|
@ -405,7 +436,8 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||
|
||||
$data = array();
|
||||
$data[0] = __('Show full scale graph (TIP)');
|
||||
$data[1] = html_print_checkbox ("fullscale", 1, (bool) $fullscale, true);
|
||||
$data[1] = html_print_checkbox ("fullscale", 1, (bool) $fullscale, true, false,'fullscal_other()');
|
||||
$data[1] .= html_print_input_hidden('fullscale_other', 0, true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue