alignment fix

This commit is contained in:
zzz
2010-01-02 02:39:24 +00:00
parent 9d0e300924
commit 72db6d1a08

View File

@ -85,41 +85,40 @@ public class TunnelRenderer {
} }
out.write("<tr>"); out.write("<tr>");
if (cfg.getReceiveTunnel() != null) if (cfg.getReceiveTunnel() != null)
out.write(" <td class=\"cells\" align=\"center\">" + cfg.getReceiveTunnel().getTunnelId() +"</td>"); out.write("<td class=\"cells\" align=\"center\">" + cfg.getReceiveTunnel().getTunnelId() +"</td>");
else else
out.write(" <td class=\"cells\" align=\"center\">n/a</td>"); out.write("<td class=\"cells\" align=\"center\">n/a</td>");
if (cfg.getReceiveFrom() != null) if (cfg.getReceiveFrom() != null)
out.write(" <td class=\"cells\" align=\"right\">" + netDbLink(cfg.getReceiveFrom()) +"</td>"); out.write("<td class=\"cells\" align=\"center\">" + netDbLink(cfg.getReceiveFrom()) +"</td>");
else else
out.write(" <td class=\"cells\" align=\"center\">&nbsp;</td>"); out.write("<td class=\"cells\">&nbsp;</td>");
if (cfg.getSendTunnel() != null) if (cfg.getSendTunnel() != null)
out.write(" <td class=\"cells\" align=\"center\">" + cfg.getSendTunnel().getTunnelId() +"</td>"); out.write("<td class=\"cells\" align=\"center\">" + cfg.getSendTunnel().getTunnelId() +"</td>");
else else
out.write(" <td class=\"cells\" align=\"center\">&nbsp;</td>"); out.write("<td class=\"cells\">&nbsp;</td>");
if (cfg.getSendTo() != null) if (cfg.getSendTo() != null)
out.write(" <td class=\"cells\" align=\"center\">" + netDbLink(cfg.getSendTo()) +"</td>"); out.write("<td class=\"cells\" align=\"center\">" + netDbLink(cfg.getSendTo()) +"</td>");
else else
// out.write(" <td class=\"cells\" align=\"center\">&nbsp;</td>"); out.write("<td class=\"cells\">&nbsp;</td>");
out.write(" <td class=\"cells\" align=\"center\">&nbsp;</td>");
long timeLeft = cfg.getExpiration()-_context.clock().now(); long timeLeft = cfg.getExpiration()-_context.clock().now();
if (timeLeft > 0) if (timeLeft > 0)
out.write(" <td class=\"cells\" align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>"); out.write("<td class=\"cells\" align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>");
else else
out.write(" <td class=\"cells\" align=\"center\">(" + _("grace period") + ")</td>"); out.write("<td class=\"cells\" align=\"center\">(" + _("grace period") + ")</td>");
out.write(" <td class=\"cells\" align=\"center\">" + cfg.getProcessedMessagesCount() + "KB</td>"); out.write("<td class=\"cells\" align=\"center\">" + cfg.getProcessedMessagesCount() + "KB</td>");
int lifetime = (int) ((_context.clock().now() - cfg.getCreation()) / 1000); int lifetime = (int) ((_context.clock().now() - cfg.getCreation()) / 1000);
if (lifetime <= 0) if (lifetime <= 0)
lifetime = 1; lifetime = 1;
if (lifetime > 10*60) if (lifetime > 10*60)
lifetime = 10*60; lifetime = 10*60;
int bps = 1024 * (int) cfg.getProcessedMessagesCount() / lifetime; int bps = 1024 * (int) cfg.getProcessedMessagesCount() / lifetime;
out.write(" <td class=\"cells\" align=\"center\">" + bps + "Bps</td>"); out.write("<td class=\"cells\" align=\"center\">" + bps + "Bps</td>");
if (cfg.getSendTo() == null) if (cfg.getSendTo() == null)
out.write(" <td class=\"cells\" align=\"center\">" + _("Outbound Endpoint") + "</td>"); out.write("<td class=\"cells\" align=\"center\">" + _("Outbound Endpoint") + "</td>");
else if (cfg.getReceiveFrom() == null) else if (cfg.getReceiveFrom() == null)
out.write(" <td class=\"cells\" align=\"center\">" + _("Inbound Gateway") + "</td>"); out.write("<td class=\"cells\" align=\"center\">" + _("Inbound Gateway") + "</td>");
else else
out.write(" <td class=\"cells\" align=\"center\">" + _("Participant") + "</td>"); out.write("<td class=\"cells\" align=\"center\">" + _("Participant") + "</td>");
out.write("</tr>\n"); out.write("</tr>\n");
processed += cfg.getProcessedMessagesCount(); processed += cfg.getProcessedMessagesCount();
} }