Formatting + scrut updates

This commit is contained in:
laf
2015-07-16 16:01:51 +01:00
parent 7eed295897
commit 6ec525c222
4 changed files with 22 additions and 20 deletions

View File

@@ -22,14 +22,14 @@ title = Network Latency Grapher
<?php
foreach (dbFetchRows("SELECT `type` FROM `devices` WHERE `ignore` = 0 AND `disabled` = 0 AND `type` != '' GROUP BY `type`") as $groups) {
echo ("+ " . $groups['type'] . PHP_EOL);
echo ("menu = " . $groups['type'] . PHP_EOL);
echo ("title = " . $groups['type'] . PHP_EOL);
echo '+ ' . $groups['type'] . PHP_EOL;
echo 'menu = ' . $groups['type'] . PHP_EOL;
echo 'title = ' . $groups['type'] . PHP_EOL;
foreach (dbFetchRows("SELECT `hostname` FROM `devices` WHERE `type` = ? AND `ignore` = 0 AND `disabled` = 0", array($groups['type'])) as $devices) {
//Dot needs to be replaced, since smokeping doesn't accept it at this level
echo("++ " . str_replace(".","_",$devices['hostname']) . PHP_EOL);
echo("menu = " . $devices['hostname'] . PHP_EOL);
echo("title = " . $devices['hostname'] . PHP_EOL);
echo("host = " . $devices['hostname'] . PHP_EOL . PHP_EOL);
echo '++ ' . str_replace(".","_",$devices['hostname']) . PHP_EOL;
echo 'menu = ' . $devices['hostname'] . PHP_EOL;
echo 'title = ' . $devices['hostname'] . PHP_EOL;
echo 'host = ' . $devices['hostname'] . PHP_EOL . PHP_EOL;
}
}