- removed public peer info box on status page, this info can now be seen in the status banner

- added peer count to banner
- added some values to protected status box

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4257 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 4eb40c4f61
commit 2954f96fae

@ -77,18 +77,19 @@ public class Banner {
height = post.getInt("heigth", height);
}
String name = "";
long links = 0;
long words = 0;
int myppm = 0;
double myqph = 0;
String type = "";
String network = "";
long nlinks = 0;
long nwords = 0;
double nqpm = 0;
double nqph = 0;
long nppm = 0;
String name = "";
long links = 0;
long words = 0;
int myppm = 0;
double myqph = 0;
String type = "";
String network = env.getConfig("network.unit.name", "unspecified").toUpperCase();
int peers = yacyCore.seedDB.sizeConnected();
long nlinks = yacyCore.seedDB.countActiveURL();
long nwords = yacyCore.seedDB.countActiveRWI();
double nqpm = yacyCore.seedDB.countActiveQPM();
long nppm = yacyCore.seedDB.countActivePPM();
double nqph = 0;
yacySeed seed = yacyCore.seedDB.mySeed();
if (seed != null){
@ -97,11 +98,6 @@ public class Banner {
words = Long.parseLong(seed.get(yacySeed.ICOUNT, "0"));
myppm = seed.getPPM();
myqph = 60d * seed.getQPM();
network = env.getConfig("network.unit.name", "unspecified").toUpperCase();
nlinks = yacyCore.seedDB.countActiveURL();
nwords = yacyCore.seedDB.countActiveRWI();
nqpm = yacyCore.seedDB.countActiveQPM();
nppm = yacyCore.seedDB.countActivePPM();
if (yacyCore.seedDB.mySeed().isVirgin()) {
type = "VIRGIN";
@ -126,10 +122,10 @@ public class Banner {
if (!plasmaGrafics.logoIsLoaded()) {
BufferedImage logo = ImageIO.read(new File(IMAGE));
return plasmaGrafics.getBannerPicture(1000, width, height, bgcolor, textcolor, bordercolor, name, links, words, type, myppm, network, nlinks, nwords, nqph, nppm, logo);
return plasmaGrafics.getBannerPicture(1000, width, height, bgcolor, textcolor, bordercolor, name, links, words, type, myppm, network, peers, nlinks, nwords, nqph, nppm, logo);
}
return plasmaGrafics.getBannerPicture(1000, width, height, bgcolor, textcolor, bordercolor, name, links, words, type, myppm, network, nlinks, nwords, nqph, nppm);
return plasmaGrafics.getBannerPicture(1000, width, height, bgcolor, textcolor, bordercolor, name, links, words, type, myppm, network, peers, nlinks, nwords, nqph, nppm);
}
}

@ -8,6 +8,16 @@
<body style="margin:0px;">
#%env/templates/header.template%#
#%env/templates/submenuConfig.template%#
#(showPrivateTable)#
<div class="SubMenu">
<ul class="SubMenu">
<li><a href="Status.html?login=" class="MenuItemLink lock">Log-in as administrator to see full status</a></li>
</ul>
</div>
::
#(/showPrivateTable)#
<!--[if IE]>
<div style="clear:left;" class="gainlayout">
<![endif]-->
@ -132,63 +142,8 @@
</div>
<div class="sidebar">
<fieldset>
<legend>Public System Properties</legend>
<dl>
<dt>System Version</dt>
<dd>#[versionpp]#</dd>
<dt>This&nbsp;peer's&nbsp;address</dt>
<dd>#(peerAddress)#
Not assigned
::
http://#[address]#<br/>
http://#[peername]#.yacy
#(/peerAddress)#</dd>
<dt>This peer's name</dt>
<dd>#[peerName]#/#[hash]#</dd>
<dt>This peer's statistics</dt>
<dd>#(peerStatistics)#
Unknown
::
<div>Uptime: #[uptime]#</div>
<div>Links/RWI: #[links]# / #[words]#</div>
<div>PPM/QPH: #[pagesperminute]# / #[queriesperhour]#</div>
<div>Connects:
<span title="connected Juniors">#[juniorConnects]#</span> | <span title="connected Seniors">#[seniorConnects]#</span> | <span title="connected Principals">#[principalConnects]#</span> | <span title="disconnected peers">#[disconnects]#</span> (#[connects]# peers/hour)
#(/peerStatistics)#
</div></dd>
<dt>This peer's status</dt>
<dd>#(peerStatus)#
Virgin
::
Junior
::
Senior
::
Principal
#(/peerStatus)#</dd>
<dt>Other peers</dt>
<dd>#(otherPeers)#not online::#[num]# other peers online.#(/otherPeers)#</dd>
#(showPrivateTable)#
<dt>Log-In</dt>
<dd>Click here to <a href="Status.html?login=">log in</a> as administrator and see full status.</dd>
::
#(/showPrivateTable)#
</dl>
</fieldset>
</div>
#%[privateStatusTable]%#
<!--[if IE]>
</div>
<![endif]-->

@ -1,8 +1,17 @@
<div class="sidebar">
<fieldset>
<legend>Private System Properties</legend>
<legend>System Status</legend>
<dl>
<dt>Process</dt>
<dd>#[versionpp]#
#(peerStatistics)#
Unknown
::
<div>Uptime: #[uptime]#</div>
#(/peerStatistics)#
</dd>
<dt>System Resources</dt>
<dd>Processors: #[processors]#</dd>
@ -13,8 +22,14 @@
password-protected
#(/protection)#</dd>
<dt>Peer Host</dt>
<dd>#[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: enabled#(/sslSupport)#</dd>
<dt>Address</dt>
<dd>Host: #[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: enabled#(/sslSupport)#<br>
#(peerAddress)#
peer address not assigned
::
Public Address: http://#[address]#<br/>
YaCy Address: http://#[peername]#.yacy
#(/peerAddress)#</dd>
#(portForwarding)#::
<dt>Port Forwarding Host</dt>
@ -45,43 +60,40 @@
<dt><a href="Connections_p.html">Incoming Connections</a></dt>
<dd>Active: #[connectionsActive]# | Idle: #[connectionsIdle]# | Max: #[connectionsMax]#</dd>
<dt><a href="IndexCreateIndexingQueue_p.html">Indexing Queue</a></dt>
<dd><table>
<dt>Queues</dt>
<dd>
<a href="IndexCreateIndexingQueue_p.html">Indexing Queue</a>:
<table>
<tr>
<td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[indexingQueuePercent]#%;" ></div></div></td>
<td><div class="ProgressBarCaption">#[indexingQueueSize]#&nbsp;|&nbsp;#[indexingQueueMax]#</div></td>
</tr>
</table></dd>
</table><br>
<dt><a href="IndexCreateLoaderQueue_p.html">Loader Queue</a></dt>
<dd><table>
<a href="IndexCreateLoaderQueue_p.html">Loader Queue</a>:
<table>
<tr>
<td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[loaderQueuePercent]#%;" ></div></div></td>
<td><div class="ProgressBarCaption">#[loaderQueueSize]#&nbsp;|&nbsp;#[loaderQueueMax]#</div></td>
<td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[loaderQueuePercent]#%;" ></div></div></td>
<td><div class="ProgressBarCaption">#[loaderQueueSize]#&nbsp;|&nbsp;#[loaderQueueMax]#</div></td>
</tr>
</table></dd>
<dt>Crawler Queues</dt>
<dd>
<table>
<tr>
<td><a href="IndexCreateWWWLocalQueue_p.html">Local Crawl</a></td>
<td>#[localCrawlQueueSize]#</td>
<td><a href="Status.html?#(localCrawlPaused)#pauseCrawlJob::continueCrawlJob#(/localCrawlPaused)#=&amp;jobType=localCrawl" title="#(localCrawlPaused)#pause local crawl::continue local crawl#(/localCrawlPaused)#"><img src="env/grafics/#(localCrawlPaused)#stop.gif::start.gif#(/localCrawlPaused)#" alt="#(localCrawlPaused)#pause local crawl::continue local crawl#(/localCrawlPaused)#" style="width:12px;height:12px;" /></a></td>
<td>#(localCrawlPaused)#&nbsp;::(paused)#(/localCrawlPaused)#</td>
</tr>
<tr>
<td><a href="IndexCreateWWWRemoteQueue_p.html">Remote triggered Crawl</a></td>
<td>#[remoteTriggeredCrawlQueueSize]#</td>
<td><a href="Status.html?#(remoteTriggeredCrawlPaused)#pauseCrawlJob::continueCrawlJob#(/remoteTriggeredCrawlPaused)#=&amp;jobType=remoteTriggeredCrawl" title="#(remoteTriggeredCrawlPaused)#pause remote triggered crawl::continue remote triggered crawl#(/remoteTriggeredCrawlPaused)#"><img src="env/grafics/#(remoteTriggeredCrawlPaused)#stop.gif::start.gif#(/remoteTriggeredCrawlPaused)#" alt="#(remoteTriggeredCrawlPaused)#pause remote triggered crawl::continue remote triggered crawl#(/remoteTriggeredCrawlPaused)#" style="width:12px;height:12px;" /></a></td>
<td>#(remoteTriggeredCrawlPaused)#&nbsp;::(paused)#(/remoteTriggeredCrawlPaused)#</td>
</tr>
<tr>
<td>Pre-Queueing</td>
<td>#[stackCrawlQueueSize]#</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="IndexCreateWWWLocalQueue_p.html">Local Crawl</a></td>
<td>#[localCrawlQueueSize]#</td>
<td><a href="Status.html?#(localCrawlPaused)#pauseCrawlJob::continueCrawlJob#(/localCrawlPaused)#=&amp;jobType=localCrawl" title="#(localCrawlPaused)#pause local crawl::continue local crawl#(/localCrawlPaused)#"><img src="env/grafics/#(localCrawlPaused)#stop.gif::start.gif#(/localCrawlPaused)#" alt="#(localCrawlPaused)#pause local crawl::continue local crawl#(/localCrawlPaused)#" style="width:12px;height:12px;" /></a></td>
<td>#(localCrawlPaused)#&nbsp;::(paused)#(/localCrawlPaused)#</td>
</tr>
<tr>
<td><a href="IndexCreateWWWRemoteQueue_p.html">Remote triggered Crawl</a></td>
<td>#[remoteTriggeredCrawlQueueSize]#</td>
<td><a href="Status.html?#(remoteTriggeredCrawlPaused)#pauseCrawlJob::continueCrawlJob#(/remoteTriggeredCrawlPaused)#=&amp;jobType=remoteTriggeredCrawl" title="#(remoteTriggeredCrawlPaused)#pause remote triggered crawl::continue remote triggered crawl#(/remoteTriggeredCrawlPaused)#"><img src="env/grafics/#(remoteTriggeredCrawlPaused)#stop.gif::start.gif#(/remoteTriggeredCrawlPaused)#" alt="#(remoteTriggeredCrawlPaused)#pause remote triggered crawl::continue remote triggered crawl#(/remoteTriggeredCrawlPaused)#" style="width:12px;height:12px;" /></a></td>
<td>#(remoteTriggeredCrawlPaused)#&nbsp;::(paused)#(/remoteTriggeredCrawlPaused)#</td>
</tr>
<tr>
<td>Pre-Queueing</td>
<td>#[stackCrawlQueueSize]#</td>
<td></td>
<td></td>
</tr>
</table>
</dd>

@ -390,13 +390,13 @@ div.welcome { /* The heading in Status.html */
margin:10px 0;
padding-top:130px;
text-align:left;
width:44%;
width:55%;
background:url(/env/grafics/kaskelix.png) top center no-repeat;
}
div.sidebar { /* sidebars on the right side */
float:left;
width:27%;
width:45%;
margin:10px 0;
padding-top:10px;
text-align:left;

@ -357,23 +357,23 @@ public class plasmaGrafics {
}
//[MN]
public static ymageMatrix getBannerPicture(long maxAge, int width, int height, String bgcolor, String textcolor, String bordercolor, String name, long links, long words, String type, int ppm, String network, long nlinks, long nwords, double nqph, long nppm) {
public static ymageMatrix getBannerPicture(long maxAge, int width, int height, String bgcolor, String textcolor, String bordercolor, String name, long links, long words, String type, int ppm, String network, int peers, long nlinks, long nwords, double nqph, long nppm) {
if ((bannerPicture == null) || ((System.currentTimeMillis() - bannerPictureDate) > maxAge)) {
drawBannerPicture(width, height, bgcolor, textcolor, bordercolor, name, links, words, type, ppm, network, nlinks, nwords, nqph, nppm, logo);
drawBannerPicture(width, height, bgcolor, textcolor, bordercolor, name, links, words, type, ppm, network, peers, nlinks, nwords, nqph, nppm, logo);
}
return bannerPicture;
}
//[MN]
public static ymageMatrix getBannerPicture(long maxAge, int width, int height, String bgcolor, String textcolor, String bordercolor, String name, long links, long words, String type, int ppm, String network, long nlinks, long nwords, double nqph, long nppm, BufferedImage newLogo) {
public static ymageMatrix getBannerPicture(long maxAge, int width, int height, String bgcolor, String textcolor, String bordercolor, String name, long links, long words, String type, int ppm, String network, int peers, long nlinks, long nwords, double nqph, long nppm, BufferedImage newLogo) {
if ((bannerPicture == null) || ((System.currentTimeMillis() - bannerPictureDate) > maxAge)) {
drawBannerPicture(width, height, bgcolor, textcolor, bordercolor, name, links, words, type, ppm, network, nlinks, nwords, nqph, nppm, newLogo);
drawBannerPicture(width, height, bgcolor, textcolor, bordercolor, name, links, words, type, ppm, network, peers, nlinks, nwords, nqph, nppm, newLogo);
}
return bannerPicture;
}
//[MN]
private static void drawBannerPicture(int width, int height, String bgcolor, String textcolor, String bordercolor, String name, long links, long words, String type, int ppm, String network, long nlinks, long nwords, double nqph, long nppm, BufferedImage newLogo) {
private static void drawBannerPicture(int width, int height, String bgcolor, String textcolor, String bordercolor, String name, long links, long words, String type, int ppm, String network, int peers, long nlinks, long nwords, double nqph, long nppm, BufferedImage newLogo) {
int exprlength = 19;
logo = newLogo;
@ -387,7 +387,7 @@ public class plasmaGrafics {
ymageToolPrint.print(bannerPicture, 100, 42, 0, "TYPE: " + addTrailingBlanks(type, exprlength), -1);
ymageToolPrint.print(bannerPicture, 100, 52, 0, "SPEED: " + addTrailingBlanks(ppm + " PAGES/MINUTE", exprlength), -1);
ymageToolPrint.print(bannerPicture, 285, 12, 0, "NETWORK: " + addTrailingBlanks(network, exprlength), -1);
ymageToolPrint.print(bannerPicture, 285, 12, 0, "NETWORK: " + addTrailingBlanks(network + " [" + peers + "]", exprlength), -1);
ymageToolPrint.print(bannerPicture, 285, 22, 0, "LINKS: " + addBlanksAndDots(nlinks, exprlength), -1);
ymageToolPrint.print(bannerPicture, 285, 32, 0, "WORDS: " + addBlanksAndDots(nwords, exprlength), -1);
ymageToolPrint.print(bannerPicture, 285, 42, 0, "QUERIES: " + addTrailingBlanks(nqph + " QUERIES/HOUR", exprlength), -1);

Loading…
Cancel
Save