- integrated the collage into the Web Visualization menu

- added a counter for the public and private queue on the page (testing..)
- fixed wrong public/private categorization

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4686 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2008-04-12 15:45:57 +00:00
parent c5d1d7faca
commit 8313d58ae7
5 changed files with 55 additions and 18 deletions

View File

@ -1,18 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Collage</title>
#%env/templates/metas.template%#
<meta http-equiv="REFRESH" content="5" />
</head>
<body style="margin:0px;">
#%env/templates/header.template%#
#(imgurl)#
::
#{list}#
#[url]#
#{/list}#
#(/imgurl)#
#%env/templates/footer.template%#
</body>
<head>
<title>YaCy '#[clientname]#': Collage</title>
#%env/templates/metas.template%#
<style type="text/css">
#left {
float: left;
width: 224px;
}
form dt {
width: 40px;
}
form dd {
width: 130px;
text-align:right;
}
</style><meta http-equiv="REFRESH" content="5" />
</head>
<body style="margin:0px;">
#%env/templates/header.template%#
#%env/templates/submenuWebStructure.template%#
<h2>Collage</h2>
<div id="left">
<form action="/Collage.html">
<dl>
<dt>Private Queue</dt>
<dd>#[privateQueueSize]#</dd>
<dt>Public Queue</dt>
<dd>#[publicQueueSize]#</dd>
</dl>
</form>
</div>
#(imgurl)#
::
#{list}#
#[url]#
#{/list}#
#(/imgurl)#
#%env/templates/footer.template%#
</body>
</html>

View File

@ -60,11 +60,11 @@ public class Collage {
private static Integer imgPosX[] = new Integer[fifoMax];
private static Integer imgPosY[] = new Integer[fifoMax];
private static long imgZIndex[] = new long[fifoMax];
private static final Random rand = new Random();
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch<?> env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
Random rand = new Random();
final boolean authenticated = sb.adminAuthenticated(header) >= 2;
collageQueue.ImageOriginEntry nextOrigin = collageQueue.next(!authenticated);
@ -105,6 +105,8 @@ public class Collage {
prop.put("imgurl", "0");
}
prop.putNum("privateQueueSize", collageQueue.privateQueueSize());
prop.putNum("publicQueueSize", collageQueue.publicQueueSize());
return prop;
}
}

View File

@ -2,6 +2,7 @@
<h3>Web Visualization</h3>
<ul class="SubMenu">
<li><a href="/WatchWebStructure_p.html" class="MenuItemLink lock">Web Structure</a></li>
<li><a href="/Collage.html" class="MenuItemLink">Image Collage</a></li>
<li><a href="/CacheAdmin_p.html" class="MenuItemLink lock">Web Cache</a></li>
</ul>
</div>

View File

@ -81,6 +81,14 @@ public class collageQueue {
return e;
}
public static int privateQueueSize() {
return privateImageQueue.size();
}
public static int publicQueueSize() {
return publicImageQueue.size();
}
public static class ImageOriginEntry {
public htmlFilterImageEntry imageEntry;
public yacyURL baseURL;

View File

@ -2129,7 +2129,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<plasmaSwitchbo
return null;
} else {
plasmaCrawlProfile.entry profile = profilesActiveCrawls.getEntry(in.queueEntry.profileHandle);
collageQueue.registerImages(document, (profile == null) ? true : profile.remoteIndexing());
collageQueue.registerImages(document, (profile == null) ? true : !profile.remoteIndexing());
}
return new indexingQueueEntry(in.queueEntry, document, null);
}