diff --git a/htroot/Network.html b/htroot/Network.html index 24007c0d0..f3e42df84 100644 --- a/htroot/Network.html +++ b/htroot/Network.html @@ -141,19 +141,26 @@ To see a list of all APIs, please visit the - - + + + - - + #(active-switch)#:: + :: + :: + + #(/active-switch)# - - + #(active-switch)#:: + :: + :: + + #(/active-switch)# @@ -171,7 +178,7 @@ To see a list of all APIs, please visit the #[potential-links]# - + diff --git a/htroot/Network.java b/htroot/Network.java index 1ac93a285..fff4f8c09 100644 --- a/htroot/Network.java +++ b/htroot/Network.java @@ -153,8 +153,17 @@ public class Network { // overall results: Network statistics if (iAmActive) conCount++; else if (mySeedType.equals(yacySeed.PEERTYPE_JUNIOR)) potCount++; - prop.putNum("table_active-last-week", sb.peers.sizeActiveSince(7 * 1440)); - prop.putNum("table_active-last-day", sb.peers.sizeActiveSince(1440)); + int activeLastMonth = sb.peers.sizeActiveSince(30 * 1440); + int activeLastWeek = sb.peers.sizeActiveSince(7 * 1440); + int activeLastDay = sb.peers.sizeActiveSince(1440); + int activeSwitch = + (activeLastDay <= conCount) ? 0 : + (activeLastWeek <= activeLastDay) ? 1 : + (activeLastMonth <= activeLastWeek) ? 2 : 3; + prop.putNum("table_active-switch", activeSwitch); + prop.putNum("table_active-switch_last-month", activeLastMonth); + prop.putNum("table_active-switch_last-week", activeLastWeek); + prop.putNum("table_active-switch_last-day", activeLastDay); prop.putNum("table_active-count", conCount); prop.putNum("table_active-links", accActLinks); prop.putNum("table_active-words", accActWords); diff --git a/htroot/Network.xml b/htroot/Network.xml index 51b66e30d..2426df5ed 100644 --- a/htroot/Network.xml +++ b/htroot/Network.xml @@ -35,6 +35,13 @@ #{/list}# :: + + #(active-switch)#:: + 00#[last-day]#:: + 0#[last-week]##[last-day]#:: + #[last-month]##[last-week]##[last-day]# + #(/active-switch)# + #[active-count]# #[active-links]#
Online PeersNumber
of Documents
NetworkOnline PeersNumber of
Documents
Indexing Speed:
Pages Per Minute (PPM)
Query Frequency:
Queries Per Hour (QPH)
Last WeekTodayTodayLast WeekTodayLast MonthLast WeekTodayNow
#[active-last-week]##[active-last-day]##[last-day]##[last-week]##[last-day]##[last-month]##[last-week]##[last-day]#Active #[active-count]# #[active-links]#
This PeerThis Peer #[my-LCount]# #[my-ppm]# #[my-qph]#