summaryrefslogtreecommitdiff
path: root/htroot
diff options
context:
space:
mode:
authororbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2008-05-12 22:23:29 +0000
committerorbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2008-05-12 22:23:29 +0000
commit239cc4428d3b404a33e72063296c48e288907985 (patch)
treebae163beaaafd6e36cff897e73f37801e5dd5af9 /htroot
parent415b92bb07d3c57086a4bbefb2e839a6fd780e8b (diff)
- better domain graph, faster when more links exist, looks better
- new authorization rule: localhost is always authorized for administration. This solves many problems with ajax, and also fixed a problem in rssTerminal - fix bug in RSSFeed which prevented that entries had been recognized as individual, new entries - added reloading/updating of status image on status page git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4796 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot')
-rw-r--r--htroot/Status.html15
-rwxr-xr-xhtroot/processing/domaingraph/applet/domaingraph.jarbin188727 -> 188763 bytes
-rwxr-xr-xhtroot/processing/domaingraph/applet/domaingraph.java25
-rwxr-xr-xhtroot/processing/domaingraph/applet/domaingraph.pde25
-rwxr-xr-xhtroot/processing/domaingraph/domaingraph.pde25
-rwxr-xr-xhtroot/rssTerminal.html4
6 files changed, 71 insertions, 23 deletions
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 @@
<head>
<title>YaCy '#[clientname]#': Console Status</title>
#%env/templates/metas.template%#
+ <script type="text/javascript">
+ function loadBanner() {
+ for (var i = 0; i < document.images.length; i++) {
+ if (document.images[i].src.indexOf("Banner.png") > 0) {
+ document.images[i].src = "/Banner.png?textcolor=000000&amp;bgcolor=ddeeee&amp;bordercolor=aaaaaa&time=" + (new Date()).getTime();
+ break;
+ }
+ }
+ }
+ function init() {
+ loaderBanner = window.setInterval("loadBanner()", 20000);
+ }
+ </script>
</head>
- <body style="margin:0px;">
+ <body onload="init();">
#%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
--- a/htroot/processing/domaingraph/applet/domaingraph.jar
+++ b/htroot/processing/domaingraph/applet/domaingraph.jar
Binary files 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 = "&nbsp;&nbsp;";
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() {