Lose the _blank targets on integrated console pages; yellow/green indicators in sidepanel.

This commit is contained in:
z3d
2009-08-11 21:29:43 +00:00
parent b10b0e8f57
commit e5eea47b66
2 changed files with 10 additions and 9 deletions

View File

@ -360,23 +360,24 @@ public class SummaryHelper extends HelperBase {
buf.append(name);
else
buf.append(name.substring(0,15)).append("…");
buf.append("</a></td><td align=\right\"><img src=\"/themes/console/images/local_up.png\" alt=\"status\" title=\"status\"></td></tr>\n");
buf.append("</a></td>\n");
LeaseSet ls = _context.netDb().lookupLeaseSetLocally(h);
if (ls != null) {
long timeToExpire = ls.getEarliestLeaseDate() - _context.clock().now();
if (timeToExpire < 0) {
// red or yellow light
buf.append("<tr><td>&nbsp;</td><td align=\"left\"><i>expired ").append(DataHelper.formatDuration(0-timeToExpire));
buf.append(" ago</i></td></tr>\n");
buf.append("<td align=\right\"><img src=\"/themes/console/images/local_inprogress.png\" alt=\"Rebuilding&hellip;\" title=\"Leases expired ").append(DataHelper.formatDuration(0-timeToExpire));
buf.append(" ago. Rebuilding..\"></td></tr>\n");
} else {
// green light
buf.append("<td align=\right\"><img src=\"/themes/console/images/local_up.png\" alt=\"Ready\" title=\"Ready\"></td></tr>\n");
}
} else {
// yellow light
buf.append("<tr><td>&nbsp;</td><td align=\"left\"><i>No leases</i></td></tr>\n");
buf.append("<td align=\right\"><img src=\"/themes/console/images/local_inprogress.png\" alt=\"Building&hellip;\" title=\"Tunnel building in progress&hellip;\"></td></tr>\n");
}
}
buf.append("</table><hr />\n");
buf.append("</table><hr>\n");
return buf.toString();
}

View File

@ -21,7 +21,7 @@
<jsp:setProperty name="linkhelper" property="maxLines" value="100" />
<jsp:getProperty name="linkhelper" property="content" />
<% } else { %>
<h3><a href="/configclients.jsp" target="_blank" title="Configure startup of clients and webapps (services); manually start dormant services.">I2P Services</a></h3><hr>
<h3><a href="/configclients.jsp" target="_top" title="Configure startup of clients and webapps (services); manually start dormant services.">I2P Services</a></h3><hr>
<table>
<tr>
<td><a href="susidns/index.jsp" target="_blank" title="Manage your I2P hosts file here (I2P domain name resolution).">Addressbook</a>