From 9f292ca8239474a7ac3450b1bc3ea4c9a07c12ca Mon Sep 17 00:00:00 2001 From: Barry Luong Date: Tue, 13 Aug 2002 20:00:37 +0000 Subject: [PATCH] edited host page svn path=/trunk/boinc/; revision=312 --- html/user/db.inc | 49 +++++++++++++++++++++++----------------------- html/user/user.inc | 4 +--- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/html/user/db.inc b/html/user/db.inc index 5baf66b647..30ea37204e 100644 --- a/html/user/db.inc +++ b/html/user/db.inc @@ -60,38 +60,37 @@ function show_app_version($app_version) { } function show_host($host) { - start_table(); - row("ID", $host->id); - row("created", time_str($host->create_time)); - row("user ID", $host->userid); - row("prefs ID", $host->prefsid); - row("RPC seqno", $host->rpc_seqno); - row("RPC time", time_str($host->rpc_time)); - echo "Domain name$host->domain_name\n"; + + echo TABLE2."\n"; + echo "".TD2.LG_FONT."Host Information:\n"; + row("IP address: ", "$host->last_ip_addr
(same the last $host->nsame_ip_addr times)"); + row("Domain name: ", $host->domain_name); $x = $host->timezone/3600; - echo "Time zoneUTC - $x hours\n"; - echo "IP address$host->last_ip_addr
(same the last $host->nsame_ip_addr times)\n"; - echo "On fraction$host->on_frac\n"; - echo "Connected fraction$host->connected_frac\n"; - echo "Active fraction$host->active_frac\n"; - echo "# CPUs$host->p_ncpus\n"; - echo "CPU vendor$host->p_vendor\n"; - echo "CPU model$host->p_model\n"; - echo "OS name$host->os_name\n"; - echo "OS version$host->os_version\n"; + row("Time zone: ", "UTC - $x hours"); + row("Created: ", time_str($host->create_time)); + row("Number of CPUs: ", $host->p_ncpus); + row("CPU: ", "$host->p_vendor $host->p_model"); + row("Operating System: ", "$host->os_name $host->os_version"); $x = $host->m_nbytes/(1024*1024); - echo "Memory$x MB\n"; + row("Memory: ", "$x MB"); $x = $host->m_cache/1024; - echo "Cache$x KB\n"; + row("Cache: ", "$x KB"); $x = $host->m_swap/(1024*1024); - echo "Swap space$x MB\n"; + row("Swap Space: ", "$x MB"); $x = $host->d_total/(1024*1024*1024); - echo "Disk, total$x GB\n"; + row("Total Disk Space: ", "$x GB"); $x = $host->d_free/(1024*1024*1024); - echo "Disk, free$x GB\n"; - echo "Average network bandwidth, upstream$host->n_bwup bytes/sec\n"; - echo "Average network bandwidth, downstream$host->n_bwdown bytes/sec\n"; + row("Free Disk Space: ", "$x GB"); + row("Avg Network Bandwidth:
(upstream)
", "$host->n_bwup bytes/sec"); + row("Avg Network Bandwidth:
(downstream)
", "$host->n_bwdown bytes/sec"); + row("RPC seqno: ", $host->rpc_seqno); + row("RPC time: ", time_str($host->rpc_time)); + row("On fraction: ", $host->on_frac); + row("Connected fraction: ", $host->connected_frac); + row("Active fraction: ", $host->active_frac); echo "\n"; + + } function show_workunit($wu) { diff --git a/html/user/user.inc b/html/user/user.inc index 95d2f2e458..e1bddd464a 100644 --- a/html/user/user.inc +++ b/html/user/user.inc @@ -1,12 +1,10 @@ id"); while ($host = mysql_fetch_object($result)) { - echo "

Host $i:\n"; + echo "

\n"; show_host($host); - $i++; } mysql_free_result($result); }