Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- added bootstrap css framework
- adopted all YaCy administration pages to new framework
- created new search page layout (working, but still work in progress)
- old skin files are fully appliable! (and looking good)
- target is a new style based on bootstrap examples, see /test.html
- icons in YaCy may be replaced by glyphicons (to be done)
  • Loading branch information
Orbiter committed Mar 18, 2014
1 parent 05655d9 commit 92655c7
Show file tree
Hide file tree
Showing 69 changed files with 16,990 additions and 386 deletions.
8 changes: 4 additions & 4 deletions htroot/AugmentedBrowsing_p.html
Expand Up @@ -18,30 +18,30 @@ <h2>Augmented Browsing</h2>

<dl>

<dt><label for="content">URL proxy:</label></dt>
<dt>URL proxy:</dt>
<dd>
<input type="checkbox" name="urlproxyenabled" id="urlproxyenabled" #(urlproxyenabled_checked)#:: checked="checked"#(/urlproxyenabled_checked)# />Enabled<br/>
<p class="help">
Globally enables or disables URL proxy via http://yourpeer:yourport/proxy.html?url=http://externalurl/
</p>
</dd>

<dt><label for="content">Show search results via URL proxy:</label></dt>
<dt>Show search results via URL proxy:</dt>
<dd>
<input type="checkbox" name="urlproxyuseforresults" id="urlproxyuseforresults" #(urlproxyuseforresults_checked)#:: checked="checked"#(/urlproxyuseforresults_checked)# />Enabled<br/>
<p class="help">
Enables or disables URL proxy for all search results. If enabled, all search results will be tunneled through URL proxy.
</p>
</dd>

<dt><label for="author">Restrict URL proxy use:</label></dt>
<dt>Restrict URL proxy use:</dt>
<dd>
<input type="text" name="urlproxyfilter" value="#[urlproxyfilter]#" size="60" /><br/><br/>
<p class="help">
Define client filter. Default: 127.0.0.1,0:0:0:0:0:0:0:1.
</p>
</dd>
<dt><label for="subject">URL substitution:</label></dt>
<dt>URL substitution:</dt>
<dd>
<input type="text" name="urlproxydomains" value="#[urlproxydomains]#" size="60" /><br/><br/>
<p class="help">
Expand Down
33 changes: 17 additions & 16 deletions htroot/Bookmarks.html
Expand Up @@ -18,22 +18,7 @@
#(/display)#
>

#(display)#
<div id="api">
<script type="text/javascript">
//<![CDATA[
document.write("\<a href=\"Bookmarks.rss?" + window.location.search.substring(1) + "\"\>")
//]]>
</script>
<a href="#"><img src="env/grafics/api.png" width="60" height="40" alt="API" /></a>
<span>The bookmarks list can also be retrieved as RSS feed. This can also be done when you select a specific tag.
Click the API icon to load the RSS from the current selection.
To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de/wiki/index.php/Dev:API" target="_blank">API wiki page</a>.</span>
</div>
::
#(/display)#

#%env/templates/header.template%#
#%env/templates/header.template%#
<div class="SubMenu">
<h3>Bookmarks</h3>
#(mode)#
Expand Down Expand Up @@ -175,6 +160,22 @@ <h3>Bookmarks</h3>
<!-- (mode=4) -->
#(/mode)#
</div>

#(display)#
<div id="api">
<script type="text/javascript">
//<![CDATA[
document.write("\<a href=\"Bookmarks.rss?" + window.location.search.substring(1) + "\"\>")
//]]>
</script>
<a href="#"><img src="env/grafics/api.png" width="60" height="40" alt="API" /></a>
<span>The bookmarks list can also be retrieved as RSS feed. This can also be done when you select a specific tag.
Click the API icon to load the RSS from the current selection.
To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de/wiki/index.php/Dev:API" target="_blank">API wiki page</a>.</span>
</div>
::
#(/display)#

#(display)#
<!-- show Folders -->
<div class="TagList">
Expand Down
8 changes: 4 additions & 4 deletions htroot/ConfigHeuristics_p.html
Expand Up @@ -34,7 +34,7 @@ <h2>Heuristics Configuration</h2>
<fieldset>
<legend>
<input type="checkbox" name="site_check" id="site" onclick="window.location.href='ConfigHeuristics_p.html?#(site.checked)#site_on=::site_off=#(/site.checked)#'" value="site"#(site.checked)#:: checked="checked"#(/site.checked)# />
<label for="site">'site'-operator: instant shallow crawl</label>
'site'-operator: instant shallow crawl
</legend>
<p>
When a search is made using a 'site'-operator (like: 'download site:yacy.net') then the host of the site-operator is instantly crawled with a host-restricted depth-1 crawl.
Expand All @@ -51,13 +51,13 @@ <h2>Heuristics Configuration</h2>
<td>
<legend>
<input type="checkbox" name="searchresult_check" id="searchresult" onclick="window.location.href='ConfigHeuristics_p.html?#(searchresult.checked)#searchresult_on=::searchresult_off=#(/searchresult.checked)#'" value="searchresult"#(searchresult.checked)#:: checked="checked"#(/searchresult.checked)# />
<label for="searchresult">search-result: shallow crawl on all displayed search results</label>
search-result: shallow crawl on all displayed search results
</legend>
</td>
<td>
<legend>
<input type="checkbox" name="searchresultglobal_check" id="searchresultglobal" onclick="window.location.href='ConfigHeuristics_p.html?#(searchresultglobal.checked)#searchresultglobal_on=::searchresultglobal_off=#(/searchresultglobal.checked)#'" value="siteresultglobal"#(searchresultglobal.checked)#:: checked="checked"#(/searchresultglobal.checked)# />
<label for="searchresultglobal">add as global crawl job</label>
add as global crawl job
</legend>
</td>
</tr>
Expand All @@ -75,7 +75,7 @@ <h2>Heuristics Configuration</h2>
<form id="HeuristicFormOpenSearch" method="post" action="ConfigHeuristics_p.html" enctype="multipart/form-data" accept-charset="UTF-8">
<legend>
<input type="checkbox" name="opensearch_check" id="opensearch" onclick="window.location.href='ConfigHeuristics_p.html?#(opensearch.checked)#opensearch_on=::opensearch_off=#(/opensearch.checked)#'" value="opensearch"#(opensearch.checked)#:: checked="checked"#(/opensearch.checked)# />
<label for="opensearch">opensearch load external search result list from active systems below</label>
opensearch load external search result list from active systems below
</legend>
<p>
When using this heuristic, then every search request line is used for a call to listed opensearch systems until enough results to fill the current search page are available.
Expand Down
14 changes: 7 additions & 7 deletions htroot/ConfigSearchPage_p.html
Expand Up @@ -122,43 +122,43 @@ <h2>#[promoteSearchPageGreeting]#</h2>
<tr>
<td><input type="checkbox" name="search.navigation.protocol" value="true" #(search.navigation.protocol)#::checked="checked" #(/search.navigation.protocol)# /></td>
<td><div id="sidebarProtocols" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Protocol Navigator</h3>
<h3 style="padding-left: 25px;">Protocol Facet</h3>
</div></td>
</tr>
<tr>
<td><input type="checkbox" name="search.navigation.filetype" value="true" #(search.navigation.filetype)#::checked="checked" #(/search.navigation.filetype)# /></td>
<td><div id="sidebarFiletypes" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Filetype Navigator</h3>
<h3 style="padding-left: 25px;">Filetype Facet</h3>
</div></td>
</tr>
<tr>
<td><input type="checkbox" name="search.navigation.hosts" value="true" #(search.navigation.hosts)#::checked="checked" #(/search.navigation.hosts)# /></td>
<td><div id="sidebarDomains" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Domain Navigator</h3>
<h3 style="padding-left: 25px;">Domain Facet</h3>
</div></td>
</tr>
<tr>
<td><input type="checkbox" name="search.navigation.namespace" value="true" #(search.navigation.namespace)#::checked="checked" #(/search.navigation.namespace)# /></td>
<td><div id="sidebarNameSpace" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Wiki Name Space Navigator</h3>
<h3 style="padding-left: 25px;">Wiki Name Space Facet</h3>
</div></td>
</tr>
<tr>
<td><input type="checkbox" name="search.navigation.language" value="true" #(search.navigation.language)#::checked="checked" #(/search.navigation.language)# /></td>
<td><div id="sidebarLanguages" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Language Navigator</h3>
<h3 style="padding-left: 25px;">Language Facet</h3>
</div></td>
</tr>
<tr>
<td><input type="checkbox" name="search.navigation.authors" value="true" #(search.navigation.authors)#::checked="checked" #(/search.navigation.authors)# /></td>
<td><div id="sidebarAuthors" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Author Navigator</h3>
<h3 style="padding-left: 25px;">Author Facet</h3>
</div></td>
</tr>
<tr>
<td></td>
<td><div id="vocabulary" style="float: right; margin-top: 0px; width: 230px;">
<h3 style="padding-left: 25px;">Vocabulary Navigator</h3>
<h3 style="padding-left: 25px;">Vocabulary Facet</h3>
</div></td>
</tr>
<tr>
Expand Down
2 changes: 0 additions & 2 deletions htroot/CrawlCheck_p.html
Expand Up @@ -18,8 +18,6 @@
</head>
<body id="IndexCreate">

<div id="api"></div>

#%env/templates/header.template%#
#%env/templates/submenuTargetAnalysis.template%#
<h2>Crawl Check</h2>
Expand Down
27 changes: 13 additions & 14 deletions htroot/CrawlStartExpert_p.html
Expand Up @@ -200,13 +200,14 @@
</head>
<body id="IndexCreate">

#%env/templates/header.template%#
#%env/templates/submenuIndexCreate.template%#

<div id="api">
<a href="http://www.yacy-websuche.de/wiki/index.php/Dev:API#Managing_crawl_jobs" id="apilink" target="_blank"><img src="env/grafics/api.png" width="60" height="40" alt="API"/></a>
<span>Click on this API button to see a documentation of the POST request parameter for crawl starts.</span>
</div>

#%env/templates/header.template%#
#%env/templates/submenuIndexCreate.template%#

<h2>Expert Crawl Start</h2>

<p id="startCrawling">
Expand All @@ -219,12 +220,10 @@ <h2>Expert Crawl Start</h2>

<form id="Crawler" action="Crawler_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset>
<legend>
<label>Crawl Job</label>
</legend>
<legend>Crawl Job</legend>
<p>A Crawl Job consist of one or more start point, crawl limitations and document freshness rules.</p>
<fieldset>
<legend><label>Start Point</label></legend>
<legend>Start Point</legend>
<dl>
<dt>One Start URL or a list of URLs:<br/>(must start with http:// https:// ftp:// smb:// file://)</dt>
<dd>
Expand Down Expand Up @@ -259,7 +258,7 @@ <h2>Expert Crawl Start</h2>
</dl>
</fieldset>
<fieldset>
<legend><label>Crawler Filter</label></legend>
<legend>Crawler Filter</legend>
<p>These are limitations on the crawl stacker. The filters will be applied before a web page is loaded.</p>
<dl>
<dt>Crawling Depth</dt>
Expand Down Expand Up @@ -338,7 +337,7 @@ <h2>Expert Crawl Start</h2>
</dl>
</fieldset>
<fieldset>
<legend><label>Document Filter</label></legend>
<legend>Document Filter</legend>
<p>These are limitations on index feeder. The filters will be applied after a web page was loaded.</p>
<dl>
<dt>Filter on URLs</dt>
Expand All @@ -362,7 +361,7 @@ <h2>Expert Crawl Start</h2>
</dl>
</fieldset>
<fieldset>
<legend><label>Clean-Up before Crawl Start</label></legend>
<legend>Clean-Up before Crawl Start</legend>
<dl>
<dt>No Deletion</dt>
<dd><span class="info" style="float:right"><img src="env/grafics/i16.gif" width="16" height="16" alt="info"/><span style="right:0px;">
Expand All @@ -388,7 +387,7 @@ <h2>Expert Crawl Start</h2>
</dl>
</fieldset>
<fieldset>
<legend><label>Double-Check Rules</label></legend>
<legend>Double-Check Rules</legend>
<dl>
<dt>No&nbsp;Doubles</dt>
<dd><span class="info" style="float:right"><img src="env/grafics/i16.gif" width="16" height="16" alt="info"/><span style="right:0px;">
Expand All @@ -412,7 +411,7 @@ <h2>Expert Crawl Start</h2>
</dl>
</fieldset>
<fieldset>
<legend><label>Document Cache</label></legend>
<legend>Document Cache</legend>
<dl><dt><label for="storeHTCache">Store to Web Cache</label></dt>
<dd>
<span class="info" style="float:right"><img src="env/grafics/i16.gif" width="16" height="16" alt="info"/><span style="right:0px;">
Expand All @@ -439,7 +438,7 @@ <h2>Expert Crawl Start</h2>
</fieldset>
#(agentSelect)#<input type="hidden" name="agentName" id="agentName" value="#[defaultAgentName]#" />::
<fieldset>
<legend><label>Robot Behaviour</label></legend>
<legend>Robot Behaviour</legend>
<dl>
<dt><label for="collection">Use Special User Agent and robot identification</label></dt>
<dd>
Expand All @@ -459,7 +458,7 @@ <h2>Expert Crawl Start</h2>
</fieldset>
#(/agentSelect)#
<fieldset>
<legend><label>Index Administration</label></legend>
<legend>Index Administration</legend>
<dl>
<dt>Do Local Indexing</dt>
<dd>
Expand Down
4 changes: 1 addition & 3 deletions htroot/CrawlStartScanner_p.html
Expand Up @@ -36,9 +36,7 @@ <h2>Network Scanner</h2>

<form onsubmit="document.getElementById('scanhostinfo').innerHTML='Please wait...'; disableSubmit();" action="CrawlStartScanner_p.html" method="get">
<fieldset>
<legend>
<label>Scan the network</label>
</legend>
<legend>Scan the network</legend>
<dl>
<dt>Scan Range</dt>
<dd align="top">
Expand Down
6 changes: 1 addition & 5 deletions htroot/CrawlStartSite_p.html
Expand Up @@ -18,8 +18,6 @@
</head>
<body id="IndexCreate">

<div id="api"></div>

#%env/templates/header.template%#
#%env/templates/submenuIndexCreate.template%#
<h2>Site Crawling</h2>
Expand All @@ -30,9 +28,7 @@ <h2>Site Crawling</h2>
</p>

<fieldset>
<legend>
<label>Site Crawl Start</label>
</legend>
<legend>Site Crawl Start</legend>
<form id="Crawler" method="post" action="Crawler_p.html" enctype="multipart/form-data" accept-charset="UTF-8">
<dl>
<dt><label>Site</label></dt>
Expand Down
15 changes: 8 additions & 7 deletions htroot/Crawler_p.html
Expand Up @@ -12,13 +12,14 @@
</head>
<body id="Crawler" onload="initCrawler();">

#%env/templates/header.template%#
#%env/templates/submenuCrawlMonitor.template%#

<div id="api">
<a href="api/status_p.xml" id="apilink"><img src="env/grafics/api.png" width="60" height="40" alt="API"/></a>
<span>Click on this API button to see an XML with information about the crawler status</span>
</div>

#%env/templates/header.template%#
#%env/templates/submenuCrawlMonitor.template%#
<h2>Crawler</h2>
<noscript><p>(Please enable JavaScript to automatically update this page!)</p></noscript>
<fieldset id="queues" style="width:180px;float:left;">
Expand Down Expand Up @@ -161,13 +162,13 @@ <h2>Crawler</h2>
</fieldset>
<script>
if (document.getElementById("progress").clientHeight > document.getElementById("indexsize").clientHeight) {
document.getElementById("indexsize").style.height = (document.getElementById("progress").clientHeight-20)+"px";
document.getElementById("progress").style.height = (document.getElementById("progress").clientHeight-20)+"px";
document.getElementById("indexsize").style.height = (document.getElementById("progress").clientHeight)+"px";
document.getElementById("progress").style.height = (document.getElementById("progress").clientHeight)+"px";
} else {
document.getElementById("progress").style.height = (document.getElementById("indexsize").clientHeight-20)+"px";
document.getElementById("indexsize").style.height = (document.getElementById("indexsize").clientHeight-20)+"px";
document.getElementById("progress").style.height = (document.getElementById("indexsize").clientHeight)+"px";
document.getElementById("indexsize").style.height = (document.getElementById("indexsize").clientHeight)+"px";
}
document.getElementById("queues").style.height = (document.getElementById("indexsize").clientHeight-20)+"px";
document.getElementById("queues").style.height = (document.getElementById("indexsize").clientHeight)+"px";
</script>
<p class="watchCrawler" style="clear:both;">
#(info)#
Expand Down
6 changes: 6 additions & 0 deletions htroot/HostBrowser.html
Expand Up @@ -68,6 +68,12 @@
#%env/templates/embeddedheader.template%#
::
#%env/templates/simpleheader.template%#
<script type="text/javascript">
document.getElementById("header_hostbrowser").className += " active";
//document.getElementById("greeting").innerHTML="#[promoteSearchPageGreeting]#";
document.getElementById("greeting-icon").src="#[promoteSearchPageGreeting.smallImage]#";
document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";
</script>
#(/topmenu)#
<h2>Host Browser</h2>
<p>Browse the index of #[ucount]# documents. Enter a host or an URL for a file list or view a list of <a href="HostBrowser.html?hosts=">all hosts</a>, <a href="HostBrowser.html?hosts=crawling">only hosts with urls pending in the crawler</a> or <a href="HostBrowser.html?hosts=error">only with load errors</a>.</p>
Expand Down
10 changes: 9 additions & 1 deletion htroot/HostBrowser.java
Expand Up @@ -54,6 +54,7 @@
import net.yacy.kelondro.data.meta.URIMetadataNode;
import net.yacy.peers.graphics.WebStructureGraph.StructureEntry;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.search.index.Fulltext;
import net.yacy.search.index.Segment.ReferenceReport;
import net.yacy.search.index.Segment.ReferenceReportCache;
Expand Down Expand Up @@ -96,7 +97,14 @@ public static serverObjects respond(final RequestHeader header, final serverObje
} else { // for other respect setting in Search Design Configuration
prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);
}

final String promoteSearchPageGreeting =
(env.getConfigBool(SwitchboardConstants.GREETING_NETWORK_NAME, false)) ?
env.getConfig("network.unit.description", "") :
env.getConfig(SwitchboardConstants.GREETING, "");
prop.put("topmenu_promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("topmenu_promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
prop.put("topmenu_promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));

if (!searchAllowed) {
prop.put("result", "You are not allowed to use this page. Please ask an administrator for permission.");
prop.putNum("ucount", 0);
Expand Down

0 comments on commit 92655c7

Please sign in to comment.