mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Simple linear port graph prediction (#10520)
* Simple linear port graph prediction Simple linear prediction line for in and out if graph "to" value is in the future Improve graph date handling * thinner line * Make test specify timezone
This commit is contained in:
@@ -22,14 +22,10 @@ $title = $vars['title'];
|
||||
$vertical = $vars['vertical'];
|
||||
$legend = $vars['legend'];
|
||||
$output = (!empty($vars['output']) ? $vars['output'] : 'default');
|
||||
$from = (isset($vars['from']) ? $vars['from'] : time() - 60 * 60 * 24);
|
||||
$to = (isset($vars['to']) ? $vars['to'] : time());
|
||||
$from = parse_at_time($_GET['from']) ?: Config::get('time.day');
|
||||
$to = parse_at_time($_GET['to']) ?: Config::get('time.now');
|
||||
$graph_type = (isset($vars['graph_type']) ? $vars['graph_type'] : Config::get('webui.graph_type'));
|
||||
|
||||
if ($from < 0) {
|
||||
$from = ($to + $from);
|
||||
}
|
||||
|
||||
$period = ($to - $from);
|
||||
$base64_output = '';
|
||||
$prev_from = ($from - $period);
|
||||
|
Reference in New Issue
Block a user