mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Make formatting changes consistent
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
*/
|
||||
|
||||
|
||||
function rrdtool_pipe_open(&$rrd_process, &$rrd_pipes) {
|
||||
function rrdtool_pipe_open(&$rrd_process, &$rrd_pipes)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$command = $config['rrdtool'].' -';
|
||||
@@ -73,7 +74,8 @@ function rrdtool_pipe_open(&$rrd_process, &$rrd_pipes) {
|
||||
*/
|
||||
|
||||
|
||||
function rrdtool_pipe_close($rrd_process, &$rrd_pipes) {
|
||||
function rrdtool_pipe_close($rrd_process, &$rrd_pipes)
|
||||
{
|
||||
d_echo(stream_get_contents($rrd_pipes[1]));
|
||||
d_echo(stream_get_contents($rrd_pipes[2]));
|
||||
|
||||
@@ -100,7 +102,8 @@ function rrdtool_pipe_close($rrd_process, &$rrd_pipes) {
|
||||
*/
|
||||
|
||||
|
||||
function rrdtool_graph($graph_file, $options) {
|
||||
function rrdtool_graph($graph_file, $options)
|
||||
{
|
||||
global $config, $debug;
|
||||
|
||||
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
||||
@@ -163,7 +166,8 @@ function rrdtool_graph($graph_file, $options) {
|
||||
*/
|
||||
|
||||
|
||||
function rrdtool($command, $filename, $options) {
|
||||
function rrdtool($command, $filename, $options)
|
||||
{
|
||||
global $config, $debug, $rrd_pipes, $console_color;
|
||||
|
||||
if ($config['rrdcached'] &&
|
||||
@@ -209,7 +213,8 @@ function rrdtool($command, $filename, $options) {
|
||||
*/
|
||||
|
||||
|
||||
function rrdtool_create($filename, $options) {
|
||||
function rrdtool_create($filename, $options)
|
||||
{
|
||||
global $config;
|
||||
if( $config['rrdcached'] && $config['rrdtool_version'] >= 1.5 ) {
|
||||
$chk = rrdtool('info', $filename, '');
|
||||
@@ -302,7 +307,8 @@ function rrdtool_escape($string, $maxlength=null){
|
||||
* @param host Host name
|
||||
* @param extra Components of RRD filename - will be separated with "-"
|
||||
*/
|
||||
function rrd_name($host, $extra, $exten = ".rrd") {
|
||||
function rrd_name($host, $extra, $exten = ".rrd")
|
||||
{
|
||||
global $config;
|
||||
$filename = safename(is_array($extra) ? implode("-", $extra) : $extra);
|
||||
return implode("/", array($config['rrd_dir'], $host, $filename.$exten));
|
||||
@@ -333,7 +339,8 @@ function rrdtool_tune($type, $filename, $max) {
|
||||
* @param val Array of value definitions
|
||||
*
|
||||
*/
|
||||
function rrd_create_update($device, $name, $def, $val, $step=300) {
|
||||
function rrd_create_update($device, $name, $def, $val, $step=300)
|
||||
{
|
||||
global $config;
|
||||
$rrd = rrd_name($device['hostname'], $name);
|
||||
|
||||
|
Reference in New Issue
Block a user