This commit is contained in:
Daniel Maya 2021-12-21 15:22:22 +01:00
parent ae0e4e2826
commit 7767e9aae2

View File

@ -334,12 +334,12 @@ if ($view_graph) {
}
$period_label = human_time_description_raw($period);
echo "<form method='POST' action='index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id=$id_graph'>";
echo '<form method="POST" action="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id=$id_graph">';
echo "<table class='databox filters w100p' cellpadding='4' cellspacing='4'>";
echo '<tr>';
echo '<td>';
echo '<b>'.__('Date').'</b>'.' ';
echo '<b>'.__('Date').'</b>';
echo '</td>';
echo '<td>';
@ -396,9 +396,11 @@ if ($view_graph) {
echo '</tr>';
echo '</table>';
echo '</form>';
/*
We must add javascript here. Otherwise, the date picker won't
work if the date is not correct because php is returning. */
work if the date is not correct because php is returning.
*/
ui_include_time_picker();
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
@ -441,12 +443,15 @@ if ($view_graph) {
page: "operation/reporting/graph_viewer",
view_graph: 1,
id: '<?php echo $id_graph; ?>',
zoom: '<?php echo $zoom; ?>',
date: '<?php echo $date; ?>',
time: '<?php echo $time; ?>',
period: '<?php echo $period; ?>',
stacked: '<?php echo $stacked; ?>',
threshold: '<?php echo $check; ?>',
zoom: $('#zoom').val(),
date: $('#text-date').val(),
time: $('#text-time').val(),
period: $('select[id^=period][id$=select]').val(),
stacked: $('#stacked').val(),
}
if (data['stacked'] == 4 && $('#checkbox-threshold').is(':checked')) {
data['threshold'] = 1;
}
$.ajax({
@ -492,7 +497,7 @@ if ($view_graph) {
return;
}
// Header
// Header.
ui_print_page_header(__('Reporting').' &raquo; '.__('Custom graph viewer'), 'images/op_reporting.png', false, '', false, '');