- integrated live search in the IndexControlURLs input window for URLs:

this searchs for occurrences of the given word in URLs and presents them
  in a pop-up list below the input line
- some bugfixes for the new robots table viewer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6735 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent ae2f3f000f
commit 3014e5f6f9

@ -4,13 +4,66 @@
<head>
<title>YaCy '#[clientname]#': Index Control</title>
#%env/templates/metas.template%#
<script language="Javascript">
//<![CDATA[
function xmlhttpPost() {
var searchform = document.forms['searchform'];
search(searchform.urlstring.value);
}
function search(query) {
var xmlHttpReq = false;
var self = this;
if (window.XMLHttpRequest) { // Mozilla/Safari
self.xmlHttpReq = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('GET', "yacysearch.json?verify=false&resource=local&maximumRecords=100&nav=none&query=" + query + "+inurl:" + query, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatepage(self.xmlHttpReq.responseText);
}
}
self.xmlHttpReq.send(null);
}
function updatepage(str) {
var raw = document.getElementById("raw");
if (raw != null) raw.innerHTML = str;
var rsp = eval("("+str+")");
var firstChannel = rsp.channels[0];
var totalResults = firstChannel.totalResults.replace(/[,.]/,"");
var startIndex = firstChannel.startIndex;
var itemsPerPage = firstChannel.itemsPerPage;
var navigation = firstChannel.navigation;
var html = "";
if (totalResults > 0 && firstChannel.items.length > 0) {
var item;
html += "<table class=\"networkTable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"99%\">";
html += "<tr class=\"TableHeader\" valign=\"bottom\">";
html += "<td>URL from index (total results = " + totalResults + ")</td>";
for (var i = 0; i < firstChannel.items.length; i++) {
item = firstChannel.items[i];
html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"IndexControlURLs_p.html?urlstringsearch=&urlstring=" + item.link + "\">" + item.link + "</a></td>";
}
html += "</table>";
}
document.getElementById("searchresults").innerHTML = html;
}
//]]>
</script>
</head>
<body id="IndexControl">
#%env/templates/header.template%#
#%env/templates/submenuIndexControl.template%#
<h2>Index Administration</h2>
<p>The local index currently contains #[ucount]# URL references</p>
<form action="IndexControlURLs_p.html" method="post" enctype="multipart/form-data">
<form action="IndexControlURLs_p.html" name="searchform" method="post" enctype="multipart/form-data" onkeyup="xmlhttpPost(); return false;">
<fieldset><legend>URL Retrieval</legend>
<dl>
<dt class="TableCellDark">Select Segment:</dt>
@ -24,7 +77,8 @@
<dt class="TableCellDark">Retrieve by URL:</dt>
<dd><input type="text" name="urlstring" value="#[urlstring]#" size="40" maxlength="250" />
<input type="submit" name="urlstringsearch" value="Show Details for URL" />
<input type="submit" name="urlstringsearch" value="Show Details for URL" /><br />
<div id="searchresults"></div>
</dd>
<dt class="TableCellDark">Retrieve by URL-Hash:</dt>
@ -36,6 +90,8 @@
</fieldset>
</form>
#(statistics)#::
<form action="IndexControlURLs_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Statistics about top-domains in URL Database</legend>

@ -107,6 +107,10 @@
<dd class="hint">Latest public version is v#[latestVersion]#.
You can download a more recent version of YaCy. Click here to install this update and restart YaCy:
<form action="Status.html" method="get" class="PeerControl">
<form action="Table_API_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8" name="apilist">
<button type="submit" name="aquirerelease" value="Update YaCy">
<img src="/env/grafics/lock.gif" />
Install YaCy v#[latestVersion]#

@ -23,7 +23,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
#%env/templates/submenuCrawlMonitor.template%#
<h2>robots.txt table</h2>
<iframe src="/api/table_p.html?table=robots&row=hostname,modDate,date,disallow,etag,sitemap" width="100%" height="600" frameborder="0" scrolling="auto"></iframe><br />
<iframe src="/api/table_p.html?table=robots&row=hostname,modDate,date,disallow,crawlDelayMillis,etag,sitemap" width="100%" height="600" frameborder="0" scrolling="auto"></iframe><br />
#%env/templates/footer.template%#
</body>

@ -9,7 +9,7 @@
</head>
<body id="Table">
#(showtable)#::
<form action="/Tables_p.html" method="post" target="_blank" enctype="multipart/form-data" accept-charset="UTF-8" name="tablelisting">
<form action="/Tables_p.html" method="post" target="_parent" enctype="multipart/form-data" accept-charset="UTF-8" name="tablelisting">
<fieldset>
<legend><label for="table">Table: '#[table]#'</label></legend>
<table border="0" cellpadding="2" cellspacing="1">

@ -57,7 +57,7 @@ public class table_p {
for (int i = 0; i < row.length; i++) {
if (columns.contains(row[i])) {
columns.remove(row[i]);
columns.add(i, row[i]);
if (i < columns.size()) columns.add(i, row[i]);
}
}

Loading…
Cancel
Save