adding convenient option for contacting peer on network page 4. can be used on creating new network. this page is hidden from the interface (not linked).

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7435 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
lotus 2011-01-15 18:49:51 +00:00
parent 930cb412dd
commit c9cd03b532
2 changed files with 21 additions and 1 deletions

View File

@ -357,6 +357,20 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
</tr>
</table>
</form>
<p>&nbsp;</p>
Contacting current peer from another:
<table>
<tr>
<td>ip:port</td>
<td><input id="otherPeerAddress" type="text" size="32" maxlength="128" value=":8080" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="button" value="contact current peer from this peer" onclick="top.location.href='http://' + document.getElementById('otherPeerAddress').value + '/Network.html?peerHash=#[my-hash]#&peerIP=#[my-ip]#&peerPort=#[my-port]#&page=4&addPeer=add+Peer'"/></td>
</tr>
</table>
#(/table)#
#%env/templates/footer.template%#
</body>

View File

@ -182,7 +182,13 @@ public class Network {
prop.put("page", 0);
} else if (post != null && Integer.parseInt(post.get("page", "1")) == 4) {
prop.put("table", 4); // triggers overview
prop.put("page", 4);
prop.put("page", 4);
if (sb.peers.mySeed() != null) {
prop.put("table_my-hash", sb.peers.mySeed().hash );
prop.put("table_my-ip", sb.peers.mySeed().getIP() );
prop.put("table_my-port", sb.peers.mySeed().getPort() );
}
if (post.containsKey("addPeer")) {