diff --git a/html/pages/device/performance.inc.php b/html/pages/device/performance.inc.php index 1c642daf4..8686bf803 100644 --- a/html/pages/device/performance.inc.php +++ b/html/pages/device/performance.inc.php @@ -23,12 +23,43 @@ if(!isset($vars['section'])) { $vars['section'] = "performance"; } +if (empty($vars['dtpickerfrom'])) { + $vars['dtpickerfrom'] = date($config['dateformat']['byminute'], time() - 3600 * 24 * 2); +} +if (empty($vars['dtpickerto'])) { + $vars['dtpickerto'] = date($config['dateformat']['byminute']); +} + +?> + +
+
+
+ + +
+
+ + +
+ +
+
+ + + += ? AND `timestamp` <= ?"; + $param = array($device['device_id'], $vars['dtpickerfrom'], $vars['dtpickerto']); } else { - $query = "SELECT DATE_FORMAT(timestamp, '".$config['alert_graph_date_format']."') Date, xmt,rcv,loss,min,max,avg FROM `device_perf`,`devices_perms` WHERE `device_id` = ? AND alert_log.device_id = devices_perms.device_id AND devices_perms.user_id = " . $_SESSION['user_id']; - $param = array($device['device_id']); + $query = "SELECT DATE_FORMAT(timestamp, '".$config['alert_graph_date_format']."') Date, xmt,rcv,loss,min,max,avg FROM `device_perf`,`devices_perms` WHERE `device_id` = ? AND alert_log.device_id = devices_perms.device_id AND devices_perms.user_id = ? AND `timestamp` >= ? AND `timestamp` <= ?"; + $param = array($device['device_id'], $_SESSION['user_id'], $vars['dtpickerfrom'], $vars['dtpickerto']); } ?>