From ad222be7f80363fd32add26fecef620d46cd2d29 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Fri, 25 May 2012 17:29:54 +0200 Subject: [PATCH] added node state icon in network list --- htroot/Network.html | 2 +- htroot/Network.java | 1 + htroot/env/grafics/RootStateNo.gif | Bin 0 -> 129 bytes htroot/env/grafics/RootStateYes.gif | Bin 0 -> 130 bytes source/net/yacy/peers/Seed.java | 6 +++++- 5 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 htroot/env/grafics/RootStateNo.gif create mode 100644 htroot/env/grafics/RootStateYes.gif diff --git a/htroot/Network.html b/htroot/Network.html index 5204aef97..e6cfd0f26 100644 --- a/htroot/Network.html +++ b/htroot/Network.html @@ -147,7 +147,7 @@ To see a list of all APIs, please visit the Crawl#(/isCrawling)# #[shortname]# - #(type)##(direct)#Junior passive::Junior direct::Junior offline#(/direct)#::#(direct)#senior passive::Senior direct::Senior offline#(/direct)#::#(direct)#Principal passive::Principal active::Principal offline#(/direct)##(/type)##(acceptcrawl)#no crawl::crawl possible::crawl possible#(/acceptcrawl)##(dhtreceive)#no DHT receive::DHT receive enabled::DHT receive enabled#(/dhtreceive)# + #(type)##(direct)#Junior passive::Junior direct::Junior offline#(/direct)#::#(direct)#senior passive::Senior direct::Senior offline#(/direct)#::#(direct)#Principal passive::Principal active::Principal offline#(/direct)##(/type)##(acceptcrawl)#no crawl::crawl possible::crawl possible#(/acceptcrawl)##(dhtreceive)#no DHT receive::DHT receive enabled::DHT receive enabled#(/dhtreceive)##(nodestate)#no node candidate::node candidate#(/nodestate)# #[version]# #[ppm]# #[qph]# diff --git a/htroot/Network.java b/htroot/Network.java index 9943c3889..9a9163492 100644 --- a/htroot/Network.java +++ b/htroot/Network.java @@ -421,6 +421,7 @@ public class Network { prop.put(STR_TABLE_LIST + conCount + "_dhtreceive", 0); // red/red; offline was off } } + prop.put(STR_TABLE_LIST + conCount + "_nodestate", seed.getFlagRootNode() ? 0 : 1); if (seed.getFlagAcceptRemoteIndex()) { prop.put(STR_TABLE_LIST + conCount + "_dhtreceive_peertags", ""); } else { diff --git a/htroot/env/grafics/RootStateNo.gif b/htroot/env/grafics/RootStateNo.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0eddc09b78d5c96dce78782041ce7f524c70c9b GIT binary patch literal 129 zcmV-{0Dk{RNk%w1VG95Y0P_Gb|NsB)?(W^)-OS9)ySuxps;ZfpnTUvpcXxMYW@c4Y zRYXKYGcz+HA|eqH5dZ)HEC2ui01E&M000CwFrj3KHBurndMC(4JclVJwGxrL>5I!lMcoF(Ea#|p*X&I~b&-8XISi}l^_#VaIPl!bLw RZ_E%{(4&xM>7~SA4FKguC<6ch literal 0 HcmV?d00001 diff --git a/source/net/yacy/peers/Seed.java b/source/net/yacy/peers/Seed.java index 928a89792..a3e1daf49 100644 --- a/source/net/yacy/peers/Seed.java +++ b/source/net/yacy/peers/Seed.java @@ -785,9 +785,13 @@ public class Seed implements Cloneable, Comparable, Comparator return getFlag(2); } + public final boolean getFlagRootNode() { + return getFlag(FLAG_ROOT_NODE); + } + public final void setUnusedFlags() { for ( int i = 4; i < 24; i++ ) { - setFlag(i, true); + setFlag(i, false); } }