mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 08:03:51 +02:00
Merge branch 'master' into lazyload
This commit is contained in:
@@ -20,7 +20,7 @@ $group_id = $_POST['group_id'];
|
||||
|
||||
if(is_numeric($group_id) && $group_id > 0) {
|
||||
$group = dbFetchRow("SELECT * FROM `device_groups` WHERE `id` = ? LIMIT 1",array($group_id));
|
||||
$group_split = preg_split('/([a-zA-Z0-9_\-\.\=\%\<\>\ \"\'\!\~\(\)\*\/\@]+[&&\|\|]+)/',$group['pattern'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
||||
$group_split = preg_split('/([a-zA-Z0-9_\-\.\=\%\<\>\ \"\'\!\~\(\)\*\/\@\[\]]+[&&\|\|]+)/',$group['pattern'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
||||
$count = count($group_split) - 1;
|
||||
$group_split[$count] = $group_split[$count].' &&';
|
||||
$output = array('name'=>$group['name'],'desc'=>$group['desc'],'pattern'=>$group_split);
|
||||
|
||||
@@ -422,9 +422,9 @@ function load_graph_definitions($logarithmic = false, $tinylegend = false) {
|
||||
'GPRINT:avg:LAST:%4.1lf\l');
|
||||
$GraphDefs['frequency'] = array(
|
||||
#'-v', 'Hertz',
|
||||
'DEF:avg={file}:frequency:AVERAGE',
|
||||
'DEF:min={file}:frequency:MIN',
|
||||
'DEF:max={file}:frequency:MAX',
|
||||
'DEF:avg={file}:value:AVERAGE',
|
||||
'DEF:min={file}:value:MIN',
|
||||
'DEF:max={file}:value:MAX',
|
||||
"AREA:max#b5b5b5",
|
||||
"AREA:min#$Canvas",
|
||||
"LINE1:avg#$FullBlue:Frequency [Hz]",
|
||||
|
||||
@@ -38,7 +38,9 @@ $graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
|
||||
$type = $graphtype['type'];
|
||||
$subtype = $graphtype['subtype'];
|
||||
|
||||
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
|
||||
if ($auth !== true && $auth != 1) {
|
||||
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
|
||||
}
|
||||
include($config['install_dir'] . "/html/includes/graphs/$type/auth.inc.php");
|
||||
|
||||
if ($auth === true && is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php")) {
|
||||
|
||||
Reference in New Issue
Block a user