mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix some broken links since plural to singular, remove some base_url usage while at it
git-svn-id: http://www.observium.org/svn/observer/trunk@2087 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -37,14 +37,14 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
{
|
||||
echo('
|
||||
<li class="' . $select['overview'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/overview/">
|
||||
<a href="device/' . $device['device_id'] . '/overview/">
|
||||
<img src="images/16/server_lightning.png" align="absmiddle" border="0"> Overview
|
||||
</a>
|
||||
</li>');
|
||||
}
|
||||
|
||||
echo('<li class="' . $select['graphs'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/graphs/">
|
||||
<a href="device/' . $device['device_id'] . '/graphs/">
|
||||
<img src="images/16/server_chart.png" align="absmiddle" border="0"> Graphs
|
||||
</a>
|
||||
</li>');
|
||||
@@ -58,7 +58,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($health)
|
||||
{
|
||||
echo('<li class="' . $select['health'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/health/">
|
||||
<a href="device/' . $device['device_id'] . '/health/">
|
||||
<img src="images/icons/sensors.png" align="absmiddle" border="0" /> Health
|
||||
</a>
|
||||
</li>');
|
||||
@@ -67,7 +67,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (@mysql_result(mysql_query("select count(app_id) from applications WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['apps'] . '">
|
||||
<a href="' . $config['base_url'] . '/device/' . $device['device_id'] . '/apps/">
|
||||
<a href="device/' . $device['device_id'] . '/apps/">
|
||||
<img src="images/icons/apps.png" align="absmiddle" border="0" /> Apps
|
||||
</a>
|
||||
</li>');
|
||||
@@ -76,7 +76,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/"))
|
||||
{
|
||||
echo('<li class="' . $select['collectd'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/collectd/">
|
||||
<a href="device/' . $device['device_id'] . '/collectd/">
|
||||
<img src="images/16/chart_line.png" align="absmiddle" border="0" /> CollectD
|
||||
</a>
|
||||
</li>');
|
||||
@@ -85,7 +85,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (@mysql_result(mysql_query("select count(interface_id) from ports WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['ports'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/ports/' .$config['ports_page_default']. '">
|
||||
<a href="device/' . $device['device_id'] . '/ports/' .$config['ports_page_default']. '">
|
||||
<img src="images/16/connect.png" align="absmiddle" border="0" /> Ports
|
||||
</a>
|
||||
</li>');
|
||||
@@ -94,7 +94,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['vlans'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vlans/">
|
||||
<a href="device/' . $device['device_id'] . '/vlans/">
|
||||
<img src="images/16/vlans.png" align="absmiddle" border="0" /> VLANs
|
||||
</a>
|
||||
</li>');
|
||||
@@ -103,7 +103,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (@mysql_result(mysql_query("SELECT COUNT(id) FROM vminfo WHERE device_id = '" . $device["device_id"] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['vm'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vm/">
|
||||
<a href="device/' . $device['device_id'] . '/vm/">
|
||||
<img src="images/16/server_cog.png" align="absmiddle" border="0" /> Virtual Machines
|
||||
</a>
|
||||
</li>');
|
||||
@@ -112,7 +112,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['vrfs'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/">
|
||||
<a href="device/' . $device['device_id'] . '/vrfs/">
|
||||
<img src="images/16/layers.png" align="absmiddle" border="0" /> VRFs
|
||||
</a>
|
||||
</li>');
|
||||
@@ -121,7 +121,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($config['enable_bgp'] && $device['bgpLocalAs'])
|
||||
{
|
||||
echo('<li class="' . $select['bgp'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/bgp/">
|
||||
<a href="device/' . $device['device_id'] . '/bgp/">
|
||||
<img src="images/16/link.png" align="absmiddle" border="0" /> BGP
|
||||
</a>
|
||||
</li>');
|
||||
@@ -133,7 +133,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($cef_count)
|
||||
{
|
||||
echo('<li class="' . $select['cefswitching'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/cefswitching/">
|
||||
<a href="device/' . $device['device_id'] . '/cefswitching/">
|
||||
<img src="images/16/car.png" align="absmiddle" border="0" /> CEF
|
||||
</a>
|
||||
</li>');
|
||||
@@ -142,7 +142,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($_SESSION['userlevel'] >= "5" && mysql_result(mysql_query("SELECT count(*) FROM links AS L, ports AS I WHERE I.device_id = '".$device['device_id']."' AND I.interface_id = L.local_interface_id"),0))
|
||||
{
|
||||
echo('<li class="' . $select['map'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/map/">
|
||||
<a href="device/' . $device['device_id'] . '/map/">
|
||||
<img src="images/16/chart_organisation.png" align="absmiddle" border="0" /> Map
|
||||
</a>
|
||||
</li>');
|
||||
@@ -151,7 +151,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$device['device_id']."'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['entphysical'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/entphysical/">
|
||||
<a href="device/' . $device['device_id'] . '/entphysical/">
|
||||
<img src="images/16/bricks.png" align="absmiddle" border="0" /> Inventory
|
||||
</a>
|
||||
</li>');
|
||||
@@ -159,7 +159,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
elseif (device_permitted($device['device_id']) && $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `hrDevice` WHERE device_id = '".$device['device_id']."'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['hrdevice'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/hrdevice/">
|
||||
<a href="device/' . $device['device_id'] . '/hrdevice/">
|
||||
<img src="images/16/bricks.png" align="absmiddle" border="0" /> Inventory
|
||||
</a>
|
||||
</li>');
|
||||
@@ -168,7 +168,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (mysql_result(mysql_query("select count(service_id) from services WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['srv'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/services/">
|
||||
<a href="device/' . $device['device_id'] . '/services/">
|
||||
<img src="images/icons/services.png" align="absmiddle" border="0" /> Services
|
||||
</a>
|
||||
</li>');
|
||||
@@ -177,7 +177,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (@mysql_result(mysql_query("select count(toner_id) from toner WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['toner'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/toner/">
|
||||
<a href="device/' . $device['device_id'] . '/toner/">
|
||||
<img src="images/icons/toner.png" align="absmiddle" border="0" /> Toner
|
||||
</a>
|
||||
</li>');
|
||||
@@ -186,7 +186,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if (device_permitted($device['device_id']))
|
||||
{
|
||||
echo('<li class="' . $select['events'] . '">
|
||||
<a href="'.$config['base_url']. "/device/" . $device['device_id'] . '/events/">
|
||||
<a href="device/' . $device['device_id'] . '/events/">
|
||||
<img src="images/16/report_magnify.png" align="absmiddle" border="0" /> Events
|
||||
</a>
|
||||
</li>');
|
||||
@@ -195,7 +195,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($config['enable_syslog'])
|
||||
{
|
||||
echo('<li class="' . $select['syslog'] . '">
|
||||
<a href="'.$config['base_url']."/device/" . $device['device_id'] . '/syslog/">
|
||||
<a href="device/' . $device['device_id'] . '/syslog/">
|
||||
<img src="images/16/printer.png" align="absmiddle" border="0" /> Syslog
|
||||
</a>
|
||||
</li>');
|
||||
@@ -214,7 +214,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($device_config_file)
|
||||
{
|
||||
echo('<li class="' . $select['showconfig'] . '">
|
||||
<a href="'.$config['base_url']."/device/" . $device['device_id'] . '/showconfig/">
|
||||
<a href="/device/' . $device['device_id'] . '/showconfig/">
|
||||
<img src="images/16/page_white_text.png" align="absmiddle" border="0" /> Config
|
||||
</a>
|
||||
</li>');
|
||||
@@ -237,7 +237,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($nfsen_rrd_file)
|
||||
{
|
||||
echo('<li class="' . $select['nfsen'] . '">
|
||||
<a href="'.$config['base_url']."/device/" . $device['device_id'] . '/nfsen/">
|
||||
<a href="device/' . $device['device_id'] . '/nfsen/">
|
||||
<img src="images/16/rainbow.png" align="absmiddle" border="0" /> Netflow
|
||||
</a>
|
||||
</li>');
|
||||
@@ -247,7 +247,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
if ($_SESSION['userlevel'] >= "7")
|
||||
{
|
||||
echo('<li class="' . $select['edit'] . '">
|
||||
<a href="'.$config['base_url']."/device/" . $device['device_id'] . '/edit/">
|
||||
<a href="device/' . $device['device_id'] . '/edit/">
|
||||
<img src="images/16/server_edit.png" align="absmiddle" border="0" /> Settings
|
||||
</a>
|
||||
</li>');
|
||||
|
||||
@@ -14,7 +14,7 @@ while ($mempool = mysql_fetch_assoc($mempools))
|
||||
|
||||
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
||||
|
||||
$mempool_url = "device/".$device['device_id']."/health/memory/";
|
||||
$mempool_url = "device/".$device['device_id']."/health/mempool/";
|
||||
$mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
|
||||
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
|
||||
|
||||
@@ -9,7 +9,7 @@ $i = '1';
|
||||
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "'");
|
||||
while ($proc = mysql_fetch_assoc($procs))
|
||||
{
|
||||
$proc_url = "device/".$device['device_id']."/health/processors/";
|
||||
$proc_url = "device/".$device['device_id']."/health/processor/";
|
||||
|
||||
$mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
echo("<table width=100%>");
|
||||
echo('<table width="100%">');
|
||||
|
||||
$hrdevices = mysql_query("SELECT * FROM `hrDevice` WHERE `device_id` = '".$device['device_id']."' ORDER BY `hrDeviceIndex`");
|
||||
|
||||
while ($hrdevice = mysql_fetch_assoc($hrdevices))
|
||||
{
|
||||
|
||||
echo("<tr><td>".$hrdevice['hrDeviceIndex']."</td>");
|
||||
|
||||
if ($hrdevice['hrDeviceType'] == "hrDeviceProcessor")
|
||||
{
|
||||
$proc_id = mysql_result(mysql_query("SELECT processor_id FROM processors WHERE device_id = '".$device['device_id']."' AND hrDeviceIndex = '".$hrdevice['hrDeviceIndex']."'"),0);
|
||||
$proc_url = $config['base_url'] . "/device/".$device['device_id']."/health/processors/";
|
||||
$proc_url = "device/".$device['device_id']."/health/processor/";
|
||||
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$hrdevice['hrDeviceDescr'];
|
||||
$proc_popup .= "</div><img src=\'".$config['base_url']."/graph.php?id=" . $proc_id . "&type=processor_usage&from=$month&to=$now&width=400&height=125\'>";
|
||||
$proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
||||
@@ -28,7 +28,9 @@ while ($hrdevice = mysql_fetch_assoc($hrdevices))
|
||||
$mini_graph = overlib_link($_SERVER['REQUEST_URI'], generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
|
||||
|
||||
echo('<td>'.$mini_graph.'</td>');
|
||||
} elseif ($hrdevice['hrDeviceType'] == "hrDeviceNetwork") {
|
||||
}
|
||||
elseif ($hrdevice['hrDeviceType'] == "hrDeviceNetwork")
|
||||
{
|
||||
$int = str_replace("network interface ", "", $hrdevice['hrDeviceDescr']);
|
||||
$interface = mysql_fetch_assoc(mysql_query("SELECT * FROM ports WHERE device_id = '".$device['device_id']."' AND ifDescr = '".$int."'"));
|
||||
if ($interface['ifIndex'])
|
||||
@@ -58,9 +60,8 @@ while ($hrdevice = mysql_fetch_assoc($hrdevices))
|
||||
echo("<td>".$hrdevice['hrDeviceType']."</td><td>".$hrdevice['hrDeviceStatus']."</td>");
|
||||
echo("<td>".$hrdevice['hrDeviceErrors']."</td><td>".$hrdevice['hrProcessorLoad']."</td>");
|
||||
echo("</tr>");
|
||||
|
||||
}
|
||||
|
||||
echo("</table>");
|
||||
echo('</table>');
|
||||
|
||||
?>
|
||||
@@ -6,7 +6,7 @@ if (mysql_result(mysql_query("SELECT count(*) from mempools WHERE device_id = '"
|
||||
{
|
||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||
echo("<p style='padding: 0px 5px 5px;' class=sectionhead>");
|
||||
echo('<a class="sectionhead" href="device/'.$device['device_id'].'/health/mempools/">');
|
||||
echo('<a class="sectionhead" href="device/'.$device['device_id'].'/health/mempool/">');
|
||||
echo("<img align='absmiddle' src='".$config['base_url']."/images/icons/memory.png'> Memory Pools</a></p>");
|
||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||
$mempool_rows = '0';
|
||||
|
||||
@@ -7,7 +7,7 @@ if (mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id =
|
||||
$processor_rows = 0;
|
||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||
echo("<p style='padding: 0px 5px 5px;' class=sectionhead>");
|
||||
echo('<a class="sectionhead" href="device/'.$device['device_id'].'/health/processors/">');
|
||||
echo('<a class="sectionhead" href="device/'.$device['device_id'].'/health/processor/">');
|
||||
echo("<img align='absmiddle' src='".$config['base_url']."/images/icons/processor.png'> Processors</a></p>");
|
||||
echo("<table width=100% cellspacing=0 cellpadding=5>");
|
||||
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "' ORDER BY processor_descr ASC");
|
||||
|
||||
@@ -29,7 +29,7 @@ foreach ($datas as $texttype)
|
||||
echo("<span class='pagemenu-selected'>");
|
||||
}
|
||||
|
||||
echo('<a href="'.$config['base_url'].'/health/' . $type . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $type_text[$type] ."</a>");
|
||||
echo('<a href="health/' . $type . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $type_text[$type] .'</a>');
|
||||
|
||||
if ($_GET['opta'] == $type) { echo("</span>"); }
|
||||
|
||||
|
||||
@@ -21,11 +21,9 @@ while ($mempool = mysql_fetch_assoc($mempools))
|
||||
{
|
||||
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||
|
||||
$proc_url = "?page=device/".$device['device_id']."/health/memory/";
|
||||
|
||||
$text_descr = $mempool['mempool_descr'];
|
||||
|
||||
$mempool_url = "/device/".$mempool['device_id']."/health/memory/";
|
||||
$mempool_url = "device/".$mempool['device_id']."/health/mempool/";
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
|
||||
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
|
||||
|
||||
@@ -29,7 +29,7 @@ while ($proc = mysql_fetch_assoc($procs))
|
||||
$text_descr = str_replace("Sub-Module", "Module ", $text_descr);
|
||||
$text_descr = str_replace("DFC Card", "DFC", $text_descr);
|
||||
|
||||
$proc_url = "/device/".$device['device_id']."/health/processors/";
|
||||
$proc_url = "device/".$device['device_id']."/health/processor/";
|
||||
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user