mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
html fixies, show rrdtool version on menu
git-svn-id: http://www.observium.org/svn/observer/trunk@3127 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -82,7 +82,7 @@ if ($_SESSION['userlevel'] >= '10')
|
||||
|
||||
</div>
|
||||
|
||||
<div id="devices_chart" class="col_3" style="height: 300px";>
|
||||
<div id="devices_chart" class="col_3" style="height: 300px">
|
||||
</div>
|
||||
|
||||
<script class="code" type="text/javascript">
|
||||
@@ -149,7 +149,7 @@ if ($_SESSION['userlevel'] >= '10')
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="services_chart" class="col_3" style="height: 300px";>
|
||||
<div id="services_chart" class="col_3" style="height: 300px">
|
||||
</div>
|
||||
|
||||
<script class="code" type="text/javascript">
|
||||
@@ -282,7 +282,7 @@ if ($deleted_ports) { echo('<li><a href="deleted-ports/"><img src="images/16/cro
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="ports_chart" class="col_3" style="height: 300px";>
|
||||
<div id="ports_chart" class="col_3" style="height: 300px">
|
||||
</div>
|
||||
|
||||
<script class="code" type="text/javascript">
|
||||
@@ -572,18 +572,17 @@ $apache_version = str_replace("Apache/", "", $_SERVER['SERVER_SOFTWARE']);
|
||||
$php_version = phpversion();
|
||||
$mysql_version = dbFetchCell("SELECT version()");
|
||||
$netsnmp_version = shell_exec($config['snmpget'] . " --version");
|
||||
$rrdtool_version = implode(" ",array_slice(explode(" ",shell_exec($config['rrdtool'] . " --version |head -n1")),1,1));
|
||||
?>
|
||||
|
||||
<div class="col_2">
|
||||
<h2>Versions</h2>
|
||||
<p>
|
||||
<?php echo(" <table width=100% cellpadding=3 cellspacing=0 border=0>
|
||||
<tr valign=top><td><b>Apache</b></td><td>$apache_version</td></tr>
|
||||
<tr valign=top><td><b>PHP</b></td><td>$php_version</td></tr>
|
||||
<tr valign=top><td><b>MySQL</b></td><td>$mysql_version</td></tr>
|
||||
</table>");
|
||||
?>
|
||||
</p>
|
||||
<table width=100% cellpadding=3 cellspacing=0 border=0>
|
||||
<tr valign=top><td><b>Apache</b></td><td><?php echo($apache_version); ?></td></tr>
|
||||
<tr valign=top><td><b>PHP</b></td><td><?php echo($php_version); ?></td></tr>
|
||||
<tr valign=top><td><b>MySQL</b></td><td><?php echo($mysql_version); ?></td></tr>
|
||||
<tr valign=top><td><b>RRDtool</b></td><td><?php echo($rrdtool_version); ?></td></tr>
|
||||
</table>
|
||||
<ul>
|
||||
<li><a href="about/"><img src="images/16/information.png" border="0" align="absmiddle" /> About Observium</a></li>
|
||||
</ul>
|
||||
@@ -593,7 +592,8 @@ $netsnmp_version = shell_exec($config['snmpget'] . " --version");
|
||||
<h2>Users</h2>
|
||||
<ul>
|
||||
|
||||
<?php if ($_SESSION['userlevel'] >= '10') {
|
||||
<?php if ($_SESSION['userlevel'] >= '10')
|
||||
{
|
||||
if (auth_usermanagement())
|
||||
{
|
||||
echo('
|
||||
|
||||
+5
-8
@@ -143,10 +143,9 @@ if ($config['page_refresh']) { echo(' <meta http-equiv="refresh" content="'.$co
|
||||
<link href="<?php echo($config['stylesheet']); ?>" rel="stylesheet" type="text/css" />
|
||||
<link rel="shortcut icon" href="<?php echo($config['favicon']); ?>" />
|
||||
<link rel="stylesheet" href="css/mktree.css" type="text/css" />
|
||||
|
||||
<?php
|
||||
if ($_SESSION['widescreen']) { echo('<link rel="stylesheet" href="css/styles-wide.css" type="text/css" />'); }
|
||||
?>
|
||||
<?php
|
||||
if ($_SESSION['widescreen']) { echo('<link rel="stylesheet" href="css/styles-wide.css" type="text/css" />'); }
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="js/mktree.js"></script>
|
||||
@@ -154,10 +153,8 @@ if ($config['page_refresh']) { echo(' <meta http-equiv="refresh" content="'.$co
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-checkbox.js"></script>
|
||||
<script type="text/javascript" src="js/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>
|
||||
<?php /* html5.js below from http://html5shim.googlecode.com/svn/trunk/html5.js */ ?>
|
||||
<!--[if IE]>
|
||||
<script src="js/html5.js"></script>
|
||||
<![endif]-->
|
||||
<?php /* html5.js below from http://html5shim.googlecode.com/svn/trunk/html5.js */ ?>
|
||||
<!--[if IE]><script src="js/html5.js"></script><![endif]-->
|
||||
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="js/jqplot/excanvas.js"></script><![endif]-->
|
||||
<script language="javascript" type="text/javascript" src="js/jqplot/jquery.jqplot.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="js/jqplot/jquery.jqplot.min.css" />
|
||||
|
||||
@@ -134,7 +134,7 @@ foreach (dbFetch('SELECT `type` FROM `devices` AS D WHERE 1 GROUP BY `type` ORDE
|
||||
<a href="<?php echo(generate_url($vars)); ?>" title="Update the browser URL to reflect the search criteria." >Update URL</a> |
|
||||
<a href="<?php echo(generate_url(array('page' => 'devices', 'section' => $vars['section'], 'bare' => $vars['bare']))); ?>" title="Reset critera to default." >Reset</a>
|
||||
<br />
|
||||
<input class="submit" type="submit" class="submit" value="Search">
|
||||
<input type="submit" class="submit" value="Search">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -13,14 +13,13 @@ function poll_sensor($device, $class, $unit)
|
||||
for ($i = 0;$i < 5;$i++) # Try 5 times to get a valid temp reading
|
||||
{
|
||||
if ($debug) echo("Attempt $i ");
|
||||
$sensor_value = snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB");
|
||||
$sensor_value = trim(str_replace("\"", "", $sensor_value));
|
||||
$sensor_value = trim(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB")));
|
||||
|
||||
if ($sensor_value < 9000) break; # TME sometimes sends 999.9 when it is right in the middle of an update;
|
||||
sleep(1); # Give the TME some time to reset
|
||||
}
|
||||
} else {
|
||||
$sensor_value = snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB");
|
||||
$sensor_value = trim(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB")));
|
||||
}
|
||||
|
||||
if ($sensor_value == -32768) { echo("Invalid (-32768) "); $sensor_value = 0; }
|
||||
|
||||
Reference in New Issue
Block a user