- 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 18 years ago
parent 4eb40c4f61
commit 2954f96fae

@ -83,12 +83,13 @@ public class Banner {
int myppm = 0; int myppm = 0;
double myqph = 0; double myqph = 0;
String type = ""; String type = "";
String network = ""; String network = env.getConfig("network.unit.name", "unspecified").toUpperCase();
long nlinks = 0; int peers = yacyCore.seedDB.sizeConnected();
long nwords = 0; long nlinks = yacyCore.seedDB.countActiveURL();
double nqpm = 0; long nwords = yacyCore.seedDB.countActiveRWI();
double nqpm = yacyCore.seedDB.countActiveQPM();
long nppm = yacyCore.seedDB.countActivePPM();
double nqph = 0; double nqph = 0;
long nppm = 0;
yacySeed seed = yacyCore.seedDB.mySeed(); yacySeed seed = yacyCore.seedDB.mySeed();
if (seed != null){ if (seed != null){
@ -97,11 +98,6 @@ public class Banner {
words = Long.parseLong(seed.get(yacySeed.ICOUNT, "0")); words = Long.parseLong(seed.get(yacySeed.ICOUNT, "0"));
myppm = seed.getPPM(); myppm = seed.getPPM();
myqph = 60d * seed.getQPM(); 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()) { if (yacyCore.seedDB.mySeed().isVirgin()) {
type = "VIRGIN"; type = "VIRGIN";
@ -126,10 +122,10 @@ public class Banner {
if (!plasmaGrafics.logoIsLoaded()) { if (!plasmaGrafics.logoIsLoaded()) {
BufferedImage logo = ImageIO.read(new File(IMAGE)); 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;"> <body style="margin:0px;">
#%env/templates/header.template%# #%env/templates/header.template%#
#%env/templates/submenuConfig.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]> <!--[if IE]>
<div style="clear:left;" class="gainlayout"> <div style="clear:left;" class="gainlayout">
<![endif]--> <![endif]-->
@ -132,63 +142,8 @@
</div> </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]%# #%[privateStatusTable]%#
<!--[if IE]> <!--[if IE]>
</div> </div>
<![endif]--> <![endif]-->

@ -1,8 +1,17 @@
<div class="sidebar"> <div class="sidebar">
<fieldset> <fieldset>
<legend>Private System Properties</legend> <legend>System Status</legend>
<dl> <dl>
<dt>Process</dt>
<dd>#[versionpp]#
#(peerStatistics)#
Unknown
::
<div>Uptime: #[uptime]#</div>
#(/peerStatistics)#
</dd>
<dt>System Resources</dt> <dt>System Resources</dt>
<dd>Processors: #[processors]#</dd> <dd>Processors: #[processors]#</dd>
@ -13,8 +22,14 @@
password-protected password-protected
#(/protection)#</dd> #(/protection)#</dd>
<dt>Peer Host</dt> <dt>Address</dt>
<dd>#[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: enabled#(/sslSupport)#</dd> <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)#:: #(portForwarding)#::
<dt>Port Forwarding Host</dt> <dt>Port Forwarding Host</dt>
@ -45,25 +60,22 @@
<dt><a href="Connections_p.html">Incoming Connections</a></dt> <dt><a href="Connections_p.html">Incoming Connections</a></dt>
<dd>Active: #[connectionsActive]# | Idle: #[connectionsIdle]# | Max: #[connectionsMax]#</dd> <dd>Active: #[connectionsActive]# | Idle: #[connectionsIdle]# | Max: #[connectionsMax]#</dd>
<dt><a href="IndexCreateIndexingQueue_p.html">Indexing Queue</a></dt> <dt>Queues</dt>
<dd><table> <dd>
<a href="IndexCreateIndexingQueue_p.html">Indexing Queue</a>:
<table>
<tr> <tr>
<td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[indexingQueuePercent]#%;" ></div></div></td> <td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[indexingQueuePercent]#%;" ></div></div></td>
<td><div class="ProgressBarCaption">#[indexingQueueSize]#&nbsp;|&nbsp;#[indexingQueueMax]#</div></td> <td><div class="ProgressBarCaption">#[indexingQueueSize]#&nbsp;|&nbsp;#[indexingQueueMax]#</div></td>
</tr> </tr>
</table></dd> </table><br>
<dt><a href="IndexCreateLoaderQueue_p.html">Loader Queue</a></dt> <a href="IndexCreateLoaderQueue_p.html">Loader Queue</a>:
<dd><table> <table>
<tr> <tr>
<td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[loaderQueuePercent]#%;" ></div></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> <td><div class="ProgressBarCaption">#[loaderQueueSize]#&nbsp;|&nbsp;#[loaderQueueMax]#</div></td>
</tr> </tr>
</table></dd>
<dt>Crawler Queues</dt>
<dd>
<table>
<tr> <tr>
<td><a href="IndexCreateWWWLocalQueue_p.html">Local Crawl</a></td> <td><a href="IndexCreateWWWLocalQueue_p.html">Local Crawl</a></td>
<td>#[localCrawlQueueSize]#</td> <td>#[localCrawlQueueSize]#</td>

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

@ -357,23 +357,23 @@ public class plasmaGrafics {
} }
//[MN] //[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)) { 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; return bannerPicture;
} }
//[MN] //[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)) { 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; return bannerPicture;
} }
//[MN] //[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; int exprlength = 19;
logo = newLogo; logo = newLogo;
@ -387,7 +387,7 @@ public class plasmaGrafics {
ymageToolPrint.print(bannerPicture, 100, 42, 0, "TYPE: " + addTrailingBlanks(type, exprlength), -1); 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, 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, 22, 0, "LINKS: " + addBlanksAndDots(nlinks, exprlength), -1);
ymageToolPrint.print(bannerPicture, 285, 32, 0, "WORDS: " + addBlanksAndDots(nwords, 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); ymageToolPrint.print(bannerPicture, 285, 42, 0, "QUERIES: " + addTrailingBlanks(nqph + " QUERIES/HOUR", exprlength), -1);

Loading…
Cancel
Save