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:
Tony Murray
2019-08-19 22:53:48 -05:00
committed by GitHub
parent d3243bd32e
commit 8d669a8a39
6 changed files with 67 additions and 20 deletions

View File

@@ -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);