|
From: <il...@pr...> - 2005-02-16 11:18:17
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25181/www/db2 Modified Files: index.php map4b.php submit.php view-netloc.inc.php Log Message: Added a status column to netloc, to allow people that have a pressing desire to record interfaces that aren't yet working to do so without them appearing on the network maps. Index: index.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- index.php 28 Jul 2004 07:43:01 -0000 1.11 +++ index.php 16 Feb 2005 11:17:32 -0000 1.12 @@ -59,7 +59,10 @@ else printf("are $nentries nodes"); ?> and <? - $result = mysql_query("SELECT count(*) from netloc where active", $db) + $result = mysql_query("SELECT count(*) + FROM netloc + WHERE status == 'full' + AND active", $db) or die(mysql_error($db)); $row = mysql_fetch_row($result); $nentries = intval($row[0]); Index: map4b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map4b.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- map4b.php 16 Feb 2005 10:52:46 -0000 1.5 +++ map4b.php 16 Feb 2005 11:17:33 -0000 1.6 @@ -105,6 +105,8 @@ ." AND" ." peerid is null" ." AND" + ." netloc.status = 'full'" + ." AND" ." n>".($n-$Dn)." AND n<".($n+$Dn) ." AND" ." e>".($e-$De)." AND e<".($e+$De) @@ -162,6 +164,8 @@ ." AND p2.e>".($e-$De)." AND p2.e<".($e+$De).")" .")" ." AND" + ." netloc.status = 'full'" + ." AND" ." to_days(now()) - to_days(a1.updated) <= ".$PREF["maxnodeage"] ." AND" ." to_days(now()) - to_days(a2.updated) <= ".$PREF["maxnodeage"] Index: submit.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/submit.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- submit.php 3 Feb 2005 10:30:57 -0000 1.15 +++ submit.php 16 Feb 2005 11:17:33 -0000 1.16 @@ -442,7 +442,7 @@ } else $newvals = $netloc; $s = setexp($newvals, $oldnetloc, $changes, - $strs = "mac family address comment", + $strs = "mac family address comment status", $ints = "peerid active", $dbls = "", $pfx = "$ifname."); Index: view-netloc.inc.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view-netloc.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- view-netloc.inc.php 5 Aug 2004 08:04:43 -0000 1.4 +++ view-netloc.inc.php 16 Feb 2005 11:17:33 -0000 1.5 @@ -4,13 +4,25 @@ <tr> <th>Peer ID:</th> <td><?=valnodeid("netloc[$ifname.peerid]")?></td> - <?=edithelp("Node ID (or name) of other end of link.<br>(Leave blank if your interface is a base station)")?> + <?=edithelp("Node ID (or name) of other end of link.<br>(Leave blank if your interface is a base station, otherwise it <strong>must</strong> be filled in)")?> +</tr> + +<tr> + <th>Interface status:</th> + <td><?=selectval("netloc[$ifname.status]", + array( + "full" => "Fully operational", + "test" => "In testing", + "build" => "Building", + "gather" => "Gathering components", + ))?></td> + <?=edithelp("")?> </tr> <tr> <th>Active:</th> <td><?=valyesno("netloc[$ifname.active]")?></td> - <?=edithelp("Set to Yes if interface is active")?> + <?=edithelp("Set to Yes if interface is currently active (powered up and radiating)")?> </tr> <tr> @@ -149,6 +161,7 @@ <? if ($GLOBALS["EDITNETLOC"]) { $GLOBALS["netloc"]["NEW.family"] = "INET6"; $GLOBALS["config"]["NEW.protocol"] = "802.11b"; + $GLOBALS["netloc"]["NEW.status"] = "gather"; ?> <tr> |