diff --git a/htroot/Status.html b/htroot/Status.html index c57702004..f1f1fc190 100644 --- a/htroot/Status.html +++ b/htroot/Status.html @@ -3,8 +3,21 @@ YaCy '#[clientname]#': Console Status #%env/templates/metas.template%# + - + #%env/templates/header.template%# #%env/templates/submenuConfig.template%# diff --git a/htroot/processing/domaingraph/applet/domaingraph.jar b/htroot/processing/domaingraph/applet/domaingraph.jar index db614ad8f..b3d7de50c 100755 Binary files a/htroot/processing/domaingraph/applet/domaingraph.jar and b/htroot/processing/domaingraph/applet/domaingraph.jar differ diff --git a/htroot/processing/domaingraph/applet/domaingraph.java b/htroot/processing/domaingraph/applet/domaingraph.java index 4443793f7..a8a8b588e 100755 --- a/htroot/processing/domaingraph/applet/domaingraph.java +++ b/htroot/processing/domaingraph/applet/domaingraph.java @@ -42,7 +42,7 @@ public void setup() { size(660, 400); smooth(); - frameRate( 12 ); + frameRate( 6 ); strokeWeight( 1 ); ellipseMode( CENTER ); @@ -78,10 +78,11 @@ public void initializePhysics() { } public void draw() { - processRequestResponse(20); + processRequestResponse(50); physics.tick( 1.0f ); HashSet invisible = invisibleParticles(); + deleteParticles(invisible); if (physics.numberOfParticles() > 1) updateCentroid(invisible); centroid.tick(); @@ -90,7 +91,7 @@ public void draw() { scale( centroid.z() ); translate( -centroid.x(), -centroid.y() ); - drawNetwork(invisible); + drawNetwork(); } public void initRequest(boolean update) { @@ -153,6 +154,7 @@ public void processCitation(HashMap props) { } h.time = System.currentTimeMillis(); host p = (host) nodes.get(parsingHostID); // this should be successful + if (p == null) return; // prevent that a spring is made twice for ( int i = 0; i < physics.numberOfSprings(); ++i ) { Spring e = physics.getSpring(i); @@ -209,7 +211,19 @@ public HashSet invisibleParticles() { return particles; } -public void drawNetwork(HashSet invisible) { +public void deleteParticles(HashSet particles) { + Iterator j = nodes.values().iterator(); + host h; + while (j.hasNext()) { + h = (host) j.next(); + if (particles.contains(h.node)) { + h.node.kill(); + j.remove(); + } + } +} + +public void drawNetwork() { // draw vertices fill( 120, 255, 120 ); @@ -220,7 +234,6 @@ public void drawNetwork(HashSet invisible) { while (j.hasNext()) { h = (host) j.next(); Particle v = h.node; - if (invisible.contains(v)) continue; ellipse(v.position().x(), v.position().y(), NODE_SIZE, NODE_SIZE); name = h.name; text(name, v.position().x() - (name.length() * 26 / 10), v.position().y() + 14); @@ -236,9 +249,7 @@ public void drawNetwork(HashSet invisible) { for ( int i = 0; i < physics.numberOfSprings(); ++i ) { Spring e = physics.getSpring( i ); Particle a = e.getOneEnd(); - if (invisible.contains(a)) continue; Particle b = e.getTheOtherEnd(); - if (invisible.contains(b)) continue; line(a.position().x(), a.position().y(), b.position().x(), b.position().y()); } diff --git a/htroot/processing/domaingraph/applet/domaingraph.pde b/htroot/processing/domaingraph/applet/domaingraph.pde index 4805b93be..8936c07a3 100755 --- a/htroot/processing/domaingraph/applet/domaingraph.pde +++ b/htroot/processing/domaingraph/applet/domaingraph.pde @@ -42,7 +42,7 @@ void setup() { size(660, 400); smooth(); - frameRate( 12 ); + frameRate( 6 ); strokeWeight( 1 ); ellipseMode( CENTER ); @@ -78,10 +78,11 @@ void initializePhysics() { } void draw() { - processRequestResponse(20); + processRequestResponse(50); physics.tick( 1.0 ); HashSet invisible = invisibleParticles(); + deleteParticles(invisible); if (physics.numberOfParticles() > 1) updateCentroid(invisible); centroid.tick(); @@ -90,7 +91,7 @@ void draw() { scale( centroid.z() ); translate( -centroid.x(), -centroid.y() ); - drawNetwork(invisible); + drawNetwork(); } void initRequest(boolean update) { @@ -153,6 +154,7 @@ void processCitation(HashMap props) { } h.time = System.currentTimeMillis(); host p = (host) nodes.get(parsingHostID); // this should be successful + if (p == null) return; // prevent that a spring is made twice for ( int i = 0; i < physics.numberOfSprings(); ++i ) { Spring e = physics.getSpring(i); @@ -209,7 +211,19 @@ HashSet invisibleParticles() { return particles; } -void drawNetwork(HashSet invisible) { +void deleteParticles(HashSet particles) { + Iterator j = nodes.values().iterator(); + host h; + while (j.hasNext()) { + h = (host) j.next(); + if (particles.contains(h.node)) { + h.node.kill(); + j.remove(); + } + } +} + +void drawNetwork() { // draw vertices fill( 120, 255, 120 ); @@ -220,7 +234,6 @@ void drawNetwork(HashSet invisible) { while (j.hasNext()) { h = (host) j.next(); Particle v = h.node; - if (invisible.contains(v)) continue; ellipse(v.position().x(), v.position().y(), NODE_SIZE, NODE_SIZE); name = h.name; text(name, v.position().x() - (name.length() * 26 / 10), v.position().y() + 14); @@ -236,9 +249,7 @@ void drawNetwork(HashSet invisible) { for ( int i = 0; i < physics.numberOfSprings(); ++i ) { Spring e = physics.getSpring( i ); Particle a = e.getOneEnd(); - if (invisible.contains(a)) continue; Particle b = e.getTheOtherEnd(); - if (invisible.contains(b)) continue; line(a.position().x(), a.position().y(), b.position().x(), b.position().y()); } diff --git a/htroot/processing/domaingraph/domaingraph.pde b/htroot/processing/domaingraph/domaingraph.pde index 4805b93be..8936c07a3 100755 --- a/htroot/processing/domaingraph/domaingraph.pde +++ b/htroot/processing/domaingraph/domaingraph.pde @@ -42,7 +42,7 @@ void setup() { size(660, 400); smooth(); - frameRate( 12 ); + frameRate( 6 ); strokeWeight( 1 ); ellipseMode( CENTER ); @@ -78,10 +78,11 @@ void initializePhysics() { } void draw() { - processRequestResponse(20); + processRequestResponse(50); physics.tick( 1.0 ); HashSet invisible = invisibleParticles(); + deleteParticles(invisible); if (physics.numberOfParticles() > 1) updateCentroid(invisible); centroid.tick(); @@ -90,7 +91,7 @@ void draw() { scale( centroid.z() ); translate( -centroid.x(), -centroid.y() ); - drawNetwork(invisible); + drawNetwork(); } void initRequest(boolean update) { @@ -153,6 +154,7 @@ void processCitation(HashMap props) { } h.time = System.currentTimeMillis(); host p = (host) nodes.get(parsingHostID); // this should be successful + if (p == null) return; // prevent that a spring is made twice for ( int i = 0; i < physics.numberOfSprings(); ++i ) { Spring e = physics.getSpring(i); @@ -209,7 +211,19 @@ HashSet invisibleParticles() { return particles; } -void drawNetwork(HashSet invisible) { +void deleteParticles(HashSet particles) { + Iterator j = nodes.values().iterator(); + host h; + while (j.hasNext()) { + h = (host) j.next(); + if (particles.contains(h.node)) { + h.node.kill(); + j.remove(); + } + } +} + +void drawNetwork() { // draw vertices fill( 120, 255, 120 ); @@ -220,7 +234,6 @@ void drawNetwork(HashSet invisible) { while (j.hasNext()) { h = (host) j.next(); Particle v = h.node; - if (invisible.contains(v)) continue; ellipse(v.position().x(), v.position().y(), NODE_SIZE, NODE_SIZE); name = h.name; text(name, v.position().x() - (name.length() * 26 / 10), v.position().y() + 14); @@ -236,9 +249,7 @@ void drawNetwork(HashSet invisible) { for ( int i = 0; i < physics.numberOfSprings(); ++i ) { Spring e = physics.getSpring( i ); Particle a = e.getOneEnd(); - if (invisible.contains(a)) continue; Particle b = e.getTheOtherEnd(); - if (invisible.contains(b)) continue; line(a.position().x(), a.position().y(), b.position().x(), b.position().y()); } diff --git a/htroot/rssTerminal.html b/htroot/rssTerminal.html index d32394a26..72cbe0f60 100755 --- a/htroot/rssTerminal.html +++ b/htroot/rssTerminal.html @@ -36,6 +36,7 @@ var lastwait = 1000; var tab = "  "; var lastShow = new Date(); var set = ""; +var requestCount = 0; function fillLines() { alert(maxlines); @@ -121,7 +122,8 @@ function idlepingExec() { } function load() { - getRSS("/xml/feed.rss?count=50&set=" + set); + getRSS("/xml/feed.rss?count=50&set=" + set + "&requestCount=" + requestCount + "&time=" + (new Date()).getTime()); + requestCount++; } function init() { diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java index 64c3157de..1a1da712b 100644 --- a/source/de/anomic/http/httpdFileHandler.java +++ b/source/de/anomic/http/httpdFileHandler.java @@ -303,7 +303,10 @@ public final class httpdFileHandler { int pos = path.lastIndexOf("."); - if ((path.substring(0,(pos==-1)?path.length():pos)).endsWith("_p") && (adminAccountBase64MD5.length() != 0)) { + if ((!clientIP.equals("localhost")) && + (!clientIP.startsWith("0:0:0:0:0:0:0:1")) && + (path.substring(0,(pos==-1)?path.length():pos)).endsWith("_p") && + (adminAccountBase64MD5.length() != 0)) { //authentication required //userDB if(sb.userDB.hasAdminRight(authorization, conProp.getProperty(httpHeader.CONNECTION_PROP_CLIENTIP), requestHeader.getHeaderCookies())){ diff --git a/source/de/anomic/plasma/plasmaSearchRankingProcess.java b/source/de/anomic/plasma/plasmaSearchRankingProcess.java index ce9230d23..a0b2ba6a9 100644 --- a/source/de/anomic/plasma/plasmaSearchRankingProcess.java +++ b/source/de/anomic/plasma/plasmaSearchRankingProcess.java @@ -297,6 +297,7 @@ public final class plasmaSearchRankingProcess { while ((stack.size() > 0) || (size() > 0)) { if (((stack.size() == 0) && (size() == 0))) break; kelondroSortStack.stackElement obrwi = bestRWI(skipDoubleDom); + if (obrwi == null) continue; // *** ? this happenened and the thread was suspended silently. cause? indexURLReference u = wordIndex.getURL(obrwi.element.urlHash(), obrwi.element, obrwi.weight.longValue()); if (u != null) { indexURLReference.Components comp = u.comp(); diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index f44040411..51750c8f5 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -2397,14 +2397,15 @@ public final class plasmaSwitchboard extends serverAbstractSwitch 256) return 0; // authorization by encoded password, only for localhost access - if ((((String) header.get(httpHeader.CONNECTION_PROP_CLIENTIP, "")).equals("localhost")) && (adminAccountBase64MD5.equals(authorization))) return 3; // soft-authenticated for localhost + String clientIP = (String) header.get(httpHeader.CONNECTION_PROP_CLIENTIP, ""); + if ((clientIP.equals("localhost") || clientIP.startsWith("0:0:0:0:0:0:0:1")) /*&& (adminAccountBase64MD5.equals(authorization))*/) return 3; // soft-authenticated for localhost // authorization by hit in userDB if (userDB.hasAdminRight((String) header.get(httpHeader.AUTHORIZATION, "xxxxxx"), ((String) header.get(httpHeader.CONNECTION_PROP_CLIENTIP, "")), header.getHeaderCookies())) return 4; //return, because 4=max diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java index 9e047a59c..84e3bc86f 100644 --- a/source/de/anomic/plasma/plasmaWordIndex.java +++ b/source/de/anomic/plasma/plasmaWordIndex.java @@ -691,7 +691,7 @@ public final class plasmaWordIndex implements indexRI { "Anchors: " + ((document.getAnchors() == null) ? 0 : document.getAnchors().size()) + "\n\tLinkStorageTime: " + (storageEndTime - startTime) + " ms | " + "indexStorageTime: " + (indexingEndTime - storageEndTime) + " ms"); - RSSFeed.channels((entry.initiator().equals(seedDB.mySeed().hash)) ? RSSFeed.LOCALINDEXING : RSSFeed.REMOTEINDEXING).addMessage(new RSSMessage("Indexed web page", "", entry.url().toNormalform(true, false))); + RSSFeed.channels((entry.initiator().equals(seedDB.mySeed().hash)) ? RSSFeed.LOCALINDEXING : RSSFeed.REMOTEINDEXING).addMessage(new RSSMessage("Indexed web page", dc_title, entry.url().toNormalform(true, false))); } // finished diff --git a/source/de/anomic/xml/RSSFeed.java b/source/de/anomic/xml/RSSFeed.java index 3073b5e15..72ff795d9 100644 --- a/source/de/anomic/xml/RSSFeed.java +++ b/source/de/anomic/xml/RSSFeed.java @@ -40,6 +40,9 @@ public class RSSFeed implements Iterable { public static final String REMOTEINDEXING = "REMOTEINDEXING"; public static final String LOCALINDEXING = "LOCALINDEXING"; + // test: + // http://localhost:8080/xml/feed.rss?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING + /** * the following private channels are declared to prevent that an access to the feed servlet * gets results from news channels that are not for the public @@ -152,7 +155,9 @@ public class RSSFeed implements Iterable { private static final ConcurrentHashMap channels = new ConcurrentHashMap(); public static RSSFeed channels(String channelName) { - RSSFeed feed = channels.get(channelName); + ConcurrentHashMap channelss = channels; + RSSFeed feed = channelss.get(channelName); + if (feed == null) System.out.println("channel " + channelName + " is new"); if (feed != null) return feed; feed = new RSSFeed(); feed.setChannel(new RSSMessage(channelName, "", "")); diff --git a/source/de/anomic/xml/RSSMessage.java b/source/de/anomic/xml/RSSMessage.java index d189dce03..0223540b0 100644 --- a/source/de/anomic/xml/RSSMessage.java +++ b/source/de/anomic/xml/RSSMessage.java @@ -65,7 +65,7 @@ public class RSSMessage { setValue("description", description); setValue("link", link); setValue("pubDate", new Date().toString()); - setValue("guid", Integer.toHexString((title + description).hashCode())); + setValue("guid", Integer.toHexString((title + description + link).hashCode())); } public RSSMessage() {