remove almost all base_url

git-svn-id: http://www.observium.org/svn/observer/trunk@2648 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-10-05 10:55:10 +00:00
parent 42d43c47e5
commit b6e7b4ef7a
11 changed files with 20 additions and 29 deletions

View File

@@ -5,7 +5,7 @@ $sensors = dbFetchRows("SELECT * FROM `sensors` WHERE `sensor_class` = ? AND dev
if (count($sensors))
{
echo('<div style="background-color: #eeeeee; margin: 5px; padding: 5px;">');
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=' . strtolower($sensor_type) . '/"><img align="absmiddle" src="'.$config['base_url'].'/images/icons/' . strtolower($sensor_type) . '.png"> ' . $sensor_type . '</a></p>');
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/device='.$device['device_id'].'/tab=health/metric=' . strtolower($sensor_type) . '/"><img align="absmiddle" src="images/icons/' . strtolower($sensor_type) . '.png"> ' . $sensor_type . '</a></p>');
$i = '0';
echo('<table width="100%" valign="top">');
foreach ($sensors as $sensor)

View File

@@ -9,7 +9,7 @@ if (count($mempools))
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['device_id'].'/tab=health/metric=mempool/">');
echo("<img align='absmiddle' src='".$config['base_url']."/images/icons/memory.png'> Memory Pools</a></p>");
echo("<img align='absmiddle' src='images/icons/memory.png'> Memory Pools</a></p>");
echo("<table width=100% cellspacing=0 cellpadding=5>");
$mempool_rows = '0';

View File

@@ -10,7 +10,7 @@ if (count($processors))
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['device_id'].'/tab=health/metric=processor/">');
echo("<img align='absmiddle' src='".$config['base_url']."/images/icons/processor.png'> Processors</a></p>");
echo("<img align='absmiddle' src='images/icons/processor.png'> Processors</a></p>");
echo("<table width=100% cellspacing=0 cellpadding=5>");
foreach ($processors as $proc)

View File

@@ -9,7 +9,7 @@ if (count($drives))
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['device_id'].'/tab=health/metric=storage/">');
echo("<img align='absmiddle' src='".$config['base_url']."/images/icons/storage.png'> Storage</a></p>");
echo("<img align='absmiddle' src='images/icons/storage.png'> Storage</a></p>");
echo("<table width=100% cellspacing=0 cellpadding=5>");
$drive_rows = '0';

View File

@@ -116,22 +116,23 @@ if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE interface_id = '".$port['i
{
### FIXME ATM VPs
### FIXME URLs BROKEN
echo(" | ATM VPs : ");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo("<span class='pagemenu-selected'>"); }
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$port['interface_id']."/junose-atm-vp/bits/'>Bits</a>");
echo("<a href='/device/device=" . $device['device_id'] . "/tab=port/port=".$port['interface_id']."/junose-atm-vp/bits/'>Bits</a>");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo("</span>"); }
echo(" | ");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "packets") { echo("<span class='pagemenu-selected'>"); }
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$port['interface_id']."/junose-atm-vp/packets/'>Packets</a>");
echo("<a href='device/device=" . $device['device_id'] . "/tab=port/port=".$port['interface_id']."/junose-atm-vp/packets/'>Packets</a>");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo("</span>"); }
echo(" | ");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "cells") { echo("<span class='pagemenu-selected'>"); }
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$port['interface_id']."/junose-atm-vp/cells/'>Cells</a>");
echo("<a href='device/device=" . $device['device_id'] . "/tab=port/port=".$port['interface_id']."/junose-atm-vp/cells/'>Cells</a>");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo("</span>"); }
echo(" | ");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "errors") { echo("<span class='pagemenu-selected'>"); }
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/port/".$port['interface_id']."/junose-atm-vp/errors/'>Errors</a>");
echo("<a href='device/device=" . $device['device_id'] . "/tab=port/port=".$port['interface_id']."/junose-atm-vp/errors/'>Errors</a>");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo("</span>"); }
}

View File

@@ -6,17 +6,17 @@ global $config;
if (!$graph_type) { $graph_type = "pagp_bits"; }
$daily_traffic = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$day&amp;to=$now&amp;width=215&amp;height=100";
$daily_url = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150";
$daily_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$day&amp;to=$now&amp;width=215&amp;height=100";
$daily_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$day&amp;to=$now&amp;width=500&amp;height=150";
$weekly_traffic = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$week&amp;to=$now&amp;width=215&amp;height=100";
$weekly_url = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$week&amp;to=$now&amp;width=500&amp;height=150";
$weekly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$week&amp;to=$now&amp;width=215&amp;height=100";
$weekly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$week&amp;to=$now&amp;width=500&amp;height=150";
$monthly_traffic = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$month&amp;to=$now&amp;width=215&amp;height=100";
$monthly_url = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$month&amp;to=$now&amp;width=500&amp;height=150";
$monthly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$month&amp;to=$now&amp;width=215&amp;height=100";
$monthly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$month&amp;to=$now&amp;width=500&amp;height=150";
$yearly_traffic = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$year&amp;to=$now&amp;width=215&amp;height=100";
$yearly_url = $config['base_url'] . "/graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$year&amp;to=$now&amp;width=500&amp;height=150";
$yearly_traffic = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$year&amp;to=$now&amp;width=215&amp;height=100";
$yearly_url = "graph.php?port=" . $port['interface_id'] . "&amp;type=$graph_type&amp;from=$year&amp;to=$now&amp;width=500&amp;height=150";
echo("<a href='#' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
<img src='$daily_traffic' border=0></a> ");

View File

@@ -34,11 +34,6 @@ foreach ($graph_types as $type => $descr)
echo('<a href="device/' . $device['device_id'] . '/routing/ipsec_tunnels/graphs/'.$type.'/">'.$descr.'</a>');
if ($_GET['opte'] == $type) { echo("</span>"); }
# echo('(');
# if ($_GET['opte'] == $type) { echo("<span class='pagemenu-selected'>"); }
# echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/ipsec_tunnelss/'.$type.'/thumbs/">Mini</a>');
# if ($_GET['opte'] == $type) { echo("</span>"); }
# echo(')');
$type_sep = " | ";
}

View File

@@ -45,11 +45,6 @@ foreach ($graph_types as $type => $descr)
echo(generate_link($descr, $link_array,array('view'=>'graphs','graph'=>$type)));
if ($vars['graph'] == $type) { echo("</span>"); }
# echo('(');
# if ($vars['view'] == $type) { echo("<span class='pagemenu-selected'>"); }
# echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/'.$type.'/thumbs/">Mini</a>');
# if ($vars['view'] == $type) { echo("</span>"); }
# echo(')');
$type_sep = " | ";
}

View File

@@ -15,7 +15,7 @@ foreach ($menu_options as $option => $text)
{
echo("<span class='pagemenu-selected'>");
}
echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/services/' . $option . ($_GET['optd'] ? '/' . $_GET['optd'] : ''). '/">' . $text . '</a>');
echo('<a href="device/' . $device['device_id'] . '/services/' . $option . ($_GET['optd'] ? '/' . $_GET['optd'] : ''). '/">' . $text . '</a>');
if ($_GET['optc'] == $option)
{
echo("</span>");

View File

@@ -23,7 +23,7 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi
$text_descr = $mempool['mempool_descr'];
$mempool_url = "device/device=".$mempool['device_id']."/tab=health/metric=mempool/";
$mini_url = $config['base_url'] . "/graph.php?id=".$mempool['mempool_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mini_url = "graph.php?id=".$mempool['mempool_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";

View File

@@ -30,7 +30,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
$proc_url = "device/".$device['device_id']."/health/processor/";
$mini_url = $config['base_url'] . "/graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$mini_url = "graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=f4f4f4";
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$month&amp;to=$now&amp;width=400&amp;height=125\'>";