added time configuration

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3853 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent e07458bad4
commit 5fd1d5a58e

@ -42,6 +42,12 @@
<input type="text" name="nodes" value="#[nodes]#" size="4" maxlength="4" />
<a href="WatchWebStructure_p.html?host=#[host]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodesi]#&time=#[time]#"><img src="env/grafics/plus.gif" /></a>
</dd>
<dt>time</dt>
<dd>
<a href="WatchWebStructure_p.html?host=#[host]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[timed]#"><img src="env/grafics/minus.gif" /></a>
<input type="text" name="time" value="#[time]#" size="4" maxlength="4" />
<a href="WatchWebStructure_p.html?host=#[host]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[timei]#"><img src="env/grafics/plus.gif" /></a>
</dd>
<dt>size</dt>
<dd><input type="text" name="width" value="#[width]#" size="4" maxlength="4" />&nbsp;x&nbsp;<input type="text" name="height" value="#[height]#" size="4" maxlength="4" /></dd>
<dt>&nbsp;</dt>

@ -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;
}

@ -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) {

@ -4,8 +4,8 @@
<div class="SubMenugroup">
<h3>Activity Visualization</h3>
<ul class="SubMenu">
<li><a href="/WatchCrawler_p.html" class="MenuItemLink lock">Crawler Queues</a></li>
<li><a href="/WatchWebStructure_p.html" class="MenuItemLink lock">Web Structure</a></li>
<li><a href="/WatchCrawler_p.html" class="MenuItemLink lock">Crawler Queues</a></li>
</ul>
</div>

Loading…
Cancel
Save