This commit is contained in:
Daniel Maya 2021-12-21 15:22:22 +01:00
parent ae0e4e2826
commit 7767e9aae2
1 changed files with 20 additions and 15 deletions

View File

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