Added start time in snmp interface graphics
This commit is contained in:
parent
77ee30df20
commit
6948a2fa56
|
@ -143,6 +143,7 @@ $interface_traffic_modules = array(
|
||||||
$width = (int) get_parameter("width", 555);
|
$width = (int) get_parameter("width", 555);
|
||||||
$height = (int) get_parameter("height", 245);
|
$height = (int) get_parameter("height", 245);
|
||||||
$start_date = (string) get_parameter("start_date", date("Y-m-d"));
|
$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);
|
$zoom = (int) get_parameter ("zoom", 1);
|
||||||
$baseline = get_parameter ("baseline", 0);
|
$baseline = get_parameter ("baseline", 0);
|
||||||
$show_percentil = get_parameter ("show_percentil", 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>";
|
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)
|
if ($start_date != $current)
|
||||||
$date = strtotime($start_date);
|
$date = strtotime($start_date);
|
||||||
else
|
else
|
||||||
$date = $utime;
|
$date = $utime;
|
||||||
|
*/
|
||||||
|
$date = strtotime("$start_date $start_time");
|
||||||
|
$now = time();
|
||||||
|
|
||||||
|
if ($date > $now){
|
||||||
|
$date = $now;
|
||||||
|
}
|
||||||
|
|
||||||
$urlImage = ui_get_full_url(false);
|
$urlImage = ui_get_full_url(false);
|
||||||
|
|
||||||
|
@ -230,6 +238,12 @@ $interface_traffic_modules = array(
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$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 = array();
|
||||||
$data[0] = __('Time range');
|
$data[0] = __('Time range');
|
||||||
$data[1] = html_print_extended_select_for_time('period', $period, '', '', 0, 7, true);
|
$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({
|
$("#text-start_date").datepicker({
|
||||||
dateFormat: "<?php echo DATE_FORMAT_JS; ?>"
|
dateFormat: "<?php echo DATE_FORMAT_JS; ?>"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#text-start_time").timepicker({
|
$("#text-start_time").timepicker({
|
||||||
showSecond: true,
|
showSecond: true,
|
||||||
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||||
|
|
Loading…
Reference in New Issue