Changeset 224
- Timestamp:
- 09/02/04 11:19:57 (9 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 3 added
- 5 modified
-
ChangeLog (modified) (1 diff)
-
sql/wifidog-postgres-schema.sql (modified) (1 diff)
-
wifidog/classes/AbstractDbPostgres.php (modified) (1 diff)
-
wifidog/images (added)
-
wifidog/images/hotspot_status_down.png (added)
-
wifidog/images/hotspot_status_up.png (added)
-
wifidog/index.php (modified) (1 diff)
-
wifidog/node_list.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r223 r224 1 1 # $Header$ 2 2004-09-02 Benoit Gr�goire <bock@step.polymtl.ca> 3 * wifidog/node_list.php: Complete the status page 4 * Add images 5 * Add hotspot creation date 6 2 7 2004-08-31 Benoit Gr�goire <bock@step.polymtl.ca> 3 8 * sql/: Update the postgres schemas and add scripts to ease maintaining it. -
trunk/wifidog-auth/sql/wifidog-postgres-schema.sql
r223 r224 85 85 rss_url text, 86 86 last_heartbeat_ip character varying(16), 87 last_heartbeat_timestamp timestamp without time zone 87 last_heartbeat_timestamp timestamp without time zone DEFAULT now(), 88 creation_date date DEFAULT now() 88 89 ); 89 90 -
trunk/wifidog-auth/wifidog/classes/AbstractDbPostgres.php
r206 r224 360 360 { 361 361 $sql = "SELECT EXTRACT (year FROM INTERVAL '$intervalstr') AS years, EXTRACT (month FROM INTERVAL '$intervalstr') AS months, EXTRACT (day FROM INTERVAL '$intervalstr') AS days, EXTRACT (hour FROM INTERVAL '$intervalstr') AS hours, EXTRACT (minutes FROM INTERVAL '$intervalstr') AS minutes, EXTRACT (seconds FROM INTERVAL '$intervalstr') AS seconds"; 362 $this -> Exec uterSqlResUnique($sql, $retval, false);362 $this -> ExecSqlUniqueRes($sql, $retval, false); 363 363 } 364 364 return $retval; -
trunk/wifidog-auth/wifidog/index.php
r216 r224 46 46 echo "<ul>\n"; 47 47 echo "<li><a href='node_list.php'>List network nodes</a></li>\n"; 48 echo "<li><a href='".BASE_SSL_PATH."login/index.php?gw_id=default&gw_address=127.0.0.1&gw_port=80'>Login (demo)</a></li>\n";49 echo "<li><a href='./portal/index.php?gw_id=default'>Portal (demo)</a></li>\n";50 48 echo "<li><a href='./user_management/index.php'>Personal user management</a></li>\n"; 51 49 echo "<li><a href='".BASE_SSL_PATH."admin/index.php'>Administration</a></li>\n"; -
trunk/wifidog-auth/wifidog/node_list.php
r222 r224 27 27 require_once BASEPATH.'include/common.php'; 28 28 require_once BASEPATH.'classes/Style.php'; 29 require_once (BASEPATH.'include/user_management_menu.php'); 29 30 30 31 $style = new Style(); … … 36 37 echo "<h1>". HOTSPOT_NETWORK_NAME ." node list</h1>\n"; 37 38 38 $row = null; 39 $db->ExecSqlUniqueRes("SELECT node_id, name, NOW()-last_heartbeat_timestamp AS last_heartbeat, last_heartbeat_ip FROM nodes ORDER BY node_id",$row, true); 39 40 $db->ExecSql("SELECT node_id, name, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, last_heartbeat_ip, 41 CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up, creation_date FROM nodes ORDER BY node_id",$node_results, false); 42 echo "<table class='spreadsheet'>\n"; 43 echo "<thead><tr class='spreadsheet'><th class='spreadsheet' colspan=5>Status of all nodes of the ".HOTSPOT_NETWORK_NAME." network</th></tr>\n"; 44 echo "<tr class='spreadsheet'><th class='spreadsheet'>Status</th>\n"; 45 echo "<th class='spreadsheet'>Id</th>\n"; 46 echo "<th class='spreadsheet'>Name</th>\n"; 47 echo "<th class='spreadsheet'>Local content demo</th>\n"; 48 echo "<th class='spreadsheet'>Opened on</th>\n"; 49 echo "</tr></thead\n"; 50 foreach($node_results as $node_row) 51 { 52 echo "<tr class='spreadsheet'>\n"; 53 echo "<td class='spreadsheet'>\n"; 54 if($node_row['is_up']=='t') 55 { 56 echo "<img src='".BASE_URL_PATH . "images/hotspot_status_up.png'>"; 57 } 58 else 59 { 60 echo "<img src='".BASE_URL_PATH . "images/hotspot_status_down.png'>"; 61 $duration = $db->GetDurationArrayFromIntervalStr($node_row['since_last_heartbeat']); 62 echo $duration['days'].'days '.$duration['hours'].'h '.$duration['minutes'].'min'; 63 } 64 echo "</td>\n"; 65 echo "<td class='spreadsheet'>$node_row[node_id]</td>\n"; 66 echo "<td class='spreadsheet'>$node_row[name]</td>\n"; 67 echo "<td class='spreadsheet'>\n"; 68 echo "<a href='".BASE_SSL_PATH."login/index.php?gw_id=$node_row[node_id]&gw_address=127.0.0.1&gw_port=80'>Login page</a><br />\n"; 69 echo "<a href='".BASE_URL_PATH."portal/index.php?gw_id=$node_row[node_id]'>Portal page</a>\n"; 70 echo "</td>\n"; 71 echo "<td class='spreadsheet'>$node_row[creation_date]</td>\n"; 72 echo "</tr>\n"; 73 } 74 echo "</table>\n"; 40 75 41 76 echo "</div>\n"; 42 77 echo "<div id='navLeft'>\n"; 78 echo get_user_management_menu(); 79 echo "</div>\n"; 43 80 echo $style->GetFooter(); 44 81 ?>
