Minor fixes with graphs
This commit is contained in:
parent
e33a9bc3e4
commit
44fb762fdf
|
@ -258,8 +258,15 @@ function pandora_realtime_graphs()
|
|||
$canvas .= grafico_modulo_sparse($params);
|
||||
|
||||
$canvas .= '</div>';
|
||||
echo $canvas;
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'white_box',
|
||||
'content' => $canvas,
|
||||
]
|
||||
);
|
||||
|
||||
// echo $canvas;
|
||||
// Define a custom action to save
|
||||
// the OID selected in the SNMP browser to the form.
|
||||
html_print_input_hidden(
|
||||
|
|
|
@ -2318,10 +2318,9 @@ function pandoraFlotArea(
|
|||
);
|
||||
}
|
||||
|
||||
$("#menu_cancelzoom_" + graph_id).attr(
|
||||
"src",
|
||||
homeurl + "images/zoom_cross_grey.png"
|
||||
);
|
||||
$("#menu_cancelzoom_" + graph_id)
|
||||
.attr("src", homeurl + "images/disable.svg")
|
||||
.removeClass("alpha50");
|
||||
|
||||
max_draw["max"] = ranges.yaxis.to;
|
||||
max_draw["min"] = ranges.yaxis.from;
|
||||
|
@ -2813,11 +2812,8 @@ function pandoraFlotArea(
|
|||
legend: { show: true }
|
||||
})
|
||||
);
|
||||
$("#menu_cancelzoom_" + graph_id).attr(
|
||||
"src",
|
||||
homeurl + "images/zoom_cross.disabled.png"
|
||||
);
|
||||
$("#menu_cancelzoom_" + graph_id).attr("class", "invert_filter");
|
||||
$("#menu_cancelzoom_" + graph_id).addClass("alpha50");
|
||||
//$("#menu_cancelzoom_" + graph_id).attr("class", "invert_filter");
|
||||
overview.clearSelection();
|
||||
thresholded = false;
|
||||
max_draw = [];
|
||||
|
|
|
@ -367,7 +367,7 @@ function menu_graph(
|
|||
|
||||
$return .= "<div id='general_menu_$graph_id' class='menu_graph'>";
|
||||
$return .= "<div id='menu_$graph_id' "."style='display: none; ".'text-align: center;'.'position: relative;'."border-bottom: 0px;'>
|
||||
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' class='invert_filter' src='".$params['homeurl'].'images/operation.png'."' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
||||
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' class='main_menu_icon invert_filter' src='".$params['homeurl'].'images/disable.svg'."' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
||||
if ($threshold) {
|
||||
$return .= " <a href='javascript:'><img id='menu_threshold_$graph_id' src='".$params['homeurl'].'images/chart_curve_threshold.png'."' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>";
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ function menu_graph(
|
|||
|
||||
// Export buttons.
|
||||
if ($params['show_export_csv'] && enterprise_installed() === true) {
|
||||
$return .= "<a href='javascript:'><img id='menu_export_csv_$graph_id' src='".$params['homeurl'].'images/csv_grey.png'."' alt='".__('Export to CSV')."' title='".__('Export to CSV')."'></a>";
|
||||
$return .= "<a href='javascript:'><img id='menu_export_csv_$graph_id' class='main_menu_icon invert_filter' src='".$params['homeurl'].'images/file-csv.svg'."' alt='".__('Export to CSV')."' title='".__('Export to CSV')."'></a>";
|
||||
}
|
||||
|
||||
$return .= '</div>';
|
||||
|
|
|
@ -446,69 +446,47 @@ ui_print_message_dialog(
|
|||
}
|
||||
|
||||
$form_table = html_print_table($table, true);
|
||||
$form_table .= '<div class="w100p right mrgn_top_15px right_align">';
|
||||
$form_table .= html_print_submit_button(
|
||||
__('Reload'),
|
||||
'submit',
|
||||
false,
|
||||
$form_table .= html_print_div(
|
||||
[
|
||||
'icon' => 'Icon search secondary mini',
|
||||
'class' => 'float-right',
|
||||
'class' => 'action-buttons-right-forced',
|
||||
'content' => html_print_submit_button(
|
||||
__('Reload'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary mini',
|
||||
'class' => 'float-right',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form_table .= '</div>';
|
||||
|
||||
// Menu.
|
||||
$menu_form = "<form method='get' action='stat_win.php' class='mrgn_top_10px'>";
|
||||
$menu_form .= html_print_input_hidden('id', $id, true);
|
||||
$menu_form .= html_print_input_hidden('label', $label, true);
|
||||
echo '<form method="GET" action="stat_win.php" style="margin-bottom: 0">';
|
||||
html_print_input_hidden('id', $id);
|
||||
html_print_input_hidden('label', $label);
|
||||
|
||||
if (empty($server_id) === false) {
|
||||
$menu_form .= html_print_input_hidden('server', $server_id, true);
|
||||
html_print_input_hidden('server', $server_id);
|
||||
}
|
||||
|
||||
$menu_form .= html_print_input_hidden('histogram', $histogram, true);
|
||||
html_print_input_hidden('histogram', $histogram);
|
||||
|
||||
if (isset($_GET['type']) === true) {
|
||||
$type = get_parameter_get('type');
|
||||
$menu_form .= html_print_input_hidden('type', $type, true);
|
||||
html_print_input_hidden('type', $type);
|
||||
}
|
||||
|
||||
$menu_form .= '<div class="module_graph_menu_dropdown">';
|
||||
$menu_form .= '<div id="module_graph_menu_header" class="module_graph_menu_header">';
|
||||
$menu_form .= html_print_image(
|
||||
'images/arrow_down_green.png',
|
||||
true,
|
||||
[
|
||||
'class' => 'module_graph_menu_arrow',
|
||||
'float' => 'left',
|
||||
],
|
||||
false,
|
||||
false,
|
||||
true
|
||||
ui_toggle(
|
||||
$form_table,
|
||||
'<span class="subsection_header_title">'.__('Graph configuration menu').'</span>'.ui_print_help_tip(
|
||||
__('In Pandora FMS, data is stored compressed. The data visualization in database, charts or CSV exported data won\'t match, because is interpreted at runtime. Please check \'Pandora FMS Engineering\' chapter from documentation.'),
|
||||
true
|
||||
)
|
||||
);
|
||||
$menu_form .= '<span style="flex: 2; justify-content:center;" class="flex-row">';
|
||||
$menu_form .= '<b>'.__('Graph configuration menu').'</b>';
|
||||
$menu_form .= ui_print_help_tip(
|
||||
__('In Pandora FMS, data is stored compressed. The data visualization in database, charts or CSV exported data won\'t match, because is interpreted at runtime. Please check \'Pandora FMS Engineering\' chapter from documentation.'),
|
||||
true
|
||||
);
|
||||
$menu_form .= '</span>';
|
||||
$menu_form .= '</div>';
|
||||
|
||||
$class = 'module_graph_menu_content';
|
||||
if ($histogram === false) {
|
||||
$class .= ' module_graph_menu_content_closed invisible';
|
||||
}
|
||||
|
||||
$menu_form .= '<div class="'.$class.'">';
|
||||
$menu_form .= $form_table;
|
||||
$menu_form .= '</div>';
|
||||
$menu_form .= '</div>';
|
||||
$menu_form .= '</form>';
|
||||
|
||||
echo $menu_form;
|
||||
echo '</form>';
|
||||
|
||||
// Hidden div to forced title.
|
||||
html_print_div(
|
||||
|
@ -544,7 +522,7 @@ ui_print_message_dialog(
|
|||
];
|
||||
|
||||
// Graph.
|
||||
$output = '<div id="stat-win-module-graph">';
|
||||
$output = '<div class="white_box margin-lr-10" id="stat-win-module-graph">';
|
||||
$output .= '<div id="stat-win-spinner" class="stat-win-spinner">';
|
||||
$output .= html_print_image('images/spinner_charts.gif', true);
|
||||
$output .= '</div>';
|
||||
|
|
Loading…
Reference in New Issue