mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
get rid of base_url, part 1 of ...
git-svn-id: http://www.observium.org/svn/observer/trunk@2132 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -22,7 +22,7 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
|
||||
$graphs = $config['os']['default']['over'];
|
||||
}
|
||||
|
||||
$url = $config['base_url']."/device/" . $device['device_id'] . "/" . $linksuffix;
|
||||
$url = "device/" . $device['device_id'] . "/" . $linksuffix;
|
||||
$contents = "<div class=list-large>".$device['hostname'];
|
||||
if ($device['hardware']) { $contents .= " - ".$device['hardware']; }
|
||||
$contents .= "</div>";
|
||||
@@ -41,8 +41,8 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
|
||||
$graphhead = $entry['text'];
|
||||
$contents .= '<div style="width: 708px">';
|
||||
$contents .= '<span style="margin-left: 5px; font-size: 12px; font-weight: bold;">'.$graphhead.'</span><br />';
|
||||
$contents .= '<img src="' . $config['base_url'] . "/graph.php?id=" . $device['device_id'] . "&from=$start&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= '<img src="' . $config['base_url'] . "/graph.php?id=" . $device['device_id'] . "&from=".$config['week']."&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&from=$start&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&from=".$config['week']."&to=$end&width=275&height=100&type=$graph&legend=no" . '" style="margin: 2px;">';
|
||||
$contents .= '</div>';
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ function generate_graph_tag ($args)
|
||||
global $config;
|
||||
|
||||
$sep = "?";
|
||||
$url = $config['base_url'] . "/graph.php";
|
||||
$url = "graph.php";
|
||||
foreach ($args as $key => $arg)
|
||||
{
|
||||
$url .= $sep.$key."=".$arg;
|
||||
@@ -260,7 +260,7 @@ function generate_port_link($args, $text = NULL, $type = NULL)
|
||||
$content .= generate_graph_tag($graph_array);
|
||||
$content .= "</div>";
|
||||
|
||||
$url = $config['base_url']."/device/".$args['device_id']."/port/" . $args['interface_id'] . "/";
|
||||
$url = "device/".$args['device_id']."/port/" . $args['interface_id'] . "/";
|
||||
|
||||
if (port_permitted($args['interface_id'])) {
|
||||
return overlib_link($url, $text, $content, $class);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<script type="text/javascript" src="<?php echo($config['base_url']); ?>/js/tw-sack.js"></script>
|
||||
<script type="text/javascript" src="js/tw-sack.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var ajax = new Array();
|
||||
|
@@ -16,7 +16,7 @@ foreach ($periods as $period)
|
||||
$graph_array_zoom['height'] = "150";
|
||||
$graph_array_zoom['width'] = "400";
|
||||
|
||||
$link = $config['base_url'] . "/graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['now'] . "/";
|
||||
$link = "graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['now'] . "/";
|
||||
|
||||
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
||||
}
|
||||
|
@@ -23,10 +23,10 @@ if ($service['service_checked'])
|
||||
$checked = formatUptime($checked);
|
||||
} else { $checked = "Never"; }
|
||||
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$service['service_id']."&type=service_availability&from=".$day."&to=".$now."&width=80&height=20&bg=efefef";
|
||||
$mini_url = "graph.php?id=".$service['service_id']."&type=service_availability&from=".$day."&to=".$now."&width=80&height=20&bg=efefef";
|
||||
|
||||
$popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$service['service_type'];
|
||||
$popup .= "</div><img src=\'".$config['base_url']."/graph.php?id=" . $service['service_id'] . "&type=service_availability&from=$day&to=$now&width=400&height=125\'>";
|
||||
$popup .= "</div><img src=\'graph.php?id=" . $service['service_id'] . "&type=service_availability&from=$day&to=$now&width=400&height=125\'>";
|
||||
$popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
||||
|
||||
echo("
|
||||
|
Reference in New Issue
Block a user