- added servlet to configure the search page greeting line

- added information output about the current network definition in the network servlet
- better description and usage of profile entries in User Profile servlet regarding FOAF format
- reformatting of menues at status page

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4710 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent b9602e891a
commit 3c76342619

@ -48,6 +48,35 @@
#(commitRobinson)#::<div class="commit">For Robinson Mode, index distribution and receive is switched off.</div>#(/commitRobinson)#
#(commitRobinsonWithRemoteIndexing)#::<div class="commit">This Robinson Mode switches remote indexing on, but limits targets to peers within the same cluster. Remote indexing requests from peers within the same cluster are accepted.</div>#(/commitRobinsonWithRemoteIndexing)#
#(commitRobinsonWithoutRemoteIndexing)#::<div class="commit">This Robinson Mode does not allow any remote indexing (neither requests remote indexing, nor accepts it).</div>#(/commitRobinsonWithoutRemoteIndexing)#
<form name="ConfigForm" method="post" action="ConfigNetwork_p.html" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset>
<legend>
<label for="domain">Network and Domain Specification</label>
</legend>
<p>
YaCy can operate a computing grid of YaCy peers or as a stand-alone node.
To control that all participants within a web indexing domain have access to the same domain,
this network definition must be equal to all members of the same YaCy network.
</p>
<dl>
<dt>Network Definition</dt>
<dd>#[network.unit.definition]#</dd>
<dt>Network Nick</dt>
<dd>#[network.unit.name]#</dd>
<dt>Long Description</dt>
<dd>#[network.unit.description]#</dd>
<dt>Indexing Domain</dt>
<dd>#[network.unit.domain]#</dd>
<dt>DHT</dt>
<dd>#[network.unit.dht]#</dd>
</dl>
</fieldset>
</form>
<fieldset>
<legend>
<label for="p2p">Distributed Computing Network for Domain</label>
</legend>
<p>
You can configure if you want to participate at the global YaCy network or if you want to have your
own separate search cluster with or without connection to the global network. You may also define
@ -177,6 +206,7 @@
</fieldset>
<input type="submit" name="save" value="Save" />
</form>
</fieldset>
#%env/templates/footer.template%#
</body>
</html>

@ -41,6 +41,12 @@ public class ConfigNetwork_p {
serverObjects prop = new serverObjects();
int commit = 0;
prop.put("network.unit.definition", sb.getConfig("network.unit.definition", ""));
prop.put("network.unit.name", sb.getConfig("network.unit.name", ""));
prop.put("network.unit.description", sb.getConfig("network.unit.description", ""));
prop.put("network.unit.domain", sb.getConfig("network.unit.domain", ""));
prop.put("network.unit.dht", sb.getConfig("network.unit.dht", ""));
if (post != null) {
boolean crawlResponse = post.get("crawlResponse", "off").equals("on");

@ -0,0 +1,32 @@
<!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]#': Peer Profile</title>
#%env/templates/metas.template%#
</head>
<body id="ConfigProfile">
#%env/templates/header.template%#
#%env/templates/submenuConfig.template%#
<h2>Peer Profile</h2>
<p>
This defines visual attributes of the search interfaces.
</p>
<form action="ConfigPeerProfile_p.html" accept-charset="UTF-8">
<fieldset>
<dl>
<dt><label for="name">Greeting Line (<a href="index.html">visible above the search field</a>)</label></dt>
<dd>
<input type="text" name="promoteSearchPageGreeting" id="promoteSearchPageGreeting" size="80" maxlength="120" value="#[promoteSearchPageGreeting]#" />
</dd>
</dl>
<dl>
<dt>&nbsp;</dt>
<dd>
<input type="submit" name="set" value="Save" />
</dd>
</dl>
</fieldset>
</form>
#%env/templates/footer.template%#
</body>
</html>

@ -0,0 +1,47 @@
// ConfigPeerProfile_p.java
// (C) 2008 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany
// first published 18.04.2008 on http://yacy.net
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
// $LastChangedRevision: 1986 $
// $LastChangedBy: orbiter $
//
// LICENSE
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class ConfigPeerProfile_p {
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch<?> env) {
plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
if (post != null && post.containsKey("set")) {
sb.setConfig("promoteSearchPageGreeting", post.get("promoteSearchPageGreeting", ""));
}
prop.putHTML("promoteSearchPageGreeting", sb.getConfig("promoteSearchPageGreeting", ""));
return prop;
}
}

@ -9,10 +9,8 @@
#%env/templates/submenuConfig.template%#
<h2>Your Personal Profile</h2>
<p>
You can create a personal profile here, which can be seen by other YaCy-members.
</p>
<p>
You do not need to provide any personal data here, but if you want to distribute your contact information, you can do that here.
You can create a personal profile here, which can be seen by other YaCy-members
or <a href="ViewProfile.html?hash=localhash">in the public</a> using a <a href="ViewProfile.rdf?hash=localhash">FOAF RDF file</a>.
</p>
<form action="ConfigProfile_p.html" accept-charset="UTF-8">
<fieldset>

@ -3,17 +3,18 @@
<ul class="SubMenu">
<li><a href="/Status.html" class="MenuItemLink lock">Status</a></li>
<li><a href="/ConfigBasic.html" class="MenuItemLink lock">Access Config</a></li>
<li><a href="/ConfigNetwork_p.html" class="MenuItemLink lock">Network</a></li>
<li><a href="/ConfigLanguage_p.html" class="MenuItemLink lock">Language</a></li>
<li><a href="/ConfigProfile_p.html" class="MenuItemLink lock">Profile</a></li>
<li><a href="/ConfigProfile_p.html" class="MenuItemLink lock">User Profile</a></li>
<li><a href="/ConfigSkins_p.html" class="MenuItemLink lock">Skins</a></li>
<li><a href="/ConfigUpdate_p.html" class="MenuItemLink lock">System Update</a></li>
</ul>
</div>
<div class="SubMenu">
<ul class="SubMenu">
<li><a href="/ConfigNetwork_p.html" class="MenuItemLink lock">Network</a></li>
<li><a href="/ConfigRobotsTxt_p.html" class ="MenuItemLink lock">Local robots.txt</a></li>
<li><a href="/User_p.html" class="MenuItemLink lock">User Administration</a></li>
<li><a href="/ConfigPeerProfile_p.html" class="MenuItemLink lock">Peer Appearance Profile</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>
</ul>

@ -389,13 +389,14 @@ public final class serverFileUtils {
File tf = new File(file.toString() + "." + (System.currentTimeMillis() % 1000));
pw = new PrintWriter(new BufferedOutputStream(new FileOutputStream(tf)));
pw.println("# " + comment);
Iterator<Map.Entry<String, String>> i = props.entrySet().iterator();
String key, value;
Map.Entry<String, String> entry;
while (i.hasNext()) {
entry = i.next();
for (Map.Entry<String, String> entry: props.entrySet()) {
key = entry.getKey();
value = entry.getValue().replaceAll("\n", "\\\\n");
if (entry.getValue() == null) {
value = "";
} else {
value = entry.getValue().replaceAll("\n", "\\\\n");
}
pw.println(key + "=" + value);
}
pw.println("# EOF");

Loading…
Cancel
Save