% unless ($ok) {
<H3>Map data missing</h3>

Have you run <B><TT>netdisco -g</TT></B> yet?
<P>
netmap.gif : <% $have_gif ? "OK" : "unaccessible" %>.<BR>
netmap.map : <% $have_map ? "OK" : $! %>.
<P>
You can also do this from the <A HREF="admin.html">Admin Panel</A> if you have
administrative rights.
%#
% } else {
%#
%#
<MAP NAME="netmap">
% foreach my $line (@map){
    <%$line%>
% }
</MAP>
<IMG SRC="netmap.gif" ISMAP USEMAP="#netmap" BORDER=0>
<BR>Map Data is <%$map_days%> days old.
% }
<h4>Key</h4>
<TABLE BORDER=0>
<TR>
    <TD bgcolor="black"><font color="yellow">[</font><font color="white">dev</font><font color="yellow">]</font></TD>
    <TD>Yellow Border - ResNet</TD>
    <TD BGCOLOR="black"><font color="green">--------</font></TD>
    <TD>Green Lines - WAN</TD>
</TR>
<TR>
    <TD bgcolor="black"><font color="blue">[cat]</font></TD>
    <TD>Blue Box - Catalyst Device</TD>
    <TD BGCOLOR="black"><font color="#f5deb3">-------</font></TD>
    <TD>Thin lines - 10Mbps</TD>
</TR>
<TR>
    <TD bgcolor="black"><font color="green">[dev-g]</font></TD>
    <TD>Green Box - Gateway / Router</TD>
    <TD BGCOLOR="black"><font color="#f5deb3">=====</font></TD>
    <TD>Thick Lines - 100Mbps</TD>
</TR>
<TR>
    <TD bgcolor="black"><font color="red">[bad-dev]</font></TD>
    <TD>Red Box - Device unaccessable</TD>
    <TD BGCOLOR="black"><font color="cyan">=====</font></TD>
    <TD>Cyan Lines - 1.0 Gpbs</TD>
</TR>
</TABLE>
<%init>
my $comp = $m->current_comp;
my $dir  = $comp->source_dir;
my $have_map = open (MAP, "< $dir/netmap.map");
my (@map, $map_age, $secs_per_day, $map_days);

my $have_gif = -r "$dir/netmap.gif";

my $ok = ($have_map && $have_gif);

if ($ok){ 
    @map = (<MAP>);
    close (MAP);
    $map_age = (stat("$dir/netmap.gif"))[9];
    $map_age = time - $map_age;
    $secs_per_day = 60*60*24;
    $map_days = sprintf("%-2.2f", $map_age/$secs_per_day);
}
</%init>
<%method title>
- Network Map UCSC \
</%method>
%# $Id: netmap.html,v 1.5 2004/11/15 21:33:17 maxbaker Exp $
%# vim:syntax=mason
