Added start time in snmp interface graphics

This commit is contained in:
Daniel Maya 2017-03-23 12:32:30 +01:00
parent 77ee30df20
commit 6948a2fa56
1 changed files with 16 additions and 1 deletions

View File

@ -143,6 +143,7 @@ $interface_traffic_modules = array(
$width = (int) get_parameter("width", 555);
$height = (int) get_parameter("height", 245);
$start_date = (string) get_parameter("start_date", date("Y-m-d"));
$start_time = get_parameter ("start_time", date("H:i:s"));
$zoom = (int) get_parameter ("zoom", 1);
$baseline = get_parameter ("baseline", 0);
$show_percentil = get_parameter ("show_percentil", 0);
@ -154,12 +155,19 @@ $interface_traffic_modules = array(
echo "<script type='text/javascript'>window.resizeTo($width + 120, $height + 320);</script>";
}
$current = date("Y-m-d");
/*$current = date("Y-m-d");
if ($start_date != $current)
$date = strtotime($start_date);
else
$date = $utime;
*/
$date = strtotime("$start_date $start_time");
$now = time();
if ($date > $now){
$date = $now;
}
$urlImage = ui_get_full_url(false);
@ -230,6 +238,12 @@ $interface_traffic_modules = array(
$table->data[] = $data;
$table->rowclass[] = '';
$data = array();
$data[0] = __('Begin time');
$data[1] = html_print_input_text ("start_time", $start_time,'', 10, 10, true);
$table->data[] = $data;
$table->rowclass[] = '';
$data = array();
$data[0] = __('Time range');
$data[1] = html_print_extended_select_for_time('period', $period, '', '', 0, 7, true);
@ -333,6 +347,7 @@ ui_include_time_picker(true);
$("#text-start_date").datepicker({
dateFormat: "<?php echo DATE_FORMAT_JS; ?>"
});
$("#text-start_time").timepicker({
showSecond: true,
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',