Apply fixes from StyleCI (#12120)

This commit is contained in:
Jellyfrog
2020-09-21 15:40:17 +02:00
committed by GitHub
parent 77c531527c
commit 82f43cb98d
1733 changed files with 18337 additions and 18540 deletions

View File

@@ -1,15 +1,15 @@
<?php
if (is_numeric($vars['id'])) {
$sensor = dbFetchRow('SELECT * FROM `wireless_sensors` WHERE `sensor_id` = ?', array($vars['id']));
$sensor = dbFetchRow('SELECT * FROM `wireless_sensors` WHERE `sensor_id` = ?', [$vars['id']]);
if (is_numeric($sensor['device_id']) && ($auth || device_permitted($sensor['device_id']))) {
$device = device_by_id_cache($sensor['device_id']);
$rrd_filename = rrd_name($device['hostname'], array('wireless-sensor', $sensor['sensor_class'], $sensor['sensor_type'], $sensor['sensor_index']));
$rrd_filename = rrd_name($device['hostname'], ['wireless-sensor', $sensor['sensor_class'], $sensor['sensor_type'], $sensor['sensor_index']]);
$title = generate_device_link($device);
$title .= ' :: Wireless Sensor :: '.htmlentities($sensor['sensor_descr']);
$auth = true;
$title = generate_device_link($device);
$title .= ' :: Wireless Sensor :: ' . htmlentities($sensor['sensor_descr']);
$auth = true;
}
}

View File

@@ -22,7 +22,6 @@
* @copyright 2017 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
$scale_min = '0';
//$scale_max = '40';

View File

@@ -1,4 +1,5 @@
<?php
$scale_min = '-175';
$scale_max = '0';

View File

@@ -22,7 +22,6 @@
* @copyright 2019 Jozef Rebjak
* @author Jozef Rebjak <jozefrebjak@icloud.com>
*/
$scale_min = '0';
$unit_long = 'RSRP (dBm)';

View File

@@ -22,7 +22,6 @@
* @copyright 2019 Jozef Rebjak
* @author Jozef Rebjak <jozefrebjak@icloud.com>
*/
$scale_min = '0';
$unit_long = 'RSRQ(dB)';

View File

@@ -22,7 +22,6 @@
* @copyright 2017 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
$scale_min = '0';
//$scale_max = '100';

View File

@@ -22,7 +22,6 @@
* @copyright 2019 Jozef Rebjak
* @author Jozef Rebjak <jozefrebjak@icloud.com>
*/
$scale_min = '0';
$unit_long = 'SINR (dB)';

View File

@@ -22,7 +22,6 @@
* @copyright 2017 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
require 'includes/html/graphs/common.inc.php';
// escape % characters
@@ -35,7 +34,7 @@ if ($unit_long == $sensor['sensor_descr']) {
$col_w = 7 + strlen($unit);
$sensor_descr_fixed = rrdtool_escape($sensor['sensor_descr'], 28);
$rrd_options .= " COMMENT:'". str_pad($unit_long, 35) . str_pad("Cur", $col_w). str_pad("Min", $col_w) . "Max\\n'";
$rrd_options .= " COMMENT:'" . str_pad($unit_long, 35) . str_pad("Cur", $col_w) . str_pad("Min", $col_w) . "Max\\n'";
$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
$num = '%5.2lf'; // default: float
@@ -67,11 +66,11 @@ if (isset($scale_min) && $scale_min >= 0) {
if ($vars['width'] > 300) {
if (is_numeric($sensor['sensor_limit'])) {
$rrd_options .= ' LINE1:'.$sensor['sensor_limit']*$factor.'#cc000060::dashes';
$rrd_options .= ' LINE1:' . $sensor['sensor_limit'] * $factor . '#cc000060::dashes';
}
if (is_numeric($sensor['sensor_limit_low'])) {
$rrd_options .= ' LINE1:'.$sensor['sensor_limit_low']*$factor.'#cc000060::dashes';
$rrd_options .= ' LINE1:' . $sensor['sensor_limit_low'] * $factor . '#cc000060::dashes';
}
}