fixes to web if

git-svn-id: http://www.observium.org/svn/observer/trunk@2474 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-15 23:05:06 +00:00
parent eb100f841b
commit 0e378161ec
5 changed files with 44 additions and 30 deletions

View File

@@ -15,6 +15,34 @@ body {
line-height: 20px;
}
.rounded-2px {
/* Rounded Corners */
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
}
.rounded-3px {
/* Rounded Corners */
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.rounded-5px {
/* Rounded Corners */
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.rounded-10px {
/* Rounded Corners */
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
.pagemenu-selected {
font-weight: bold;
background-color: #cecece;

View File

@@ -338,28 +338,14 @@ function generate_port_thumbnail($args)
function print_optionbar_start ($height = 0, $width = 0, $marginbottom = 5)
{
echo("
<div style='text-align: center; margin-top: 0px; margin-bottom: ".$marginbottom."px; " . ($width ? 'max-width: ' . $width . (strstr($width,'%') ? '' : 'px') . '; ' : '') . "'>
<b class='rounded'>
<b class='rounded1'><b></b></b>
<b class='rounded2'><b></b></b>
<b class='rounded3'></b>
<b class='rounded4'></b>
<b class='rounded5'></b></b>
<div class='roundedfg' style='padding: 0px 5px;'>
<div style='margin: auto; text-align: left; padding: 2px 5px; padding-left: 11px; clear: both; display:block; " . ($height ? 'height:' . $height . 'px;' : '') . "'>");
<div class='rounded-5px' style='display: block; background: #e5e5e5; text-align: left; margin-top: 0px;
margin-bottom: ".$marginbottom."px; " . ($width ? 'max-width: ' . $width . (strstr($width,'%') ? '' : 'px') . '; ' : '') . "
padding: 7px 14px'>");
}
function print_optionbar_end()
{
echo(' </div>
</div>
<b class="rounded">
<b class="rounded5"></b>
<b class="rounded4"></b>
<b class="rounded3"></b>
<b class="rounded2"><b></b></b>
<b class="rounded1"><b></b></b></b>
</div>');
echo(' </div>');
}
function geteventicon($message)

View File

@@ -44,18 +44,18 @@ if (!$auth)
echo("<div style='margin: 0px 0px 0px 0px'>");
echo("<div style='width: 1200px; margin:10px;'>");
echo("<div style='margin: auto;'>");
$graph_array['from'] = $config['time']['sixhour'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>6 Hour</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/".$graph_array['to']."/'>");
echo(generate_graph_tag($graph_array));
echo(" </a>
</div>");
$graph_array['from'] = $config['time']['day'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>24 Hour</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));
@@ -63,7 +63,7 @@ if (!$auth)
</div>");
$graph_array['from'] = $config['time']['twoday'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>48 Hour</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));
@@ -71,7 +71,7 @@ if (!$auth)
</div>");
$graph_array['from'] = $config['time']['week'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>Week</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));
@@ -79,7 +79,7 @@ if (!$auth)
</div>");
$graph_array['from'] = $config['time']['twoweek'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>Two Week</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));
@@ -87,7 +87,7 @@ if (!$auth)
</div>");
$graph_array['from'] = $config['time']['month'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>Month</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));
@@ -95,7 +95,7 @@ if (!$auth)
</div>");
$graph_array['from'] = $config['time']['twomonth'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>Two Month</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));
@@ -103,7 +103,7 @@ if (!$auth)
</div>");
$graph_array['from'] = $config['time']['year'];
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;'>
echo("<div style='width: ${width}px; margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5; float: left;' class='rounded-3px'>
<span class=device-head>Year</span><br />
<a href='".$config['base_url']."/graphs/$id/$graph_type/".$graph_array['from']."/$to/'>");
echo(generate_graph_tag($graph_array));

View File

@@ -140,7 +140,7 @@ foreach ($menu_options as $option => $text)
<?php
$menu_options = array('bits' => 'Basic',
$menu_options = array('bits' => 'Bits',
'upkts' => 'Unicast Packets',
'nupkts' => 'Non-Unicast Packets',
'errors' => 'Errors');

View File

@@ -22,7 +22,7 @@ foreach (dbFetchRows($query, $param) as $interface)
$graph_type = "port_" . $subformat;
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>
<a href='device/".$device['device_id']."/port/".$interface['interface_id']."/' onmouseover=\"return overlib('\
<a href='device/".$interface['device_id']."/port/".$interface['interface_id']."/' onmouseover=\"return overlib('\
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$interface['ifDescr']."</div>\
<img src=\'graph.php?type=$graph_type&amp;id=".$interface['interface_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=450&amp;height=150&amp;title=yes\'>\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".