From 5fd1d5a58efbe2ea26162d6306db74485a36c421 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 10 Jun 2007 20:25:33 +0000 Subject: [PATCH] added time configuration git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3853 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/WatchWebStructure_p.html | 6 ++++++ htroot/WatchWebStructure_p.java | 12 +++++++----- htroot/WebStructurePicture_p.java | 3 +-- htroot/env/templates/submenuCrawler.template | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/htroot/WatchWebStructure_p.html b/htroot/WatchWebStructure_p.html index a67797766..cb4559aa5 100644 --- a/htroot/WatchWebStructure_p.html +++ b/htroot/WatchWebStructure_p.html @@ -42,6 +42,12 @@ +
time
+
+ + + +
size
 x 
 
diff --git a/htroot/WatchWebStructure_p.java b/htroot/WatchWebStructure_p.java index 48c75a5df..c0aace1d2 100644 --- a/htroot/WatchWebStructure_p.java +++ b/htroot/WatchWebStructure_p.java @@ -16,7 +16,7 @@ public class WatchWebStructure_p { int width = 768; int height = 576; int depth = 3; - int nodes = 100; // maximum number of host nodes that are painted + int nodes = 1000; // maximum number of host nodes that are painted int time = -1; String host = "auto"; @@ -49,12 +49,14 @@ public class WatchWebStructure_p { prop.put("depth", depth); prop.put("depthi", Math.min(8, depth + 1)); prop.put("depthd", Math.max(0, depth - 1)); - prop.put("width", width); - prop.put("height", height); prop.put("nodes", nodes); + prop.put("nodesi", Math.min(1000, nodes + 100)); + prop.put("nodesd", Math.max(100, nodes - 100)); prop.put("time", time); - prop.put("nodesi", Math.min(1000, nodes + 50)); - prop.put("nodesd", Math.max(0, nodes - 50)); + prop.put("timei", (time > 9000) ? -1 : ((time < 0) ? -1 : Math.min(9999, time + 1000))); + prop.put("timed", (time < 0) ? 9000 : Math.max(1000, time - 1000)); + prop.put("width", width); + prop.put("height", height); return prop; } diff --git a/htroot/WebStructurePicture_p.java b/htroot/WebStructurePicture_p.java index cdbba77fe..06b4cba06 100644 --- a/htroot/WebStructurePicture_p.java +++ b/htroot/WebStructurePicture_p.java @@ -72,7 +72,7 @@ public class WebStructurePicture_p { if (depth < 0) depth = 0; // calculate target time - long timeout = (time < 0) ? Long.MAX_VALUE : System.currentTimeMillis() + time; + long timeout = (time < 0) ? Long.MAX_VALUE : System.currentTimeMillis() + (time * 8 / 10); // find start point if ((host == null) || (host.length() == 0) || (host.equals("auto"))) { @@ -92,7 +92,6 @@ public class WebStructurePicture_p { //graph.print(); return graph.draw(width, height, 40, 40, 5, 15); - } private static final int place(ymageGraph graph, plasmaWebStructure structure, String centerhash, String centerhost, int maxnodes, long timeout, double x, double y, int nextlayer, int maxlayer) { diff --git a/htroot/env/templates/submenuCrawler.template b/htroot/env/templates/submenuCrawler.template index f39d27462..c5fd1dd6a 100644 --- a/htroot/env/templates/submenuCrawler.template +++ b/htroot/env/templates/submenuCrawler.template @@ -4,8 +4,8 @@