Apply fixes from StyleCI (#12124)

This commit is contained in:
Jellyfrog
2020-09-21 15:59:34 +02:00
committed by GitHub
parent 0d56bbd946
commit 29f45ca352
816 changed files with 5038 additions and 5038 deletions

View File

@@ -23,10 +23,10 @@ if ($ports == 'all') {
$ports = '';
}
foreach (dbFetchRows("SELECT `device_id`,`hostname` FROM `devices` WHERE `hostname` LIKE ?", ['%' . $hosts . '%']) as $device) {
echo "Found hostname " . $device['hostname'] . ".......\n";
foreach (dbFetchRows("SELECT `port_id`,`ifIndex`,`ifName`,`ifSpeed` FROM `ports` WHERE `ifName` LIKE ? AND `device_id` = ?", ['%' . $ports . '%', $device['device_id']]) as $port) {
echo "Tuning port " . $port['ifName'] . ".......\n";
foreach (dbFetchRows('SELECT `device_id`,`hostname` FROM `devices` WHERE `hostname` LIKE ?', ['%' . $hosts . '%']) as $device) {
echo 'Found hostname ' . $device['hostname'] . ".......\n";
foreach (dbFetchRows('SELECT `port_id`,`ifIndex`,`ifName`,`ifSpeed` FROM `ports` WHERE `ifName` LIKE ? AND `device_id` = ?', ['%' . $ports . '%', $device['device_id']]) as $port) {
echo 'Tuning port ' . $port['ifName'] . ".......\n";
$rrdfile = get_port_rrdfile_path($device['hostname'], $port['port_id']);
Rrd::tune('port', $rrdfile, $port['ifSpeed']);
}