refactoring of Advanced Config:

- removed settings that are in Basic Settings
- joined pages that belong together
- moved include pages from yacy/ to /

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2726 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 25ae3d3161
commit 2e4aa6a170

@ -289,9 +289,20 @@ public class SettingsAck_p {
}
// server password
// server access
if (post.containsKey("serveraccount")) {
// read and process data
// static IP
String staticIP = (String)post.get("staticIP");
if(staticIP.equals("")){
serverCore.useStaticIP=false;
}else{
serverCore.useStaticIP=true;
}
env.setConfig("staticIP", staticIP);
if (staticIP.length() > 0) yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);
// server access data
String filter = ((String) post.get("serverfilter")).trim();
/*String user = (String) post.get("serveruser");
String pw1 = (String) post.get("serverpw1");
@ -377,53 +388,6 @@ public class SettingsAck_p {
return prop;
}
if (post.containsKey("generalsettings")) {
/*
// set peer language
String peerLang = (String) post.get("peerlang");
if ((peerLang == null) || (peerLang.equals("en"))) peerLang = "default";
HashMap lm = langMap(env);
if (!(lm.containsKey(peerLang))) peerLang = "default";
env.setConfig("htLocaleSelection", peerLang);
prop.put("info_peerLang", (String) lm.get(peerLang));
*/
// check if peer name already exists
String peerName = (String) post.get("peername");
String staticIP = (String)post.get("staticIP");
if(staticIP.equals("")){
serverCore.useStaticIP=false;
}else{
serverCore.useStaticIP=true;
}
env.setConfig("staticIP", staticIP);
if (staticIP.length() > 0) yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);
yacySeed oldSeed = yacyCore.seedDB.lookupByName(peerName);
if ((oldSeed == null) || (env.getConfig("peerName","").equals(peerName))) {
// the name is new
boolean nameOK = (peerName.length() <= 80);
for (int i = 0; i < peerName.length(); i++) {
if ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".indexOf(peerName.charAt(i)) < 0) nameOK = false;
}
if (!(nameOK)) {
// deny change
prop.put("info", 17);//peer name is wrong
} else {
// set values
env.setConfig("peerName", peerName);
prop.put("info", 12);//port or peername changed
prop.put("info_peerName", peerName);
prop.put("info_staticIP", staticIP);
}
} else {
// deny change
prop.put("info", 16);//peer name is already used by another peer
}
return prop;
}
if (post.containsKey("proxysettings")) {
/* ====================================================================

@ -1,20 +0,0 @@
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend id="admin">Administration Account Settings</legend>
<p>This is the account that restricts access to this 'Settings' page. If you have not customized it yet, you should do so now:
<p><table border="0" cellspacing="5">
<tr valign="top">
<td>Account Name:</td><td><input name="adminuser" type="text" size="16" maxlength="16" value="#[adminuser]#"></td>
</tr>
<tr valign="top">
<td>Password:</td>
<td><input name="adminpw1" type="password" size="16" maxlength="16" value=""></td></tr>
<tr valign="top">
<td>Password (repeat same as above):</td>
<td><input name="adminpw2" type="password" size="16" maxlength="16" value=""></td>
</tr>
<tr valign="top">
<td colspan="2"><input type="submit" name="adminaccount" value="submit"></td>
</tr>
</table>
</fieldset>
</form><br>

@ -1,28 +0,0 @@
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend id="general">General Settings</legend>
<p>
<table border="0" cellspacing="5">
<tr valign="top">
<td>Peer&nbsp;Name:</td>
<td><input name="peername" type="text" size="32" maxlength="80" value="#[peerName]#"></td>
<td><b>Your peer name defines also a new '.yacy' - domain, which can be accessed from every peer running this proxy.</b>
Using your 'Home Page' and 'File Share' - zones you also have a platform to provide content to your new domain.<br>
<i>(hint: Choose a name that appears on a web page that tells something about you, visit the page, get the 'senior' status, and you can be found...)</i></td>
</tr>
<tr valign="top">
<td>staticIP (optional):</td>
<td><input name="staticIP" type="text" size="32" maxlength="80" value="#[staticIP]#"></td>
<td><b>The staticIP can help that your peer can be reached by other peers in case that your
peer is behind a firewall or proxy.</b> You can create a tunnel through the firewall/proxy
(look out for 'tunneling through https proxy with connect command') and create
an access point for incoming connections.
This access address can be set here (either as IP number or domain name).
If the address of outgoing connections is equal to the address of incoming connections,
you don't need to set anything here, please leave it blank.<br>
</tr>
<tr valign="top">
<td colspan="3"><input type="submit" name="generalsettings" value="submit"></td>
</tr>
</table>
</fieldset>
</form><br>

@ -1,4 +1,5 @@
<p><b>Store into filesystem:</b></p>
<p><fieldset>
<b>Store into filesystem:</b></p>
<p>You must configure this if you want to store the seed-list file onto the file system.</p>
<form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellspacing="5">
@ -11,4 +12,5 @@
<td colspan="3"><input type="submit" name="seedFileSettings" value="submit"></td>
</tr>
</table>
</form>
</form>
</fieldset>

@ -1,4 +1,5 @@
<p><b>Uploading via FTP:</b></p>
<p><fieldset>
<b>Uploading via FTP:</b></p>
<p>This is the account for a FTP server where you can host a seed-list file.
If you set this, you will become a principal peer.
Your peer will then upload the seed-bootstrap information periodically,
@ -31,4 +32,5 @@ but only if there had been changes to the seed-list.
<td colspan="3"><input type="submit" name="seedFtpSettings" value="submit"></td>
</tr>
</table>
</form>
</form>
</fieldset>

@ -1,4 +1,5 @@
<p><b>Uploading via SCP:</b></p>
<p><fieldset>
<b>Uploading via SCP:</b></p>
<p>This is the account for a server where you are able to login via ssh.</p>
<form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellspacing="5">
@ -32,5 +33,5 @@
<td colspan="3"><input type="submit" name="seedScpSettings" value="submit"></td>
</tr>
</table>
</fieldset>
</form>
</form>
</fieldset>

@ -1,25 +1,51 @@
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend id="ServerAccess">Server Access Settings</legend>
<p>Here you can restrict access to the server. By default, the access is not limited, because this function is needed to spawn the p2p index-sharing function. If you block access to your server (setting anything else than '*'), then you will also be blocked from using other peers' indexes for search service. However, blocking access may be correct in enterprise environments where you only want to index your company's own web pages.</p>
<p>ATTENTION: Your current IP is recognized as "#[clientIP]#". If the value you enter here does not match with this IP, you will not be able to access the server pages anymore</p>
<fieldset><legend id="general">General Settings</legend>
<p>
<table border="0" cellspacing="5">
<tr valign="top">
<td>IP-Number filter:</td>
<td colspan ="2"><input name="serverfilter" type="text" size="50" maxlength="1000" value="#[serverfilter]#"></td>
<tr valign="top">
<td>IP-Number filter:</td>
<td><input name="serverfilter" type="text" size="50" maxlength="1000" value="#[serverfilter]#"></td>
<td><b>Here you can restrict access to the server.</b> By default, the access is not limited,
because this function is needed to spawn the p2p index-sharing function.
If you block access to your server (setting anything else than '*'), then you will also be blocked
from using other peers' indexes for search service.
However, blocking access may be correct in enterprise environments where you only want to index your
company's own web pages.</td>
</tr>
<!--
<tr valign="top">
<td>Account Name:</td><td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#"></td>
<td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#"></td>
<td></td>
<td></td>
</tr>
<tr valign="top">
<td>Password:</td>
<td><input name="serverpw1" type="password" size="16" maxlength="16" value=""></td>
<td></td>
</tr>
<tr valign="top">
<td>Password (repeat same as above):</td>
<td><input name="serverpw2" type="password" size="16" maxlength="16" value=""></td>
<td></td>
</tr>
-->
<tr valign="top">
<td valign="bottom" rowspan="3"><input type="submit" name="serveraccount" value="Submit"></td>
<td>staticIP (optional):</td>
<td><input name="staticIP" type="text" size="32" maxlength="80" value="#[staticIP]#"></td>
<td><b>The staticIP can help that your peer can be reached by other peers in case that your
peer is behind a firewall or proxy.</b> You can create a tunnel through the firewall/proxy
(look out for 'tunneling through https proxy with connect command') and create
an access point for incoming connections.
This access address can be set here (either as IP number or domain name).
If the address of outgoing connections is equal to the address of incoming connections,
you don't need to set anything here, please leave it blank.<br>
ATTENTION: Your current IP is recognized as "#[clientIP]#".
If the value you enter here does not match with this IP,
you will not be able to access the server pages anymore</td>
</tr>
<tr valign="top">
<td colspan="3"><input type="submit" name="serveraccount" value="submit"></td>
</tr>
<!--
<tr valign="top"><td>Password:</td><td><input name="serverpw1" type="password" size="16" maxlength="16" value=""></td></tr>
<tr valign="top"><td>Password (repeat same as above):</td><td><input name="serverpw2" type="password" size="16" maxlength="16" value=""></td></tr>
-->
</table>
</fieldset>
</form><br>
</form>

@ -30,18 +30,16 @@
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.
</p>
<ul class="settingsMenu">
<li><a href="?page=admin">Administration Account Settings</a></li>
<li><a href="?page=general">General Settings</a></li>
<li><a href="?page=ServerAccess">Server Access Settings</a></li>
<li><a href="?page=ProxyAccess">Proxy Access Settings</a></li>
<li><a href="?page=parser">Content Parser Settings</a></li>
<li><a href="?page=crawler">Crawler Settings</a></li>
<li><a href="?page=http">HTTP Networking</a></li>
<li><a href="?page=proxy">Remote Proxy (optional)</a></li>
<li><a href="?page=portForwarding">Port Forwarding (optional)</a></li>
<li><a href="?page=ServerAccess">Server Access Settings</a></li>
<li><a href="?page=SystemBehaviour">System Behaviour Settings</a></li>
<li><a href="?page=seed">Seed Upload Settings</a></li>
<li><a href="?page=messageForwarding">Message Forwarding (optional)</a></li>
<li><a href="?page=parser">Content Parser Settings</a></li>
<li><a href="?page=crawler">Crawler Settings</a></li>
</ul>
#%[settingsTables]%#

@ -249,7 +249,7 @@ public final class Settings_p {
String uploaderName = (String) uploaderKeys.next();
prop.put("seedUploadMethods_" +count+ "_name", uploaderName);
prop.put("seedUploadMethods_" +count+ "_selected", uploaderName.equals(enabledUploader)?1:0);
prop.put("seedUploadMethods_" +count+ "_file", "yacy/seedUpload/yacySeedUpload" + uploaderName + ".html");
prop.put("seedUploadMethods_" +count+ "_file", "Settings_Seed_Upload" + uploaderName + ".inc");
yacySeedUploader theUploader = yacyCore.getSeedUploader(uploaderName);
String[] configOptions = theUploader.getConfigurationOptions();

@ -95,7 +95,7 @@ public final class search {
// final boolean global = ((String) post.get("resource", "global")).equals("global"); // if true, then result may consist of answers from other peers
// Date remoteTime = yacyCore.parseUniversalDate((String) post.get(yacySeed.MYTIME)); // read remote time
//urls = "nQoUx975gJ5C"; // ONLY FOR TESTS!
// test - http://localhost:8080/yacy/search.html?query=4galTpdpDM5Q
// tell all threads to do nothing for a specific time
sb.intermissionAllThreads(2 * duetime);

Loading…
Cancel
Save