Allow to hide linkstructure graphic in crawl monitor

using/setting the config param DECORATION_GRAFICS_LINKSTRUCTURE
pull/1/head
reger 10 years ago
parent 6390454652
commit 0260d3d800

@ -219,6 +219,8 @@ window.setInterval("setTableSize()", 1000);
#(crawlProfilesShow)#:: #(crawlProfilesShow)#::
<fieldset> <fieldset>
<legend>Running Crawls (#[count]#)</legend> <legend>Running Crawls (#[count]#)</legend>
<table width="96%">
<tr><td>
<table border="0" summary="A list of crawl profiles and their current settings."> <table border="0" summary="A list of crawl profiles and their current settings.">
<colgroup> <colgroup>
<col width="16" /> <col width="16" />
@ -244,11 +246,22 @@ window.setInterval("setTableSize()", 1000);
</tr> </tr>
#{/list}# #{/list}#
</table> </table>
#(linkstructure)#:: </td>
#(linkstructure)#
<td>
<form style="float:right;" action="Crawler_p.html"><input type="submit" name="showwebstructuregraph" class="btn btn-default btn-xs" value="show link structure"/><form>
</td></tr></table>
::
<td>
<form style="float:right;" action="Crawler_p.html"><input type="submit" name="hidewebstructuregraph" class="btn btn-default btn-xs" value="hide graphic"/><form>
</td></tr></table>
<script src="/js/d3.v3.min.js"></script> <script src="/js/d3.v3.min.js"></script>
<script src="/js/hypertree.js"></script> <script src="/js/hypertree.js"></script>
<div id="linkstructure"></div> <div id="linkstructure"></div>
<script>$(document).ready(linkstructure("#[hosts]#", "#linkstructure", 1280, 720, 3000, 700));</script>:: <script>$(document).ready(linkstructure("#[hosts]#", "#linkstructure", 1280, 720, 3000, 700));</script>::
<td>
<form style="float:right;" action="Crawler_p.html"><input type="submit" name="hidewebstructuregraph" class="btn btn-default btn-xs" value="hide graphic"/><form>
</td></tr></table>
<script type="text/javascript"> <script type="text/javascript">
imagestub = "WebStructurePicture_p.png?host=#[hosts]#&depth=4&width=1024&height=512&nodes=600&time=1000&colortext=888888&colorback=FFFFFF&colordot0=1111BB&colordota=11BB11&colorline=222222&colorlineend=333333"; imagestub = "WebStructurePicture_p.png?host=#[hosts]#&depth=4&width=1024&height=512&nodes=600&time=1000&colortext=888888&colorback=FFFFFF&colordot0=1111BB&colordota=11BB11&colorline=222222&colorlineend=333333";
idx = 0; idx = 0;

@ -675,6 +675,10 @@ public class Crawler_p {
prop.put("crawlProfilesShow_linkstructure", 0); prop.put("crawlProfilesShow_linkstructure", 0);
if (post != null) { // handle config button to display graphic
if (post.get("hidewebstructuregraph") != null) sb.setConfig(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, false);
if (post.get("showwebstructuregraph") != null) sb.setConfig(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, true);
}
if (count > 0 && sb.getConfigBool(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, true)) { if (count > 0 && sb.getConfigBool(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, true)) {
// collect the host names for 'wide' crawls which can be visualized // collect the host names for 'wide' crawls which can be visualized
boolean showLinkstructure = hosts.length() > 0 && !hosts.contains("file:"); boolean showLinkstructure = hosts.length() > 0 && !hosts.contains("file:");

@ -181,7 +181,7 @@ function updatepage(str) {
</table> </table>
</fieldset> </fieldset>
#(linkgraph)#:: #(linkgraph)#<div align="center"><form><input name="showlinkstructure" onClick="location.href = location.toString() + '&showlinkstructure=';" class="btn btn-default btn-xs" value="show link structure graph"/></form></div>::
<script src="/js/d3.v3.min.js"></script> <script src="/js/d3.v3.min.js"></script>
<script src="/js/hypertree.js"></script> <script src="/js/hypertree.js"></script>
<div id="linkstructure"></div> <div id="linkstructure"></div>

@ -568,6 +568,9 @@ public class HostBrowser {
prop.put("files_subpathdetectedsize", filecounter - storedDocs.size()); prop.put("files_subpathdetectedsize", filecounter - storedDocs.size());
prop.put("files", 1); prop.put("files", 1);
uri = new DigestURL(path); uri = new DigestURL(path);
if (post.containsKey("showlinkstructure")) {
sb.setConfig(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, true);
}
prop.put("files_linkgraph", uri.getPath().length() <= 1 && hostsize > 0 && sb.getConfigBool(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, true)); prop.put("files_linkgraph", uri.getPath().length() <= 1 && hostsize > 0 && sb.getConfigBool(SwitchboardConstants.DECORATION_GRAFICS_LINKSTRUCTURE, true));
prop.put("files_linkgraph_host", uri.getHost()); prop.put("files_linkgraph_host", uri.getHost());

Loading…
Cancel
Save