fix overview page a bit

git-svn-id: http://www.observium.org/svn/observer/trunk@33 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-04-03 19:39:28 +00:00
parent f91180fe7c
commit feba48f69e
2 changed files with 10 additions and 16 deletions

View File

@@ -42,7 +42,7 @@ echo("<p class=sectionhead>Recent Events</p><div style='height: 5px;'></div>
while($entry = mysql_fetch_array($data)) {
include("includes/print-event.inc");
include("includes/print-event-short.inc");
}
echo("</table></div>");
@@ -68,15 +68,10 @@ echo("
$sql = "SELECT * FROM interfaces WHERE host = '$id'";
$query = mysql_query($sql);
while($data = mysql_fetch_array($query)) {
$up_admin = $data['up_admin'];
$up = $data['up'];
if ($up_admin == "down") { $status = "grey"; }
if ($up_admin == "up" && $up == "down") { $status = "red"; }
if ($up_admin == "up" && $up == "up") { $status = "blue"; }
echo("$ifbreak<a class=$status>" . generateiflink($data, makeshortif(strtolower($data['if']))) . "</a>");
$ifbreak = ", ";
echo("$ifsep" . generateiflink($data, makeshortif(strtolower($data['if']))));
$ifsep = ", ";
}
unset($break);
unset($ifsep);
echo("</div>");
echo("</div>");

View File

@@ -14,18 +14,17 @@ if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
echo("<tr style=\"background-color: $bg\">
<td width=0></td>
<td class=syslog width=130>
<td class=syslog width=140>
$entry[humandate]
</td>");
$if['id'] = $entry[interface];
$if['if'] = $interface;
echo("<td class=list-bold>
$if['if'] = makeshortif($interface);
echo("<td class=list-bold width=75>
" . generateiflink($if) . "
</td>
<td width=30 align=center>$icon</td>
<td class=syslog>
$entry[message]
</td>
<td class=syslog>" .
truncate($entry[message], 45)
. "</td>
<td></td>
</tr>");