mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
moar dynamic health page build
git-svn-id: http://www.observium.org/svn/observer/trunk@2127 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+10
-16
@@ -9,6 +9,7 @@ if ($used_sensors['frequency']) $datas[] = 'frequency';
|
||||
if ($used_sensors['current']) $datas[] = 'current';
|
||||
if ($used_sensors['power']) $datas[] = 'power';
|
||||
|
||||
# FIXME generalize -> static-config ?
|
||||
$type_text['overview'] = "Overview";
|
||||
$type_text['temperature'] = "Temperature";
|
||||
$type_text['humidity'] = "Humidity";
|
||||
@@ -78,23 +79,16 @@ echo('</div>');
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
switch ($_GET['opta'])
|
||||
if (in_array($_GET['opta'],array_keys($used_sensors))
|
||||
|| $_GET['opta'] == 'processor'
|
||||
|| $_GET['opta'] == 'storage'
|
||||
|| $_GET['opta'] == 'mempool')
|
||||
{
|
||||
case 'processor':
|
||||
case 'mempool':
|
||||
case 'storage':
|
||||
case 'temperature':
|
||||
case 'humidity':
|
||||
case 'voltage':
|
||||
case 'fanspeed':
|
||||
case 'frequency':
|
||||
case 'current':
|
||||
case 'power':
|
||||
include('pages/health/'.$_GET['opta'].'.inc.php');
|
||||
break;
|
||||
default:
|
||||
include('pages/health/temperature.inc.php'); # FIXME perhaps an error message instead?
|
||||
break;
|
||||
include('pages/health/'.$_GET['opta'].'.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo("No sensors of type " . $_GET['opta'] . " found.");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user