- set staticIP at startUp

- added setting for reduced menu (simpleMenu)


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4959 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
danielr 17 years ago
parent f6b92456c0
commit 0c1dc703e4

@ -859,3 +859,7 @@ routing.deleteOldSeeds.permission = true
routing.deleteOldSeeds.permission__pro = true
routing.deleteOldSeeds.time = 7
routing.deleteOldSeeds.time__pro = 30
# show simple menu (1) or all possible entries (0)?
menuSimple = 1

@ -89,6 +89,13 @@
</dl>
</fieldset>
</li>
<li>
(optional) How many options do you wish to see?
<fieldset>
<input type="radio" name="menuSimple" id="simpleMenu" value="1" #(menuSimple)#::checked="checked"#(/menuSimple)# /><label for="simpleMenu">show only important options</label>&nbsp;
<input type="radio" name="menuSimple" id="fullMenu" value="0" #(menuSimple)#checked="checked"::#(/menuSimple)# /><label for="fullMenu">show all options</label>
</fieldset>
</li>
</ol>
<fieldset>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="set" value="Set Configuration" /></fieldset>
</form>
@ -98,7 +105,7 @@
<p>Your basic configuration is complete! You can now (for example):</p>
<ul>
<li><a href="index.html">start an uncensored search</a>;</li>
<li><a href="CrawlStartSimple_p.html">start your own crawl</a> and contribute to the global index, or create your own private web index;</li>
<li><a href="CrawlStart_p.html">start your own crawl</a> and contribute to the global index, or create your own private web index;</li>
<li><a href="ConfigProfile_p.html">set a personal peer profile</a> (optional settings);</li>
<li>just <a href="Network.html">monitor at the network page</a> what the other peers are doing</li>
</ul>::

@ -59,6 +59,7 @@ import de.anomic.server.serverDomains;
import de.anomic.server.serverInstantBusyThread;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.server.servletProperties;
import de.anomic.yacy.yacyAccessible;
import de.anomic.yacy.yacySeed;
@ -224,6 +225,12 @@ public class ConfigBasic {
prop.put("nextStep", NEXTSTEP_FINISHED);
}
if (post != null && post.containsKey(servletProperties.MENU_SIMPLE)) {
sb.setConfig(servletProperties.MENU_SIMPLE, post.get(servletProperties.MENU_SIMPLE, "1"));
}
prop.put(servletProperties.MENU_SIMPLE, sb.getConfig(servletProperties.MENU_SIMPLE, "1"));
// set default values
prop.put("defaultName", env.getConfig("peerName", ""));
prop.put("defaultPort", env.getConfig("port", "8080"));

@ -9,11 +9,15 @@
#%env/templates/submenuConfig.template%#
<h2>Performance Settings of Queues and Processes</h2>
#(menuSimple)#
<p>
<strong>Scheduled tasks overview and waiting time settings:</strong>
</p>
::
#(/menuSimple)#
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellpadding="2" cellspacing="1">
#(menuSimple)#
<tr class="TableHeader" valign="bottom">
<td>Thread</td>
<td>Queue Size</td>
@ -55,9 +59,11 @@
<td align="left">#[longdescr]##(recommendation)#::<br/>recommended: #[value]# kbytes#(/recommendation)#</td>
</tr>
#{/table}#
::
#(/menuSimple)#
<tr class="TableCellLight">
<td align="left" colspan="19">
<input type="submit" name="submitdelay" value="Submit New Delay Values" />&nbsp;&nbsp;&nbsp;
#(menuSimple)#<input type="submit" name="submitdelay" value="Submit New Delay Values" />&nbsp;&nbsp;&nbsp;::#(/menuSimple)#
Changes take effect immediately<br/>
<input type="submit" name="submitdefault" value="Use Default Profile:" />
<select name="defaultFile">
@ -152,6 +158,7 @@
</table>
</form>
#(menuSimple)#
<p>
<strong>Thread pool settings:</strong>
</p>
@ -183,6 +190,8 @@
</tr>
</table>
</form>
::
#(/menuSimple)#
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>YaCy Priority Settings</legend>
@ -199,6 +208,7 @@
</fieldset>
</form>
#(menuSimple)#
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Proxy Performance Settings</legend>
<p>
@ -220,6 +230,8 @@
</dl>
</fieldset>
</form>
::
#(/menuSimple)#
#%env/templates/footer.template%#
</body>

@ -244,6 +244,7 @@ public class SettingsAck_p {
} else if (staticIP.startsWith("https://")) {
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
}
// TODO IPv6 support!
if (staticIP.indexOf(":") > 0) {
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
}

@ -8,7 +8,7 @@
<li><a href="/index.html?display=1" accesskey="s" class="MenuItemLink">Search Page (standard)</a></li>
<li><a href="/yacy/user/ysearch.html?display=1" accesskey="s" class="MenuItemLink">Search Page (alternative)</a></li>
<li><a href="/yacy/ui/" accesskey="s" class="MenuItemLink">Search Page (Rich Client)</a></li>
<li><a href="/Ranking_p.html" class="MenuItemLink lock">Ranking Config</a></li>
#(menuSimple)#<li><a href="/Ranking_p.html" class="MenuItemLink lock">Ranking Config</a></li>::#(/menuSimple)#
<li><a href="/Surftips.html?display=1" class="MenuItemLink">Surftips</a></li>
<li><a href="/Wiki.html?display=1" class="MenuItemLink">Publication</a></li>
<li><a href="/Bookmarks.html" class="MenuItemLink">Bookmarks</a></li>
@ -20,11 +20,12 @@
<ul class="menu">
<li><a href="/WatchCrawler_p.html?autoforward=" class="MenuItemLink lock">Crawl Start &amp; Monitoring</a></li>
<li><a href="/CrawlResults.html?process=5&amp;autoforward=" class="MenuItemLink">Crawl Results</a></li>
<li><a href="/IndexControlRWIs_p.html" class="MenuItemLink lock">Index Administration</a></li>
<li><a href="/Blacklist_p.html" class="MenuItemLink lock">Filter &amp; Blacklists</a></li>
#(menuSimple)#<li><a href="/IndexControlRWIs_p.html" class="MenuItemLink lock">Index Administration</a></li>::#(/menuSimple)#
#(menuSimple)#<li><a href="/Blacklist_p.html" class="MenuItemLink lock">Filter &amp; Blacklists</a></li>::#(/menuSimple)#
<li><a href="/ProxyIndexingMonitor_p.html" class="MenuItemLink lock">Indexing with Proxy</a></li>
</ul>
</li>
#(menuSimple)#
<li class="menugroup" id="menugroupMonitoring">
<h3>Monitoring</h3>
<ul class="menu">
@ -36,12 +37,14 @@
<li><a href="/CookieMonitorIncoming_p.html" class="MenuItemLink lock">Cookies in Proxy</a></li>
</ul>
</li>
::
#(/menuSimple)#
<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="/terminal_p.html" accesskey="t" class="MenuItemLink lock">Terminal</a></li>
<li><a href="/Messages_p.html" class="MenuItemLink lock">Messages <img src="/notifier.gif" alt="New Messages" /></a></li>
#(menuSimple)#<li><a href="/terminal_p.html" accesskey="t" class="MenuItemLink lock">Terminal</a></li>::#(/menuSimple)#
#(menuSimple)#<li><a href="/Messages_p.html" class="MenuItemLink lock">Messages <img src="/notifier.gif" alt="New Messages" /></a></li>::#(/menuSimple)#
<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>
</ul>

@ -5,24 +5,30 @@
<li><a href="/ConfigBasic.html" class="MenuItemLink lock">Basic Configuration</a></li>
<li><a href="/ConfigAccounts_p.html" class="MenuItemLink lock">Accounts</a></li>
<li><a href="/ConfigProfile_p.html" class="MenuItemLink lock">User Profile</a></li>
<li><a href="/ConfigPeerProfile_p.html" class="MenuItemLink lock">Peer Appearance Profile</a></li>
<li><a href="/ConfigLanguage_p.html" class="MenuItemLink lock">Language</a></li>
#(menuSimple)#<li><a href="/ConfigPeerProfile_p.html" class="MenuItemLink lock">Peer Appearance Profile</a></li>::#(/menuSimple)#
#(menuSimple)#<li><a href="/ConfigLanguage_p.html" class="MenuItemLink lock">Language</a></li>::#(/menuSimple)#
<li><a href="/ConfigSkins_p.html" class="MenuItemLink lock">Skins</a></li>
</ul>
</div>
<div class="SubMenu">
<ul class="SubMenu">
#(menuSimple)#
<li><a href="/ConfigNetwork_p.html" class="MenuItemLink lock">Network Configuration</a></li>
<li><a href="/ConfigRobotsTxt_p.html" class ="MenuItemLink lock">Local robots.txt</a></li>
<li><a href="/Settings_p.html" class="MenuItemLink lock">Advanced Settings</a></li>
<li><a href="/ConfigProperties_p.html" class="MenuItemLink lock">Advanced Properties</a></li>
::
#(/menuSimple)#
<li><a href="/ConfigUpdate_p.html" class="MenuItemLink lock">System Update</a></li>
</ul>
</div>
<div class="SubMenu">
<ul class="SubMenu">
<li><a href="/PerformanceQueues_p.html" class="MenuItemLink lock">Queues Performance Settings</a></li>
#(menuSimple)#
<li><a href="/PerformanceMemory_p.html" class="MenuItemLink lock">Memory Settings for Database Caches</a></li>
<li><a href="/PerformanceSearch_p.html" class="MenuItemLink lock">Timing Settings for Search Sequence</a></li>
::
#(/menuSimple)#
</ul>
</div>

@ -671,6 +671,7 @@ public final class httpdFileHandler {
tp.put(servletProperties.PEER_STAT_UPTIME, ((System.currentTimeMillis() - serverCore.startupTime) / 1000) / 60); // uptime in minutes
tp.putHTML(servletProperties.PEER_STAT_CLIENTNAME, switchboard.getConfig("peerName", "anomic"));
tp.put(servletProperties.PEER_STAT_MYTIME, serverDate.formatShortSecond());
tp.put(servletProperties.MENU_SIMPLE, sb.getConfig(servletProperties.MENU_SIMPLE, "1"));
//System.out.println("respond props: " + ((tp == null) ? "null" : tp.toString())); // debug
} catch (InvocationTargetException e) {
if (e.getCause() instanceof InterruptedException) {

@ -1646,11 +1646,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
public void enQueue(IndexingStack.QueueEntry job) {
assert job != null;
// TODO this should not be possible?!
if (!(job instanceof IndexingStack.QueueEntry)) {
System.out.println("Internal error at plasmaSwitchboard.enQueue: wrong job type");
System.exit(1);
}
try {
webIndex.queuePreStack.push(job);
} catch (IOException e) {

@ -35,6 +35,8 @@ public class servletProperties extends serverObjects {
public static final String PEER_STAT_MYTIME = "mytime";
public static final String PEER_STAT_CLIENTNAME = "clientname";
public static final String MENU_SIMPLE = "menuSimple";
private String prefix="";
private httpHeader outgoingHeader;

@ -118,6 +118,16 @@ public class yacyCore {
RSSFeed peernews = RSSFeed.channels(RSSFeed.PEERNEWS);
peernews.addMessage(new RSSMessage("YaCy started", "", ""));
// ensure that correct IP is used
final String staticIP = sb.getConfig("staticIP", "");
if (staticIP.length() != 0 && yacySeed.isProperIP(staticIP) == null) {
serverCore.useStaticIP = true;
sb.webIndex.seedDB.mySeed().setIP(staticIP);
System.out.println("+-+ DEBUG staticIP set to "+ staticIP);
} else {
serverCore.useStaticIP = false;
}
loadSeedUploadMethods();
log.logConfig("CORE INITIALIZED");

Loading…
Cancel
Save