- added recording of all accessed and submitted servlets

- this recording is then used to redirect from the Status.html page to BasicConfig in case that servlet was never submitted
- this acts as an addition to the new default pop-up page 'index.html' which offers an administration link to Status.html. For a first-time user this then redirects directly to the former start page BasicConfig.html

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7451 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 28f669bf0b
commit 786166041a

@ -65,6 +65,14 @@ keyStorePassword =
pkcs12ImportFile =
pkcs12ImportPwd =
# property that collects the names of all servlets that had been used so far
# that is used to track if the user has already done some configuration steps
# if the used missed configuration steps that should be done, then a help system
# is possible which leads the used based on the list of servlets that had been used
# the list distinguishes called and submitted servlets
server.servlets.called =
server.servlets.submitted =
# server tracking: maximum time a track entry is hold in the internal cache
# value is in milliseconds, default is one hour
server.maxTrackingTime = 3600000

@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
#(forwardToConfigBasic)#::<meta http-equiv="REFRESH" content="0; url=/ConfigBasic.html" />#(/forwardToConfigBasic)#
<title>YaCy '#[clientname]#': Console Status</title>
#%env/templates/metas.template%#
<script type="text/javascript">

@ -58,7 +58,15 @@ public class Status {
final serverObjects prop = new serverObjects();
final Switchboard sb = (Switchboard) env;
if (post != null) {
// check if the basic configuration was accessed before and forward
prop.put("forwardToConfigBasic", 0);
if ((post == null || !post.containsKey("noforward")) && sb.getConfig("server.servlets.submitted", "").indexOf("ConfigBasic.html") < 0) {
// forward to ConfigBasic
prop.put("forwardToConfigBasic", 1);
}
if (post != null) post.remove("noforward");
if (post != null && post.size() > 0) {
if (sb.adminAuthenticated(header) < 2) {
prop.put("AUTHENTICATE","admin log-in");
return prop;

@ -86,7 +86,7 @@
<li class="menugroup" id="menugroupPeerControl">
<h3>Peer Control</h3>
<ul class="menu">
<li><a href="/Status.html" class="MenuItemLink">Admin Console</a></li>
<li><a href="/Status.html?noforward=" class="MenuItemLink">Admin Console</a></li>
<li><a href="/Table_API_p.html" class="MenuItemLink lock">API Action Steering</a></li>
<li><a href="/Steering.html?restart=" class="MenuItemLink lock" onclick="return confirm('Confirm Restart')">Re-Start</a></li>
<li><a href="/Steering.html?shutdown=" class="MenuItemLink lock" onclick="return confirm('Confirm Shutdown')">Shutdown</a></li>

@ -514,6 +514,12 @@ public final class HTTPDFileHandler {
}
}
// track all files that had been accessed so far
if (targetFile != null && targetFile.exists()) {
sb.setConfig("server.servlets.called", appendPath(sb.getConfig("server.servlets.called", ""), path));
if (args != null && args.size() > 0) sb.setConfig("server.servlets.submitted", appendPath(sb.getConfig("server.servlets.submitted", ""), path));
}
//File targetClass = rewriteClassFile(targetFile);
//We need tp here
servletProperties templatePatterns = null;
@ -1111,6 +1117,12 @@ public final class HTTPDFileHandler {
}
}
private static final String appendPath(String proplist, String path) {
if (proplist.length() == 0) return path;
if (proplist.indexOf(path) >= 0) return proplist;
return proplist + "," + path;
}
public static final File getOverlayedClass(final String path) {
File targetClass;
targetClass = rewriteClassFile(new File(htDefaultPath, path)); //works for default and localized files

Loading…
Cancel
Save