mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Merge branch 'master' into calix
This commit is contained in:
+1
-1
@@ -55,5 +55,5 @@ $response = array(
|
||||
'html' => $output,
|
||||
'title' => $title,
|
||||
);
|
||||
|
||||
header('Content-type: application/json');
|
||||
echo _json_encode($response);
|
||||
|
||||
@@ -29,6 +29,7 @@ if (!$_SESSION['authenticated']) {
|
||||
|
||||
if (preg_match('/^[a-zA-Z0-9\-]+$/', $_POST['type']) == 1) {
|
||||
if (file_exists('includes/forms/'.$_POST['type'].'.inc.php')) {
|
||||
header('Content-type: application/json');
|
||||
include_once 'includes/forms/'.$_POST['type'].'.inc.php';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ function levsort($base, $obj) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
header('Content-type: application/json');
|
||||
$obj = array(array('name' => 'Error: No suggestions found.'));
|
||||
$term = array();
|
||||
$current = false;
|
||||
|
||||
@@ -19,7 +19,7 @@ $bgp = array();
|
||||
|
||||
if (isset($_REQUEST['search'])) {
|
||||
$search = mres($_REQUEST['search']);
|
||||
|
||||
header('Content-type: application/json');
|
||||
if (strlen($search) > 0) {
|
||||
$found = 0;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ $response = array();
|
||||
|
||||
if (isset($id)) {
|
||||
if (file_exists("includes/table/$id.inc.php")) {
|
||||
header('Content-type: application/json');
|
||||
include_once "includes/table/$id.inc.php";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ echo '<tr>
|
||||
<td>'.$device['sysName'].' </td>
|
||||
</tr>';
|
||||
|
||||
if ($ip = inet6_ntop($device['ip'])) {
|
||||
if (!empty($device['ip'])) {
|
||||
echo '<tr>
|
||||
<td>Resolved IP</td>
|
||||
<td>'.$ip.'</td>
|
||||
<td>'.$device['ip'].'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ $alert_id = $_POST['alert_id'];
|
||||
|
||||
if (is_numeric($alert_id) && $alert_id > 0) {
|
||||
$rule = dbFetchRow('SELECT * FROM `alert_rules` WHERE `id` = ? LIMIT 1', array($alert_id));
|
||||
$rule_split = preg_split('/([a-zA-Z0-9_\-\.\=\%\<\>\ \"\'\!\~\(\)\*\/\@]+[&&\|\|]+)/', $rule['rule'], -1, (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY));
|
||||
$rule_split = preg_split('/([a-zA-Z0-9_\-\.\=\%\<\>\ \"\'\!\~\(\)\*\/\@\|]+[&&|\|\|]{2})/', $rule['rule'], -1, (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY));
|
||||
$count = (count($rule_split) - 1);
|
||||
$rule_split[$count] = $rule_split[$count].' &&';
|
||||
$output = array(
|
||||
|
||||
@@ -17,9 +17,9 @@ foreach ($graphs as $key => $text) {
|
||||
|
||||
if ($key == "ceph_poolstats") {
|
||||
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-pool-*") as $rrd_filename) {
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['id'] = $app['app_id'];
|
||||
if (preg_match("/.*-pool-(.+)\.rrd$/", $rrd_filename, $pools)) {
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['id'] = $app['app_id'];
|
||||
$pool = $pools[1];
|
||||
echo '<h3>'.$pool.' Reads/Writes</h3>';
|
||||
$graph_array['type'] = 'application_ceph_pool_io';
|
||||
@@ -29,6 +29,8 @@ foreach ($graphs as $key => $text) {
|
||||
include 'includes/print-graphrow.inc.php';
|
||||
echo '</td></tr>';
|
||||
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['id'] = $app['app_id'];
|
||||
echo '<h3>'.$pool.' IOPS</h3>';
|
||||
$graph_array['type'] = 'application_ceph_pool_iops';
|
||||
$graph_array['pool'] = $pool;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$no_refresh = true;
|
||||
|
||||
// FIXME - do this in a function and/or do it in graph-realtime.php
|
||||
if (!isset($vars['interval'])) {
|
||||
if ($device['os'] == 'linux') {
|
||||
|
||||
Reference in New Issue
Block a user