mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@327 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -7,7 +7,7 @@ if(devicepermitted($_GET['id'])) {
|
||||
$selected['iface'] = "selected";
|
||||
|
||||
if(!$_GET['section']) {
|
||||
$_GET['section'] = "dev-overview";
|
||||
$_GET['section'] = "overview";
|
||||
}
|
||||
$section = mres($_GET['section']);
|
||||
$section = str_replace(".", "", $section);
|
||||
@@ -24,16 +24,16 @@ echo("<div class=mainpane>");
|
||||
|
||||
echo("
|
||||
<ul id='maintab' class='shadetabs'>
|
||||
<li class=" . $select['dev-overview'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-overview' >
|
||||
<li class=" . $select['overview'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/overview/'>
|
||||
<img src='images/16/server_lightning.png' align=absmiddle border=0> Overview
|
||||
</a>
|
||||
</li>");
|
||||
|
||||
if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-vlans'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-vlans' >
|
||||
<li class=" . $select['vlans'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/vlans/'>
|
||||
<img src='images/16/vlans.png' align=absmiddle border=0> VLANs
|
||||
</a>
|
||||
</li>");
|
||||
@@ -41,8 +41,8 @@ if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id =
|
||||
|
||||
if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-vrfs'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-vrfs' >
|
||||
<li class=" . $select['vrfs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/vrfs/'>
|
||||
<img src='images/16/layers.png' align=absmiddle border=0> VRFs
|
||||
</a>
|
||||
</li>");
|
||||
@@ -51,8 +51,8 @@ if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $
|
||||
|
||||
if($config['enable_bgp'] && $device['bgpLocalAs']) {
|
||||
echo("
|
||||
<li class=" . $select['dev-bgp'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-bgp' >
|
||||
<li class=" . $select['bgp'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/bgp/'>
|
||||
<img src='images/16/link.png' align=absmiddle border=0> BGP
|
||||
</a>
|
||||
</li>");
|
||||
@@ -60,20 +60,20 @@ if($config['enable_bgp'] && $device['bgpLocalAs']) {
|
||||
|
||||
if(@mysql_result(mysql_query("select count(interface_id) from interfaces WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-ifs'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-ifs' >
|
||||
<li class=" . $select['ifs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/ifs/'>
|
||||
<img src='images/16/server_link.png' align=absmiddle border=0> Ports
|
||||
</a>
|
||||
</li>
|
||||
<li class=" . $select['dev-ifgraphs'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-ifgraphs'>
|
||||
<li class=" . $select['ifgraphs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/ifgraphs/'>
|
||||
<img src='images/16/chart_curve_link.png' align=absmiddle border=0> Port Graphs
|
||||
</a>
|
||||
</li>");
|
||||
}
|
||||
|
||||
echo("<li class=" . $select['dev-graphs'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-graphs'>
|
||||
echo("<li class=" . $select['graphs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/graphs/'>
|
||||
<img src='images/16/server_chart.png' align=absmiddle border=0> Host Graphs
|
||||
</a>
|
||||
</li>
|
||||
@@ -81,8 +81,8 @@ echo("<li class=" . $select['dev-graphs'] . ">
|
||||
|
||||
if(@mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') {
|
||||
|
||||
echo("<li class=" . $select['dev-entphysical'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-entphysical'>
|
||||
echo("<li class=" . $select['entphysical'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/entphysical/'>
|
||||
<img src='images/16/bricks.png' align=absmiddle border=0> Inventory
|
||||
</a>
|
||||
</li>
|
||||
@@ -93,8 +93,8 @@ if(@mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$
|
||||
|
||||
if(mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-temp'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-temp'>
|
||||
<li class=" . $select['temp'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/temp/'>
|
||||
<img src='images/16/weather_sun.png' align=absmiddle border=0> Temps
|
||||
</a>
|
||||
</li>
|
||||
@@ -103,8 +103,8 @@ if(mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_h
|
||||
|
||||
if(mysql_result(mysql_query("select count(storage_id) from storage WHERE host_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-storage'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-storage'>
|
||||
<li class=" . $select['storage'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/storage/'>
|
||||
<img src='images/16/database.png' align=absmiddle border=0> Storage
|
||||
</a>
|
||||
</li>
|
||||
@@ -114,8 +114,8 @@ if(mysql_result(mysql_query("select count(storage_id) from storage WHERE host_id
|
||||
|
||||
if(mysql_result(mysql_query("select count(service_id) from services WHERE service_host = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-srv'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-srv'>
|
||||
<li class=" . $select['srv'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/srv/'>
|
||||
<img src='images/16/server_cog.png' align=absmiddle border=0> Services
|
||||
</a>
|
||||
</li>
|
||||
@@ -123,15 +123,15 @@ if(mysql_result(mysql_query("select count(service_id) from services WHERE servic
|
||||
}
|
||||
|
||||
echo("
|
||||
<li class=" . $select['dev-events'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-events'>
|
||||
<li class=" . $select['events'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/events/'>
|
||||
<img src='images/16/report_magnify.png' align=absmiddle border=0> Events
|
||||
</a>
|
||||
</li>");
|
||||
|
||||
if($config['enable_syslog']) { echo("
|
||||
<li class=" . $select['dev-syslog'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-syslog'>
|
||||
<li class=" . $select['syslog'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/syslog/'>
|
||||
<img src='images/16/printer.png' align=absmiddle border=0> Syslog
|
||||
</a>
|
||||
</li>
|
||||
@@ -139,8 +139,8 @@ if($config['enable_syslog']) { echo("
|
||||
|
||||
if($_SESSION[userlevel] >= "5") {
|
||||
echo("
|
||||
<li class=" . $select['dev-edit'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-edit'>
|
||||
<li class=" . $select['edit'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/edit/'>
|
||||
<img src='images/16/server_edit.png' align=absmiddle border=0> Settings
|
||||
</a>
|
||||
</li>
|
||||
@@ -152,7 +152,7 @@ echo("</ul>");
|
||||
echo("
|
||||
<div class=contentstyle>");
|
||||
|
||||
include("pages/device/$section.inc");
|
||||
include("pages/device/".mres($section).".inc.php");
|
||||
|
||||
echo("</div>
|
||||
");
|
||||
|
||||
Reference in New Issue
Block a user