mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed Quick Graphs bug w/ Aggregate 95th code (#10269)
* Added configuration options to aggregate input and output bits before making 95th percentile billing calculations * Changed aggregate to per-bill instead of global. Added config options for making aggregate the default selected option. Refactored out mres() calls in touched files. Changed to Config::get where appropriate. * Fixed documentation typo * Fixed scope of aggregate default config option to be under billing * Fixed getRates issue in Quick Graphs section of 95th percentile bill * Added configuration options to aggregate input and output bits before making 95th percentile billing calculations * Changed aggregate to per-bill instead of global. Added config options for making aggregate the default selected option. Refactored out mres() calls in touched files. Changed to Config::get where appropriate. * Fixed documentation typo * Fixed scope of aggregate default config option to be under billing * Fixed getRates issue in Quick Graphs section of 95th percentile bill * Fixed formatting
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
$datefrom = date('YmdHis', $vars['from']);
|
||||
$dateto = date('YmdHis', $vars['to']);
|
||||
|
||||
$rates = getRates($vars['id'], $datefrom, $dateto);
|
||||
$rates = getRates($vars['id'], $datefrom, $dateto, $vars['dir']);
|
||||
|
||||
$ports = dbFetchRows('SELECT * FROM `bill_ports` AS B, `ports` AS P, `devices` AS D WHERE B.bill_id = ? AND P.port_id = B.port_id AND D.device_id = P.device_id', array($vars['id']));
|
||||
|
||||
|
@@ -240,19 +240,19 @@ if ($vars['view'] == 'accurate') {
|
||||
} else {
|
||||
$bi = "<img src='graph.php?type=bill_bits&id=".$bill_id;
|
||||
$bi .= '&from='.$unixfrom.'&to='.$unixto;
|
||||
$bi .= "&width=1000&height=200&total=1'>";
|
||||
$bi .= "&width=1000&height=200&total=1&dir=".$dir_95th."'>";
|
||||
|
||||
$li = "<img src='graph.php?type=bill_bits&id=".$bill_id;
|
||||
$li .= '&from='.$unix_prev_from.'&to='.$unix_prev_to;
|
||||
$li .= "&width=1000&height=200&total=1'>";
|
||||
$li .= "&width=1000&height=200&total=1&dir=".$dir_95th."'>";
|
||||
|
||||
$di = "<img src='graph.php?type=bill_bits&id=".$bill_id;
|
||||
$di .= '&from='.$config['time']['day'].'&to='.$config['time']['now'];
|
||||
$di .= "&width=1000&height=200&total=1'>";
|
||||
$di .= "&width=1000&height=200&total=1&dir=".$dir_95th."'>";
|
||||
|
||||
$mi = "<img src='graph.php?type=bill_bits&id=".$bill_id;
|
||||
$mi .= '&from='.$lastmonth.'&to='.$rightnow;
|
||||
$mi .= "&width=1000&height=200&total=1'>";
|
||||
$mi .= "&width=1000&height=200&total=1&dir=".$dir_95th."'>";
|
||||
}//end if
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user