I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 62fb294f authored by zzz's avatar zzz
Browse files

Console: Replace n/a with -- on floodfills page for readability

parent b7e710b2
No related branches found
No related tags found
No related merge requests found
...@@ -267,7 +267,7 @@ class ProfileOrganizerRenderer { ...@@ -267,7 +267,7 @@ class ProfileOrganizerRenderer {
buf.append("<td align=\"right\">").append(davg(dbh, 24*60*60*1000l, ra)).append("</td>"); buf.append("<td align=\"right\">").append(davg(dbh, 24*60*60*1000l, ra)).append("</td>");
} else { } else {
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
buf.append("<td align=\"right\">").append(_t(NA)); buf.append("<td align=\"right\">").append(NA);
} }
buf.append("</tr>\n"); buf.append("</tr>\n");
} }
...@@ -415,18 +415,18 @@ class ProfileOrganizerRenderer { ...@@ -415,18 +415,18 @@ class ProfileOrganizerRenderer {
private final static DecimalFormat _fmt = new DecimalFormat("###,##0.00"); private final static DecimalFormat _fmt = new DecimalFormat("###,##0.00");
private final static String num(double num) { synchronized (_fmt) { return _fmt.format(num); } } private final static String num(double num) { synchronized (_fmt) { return _fmt.format(num); } }
private final static String NA = HelperBase._x("n/a"); private final static String NA = "--";
private String avg (PeerProfile prof, long rate, RateAverages ra) { private String avg (PeerProfile prof, long rate, RateAverages ra) {
RateStat rs = prof.getDbResponseTime(); RateStat rs = prof.getDbResponseTime();
if (rs == null) if (rs == null)
return _t(NA); return NA;
Rate r = rs.getRate(rate); Rate r = rs.getRate(rate);
if (r == null) if (r == null)
return _t(NA); return NA;
r.computeAverages(ra, false); r.computeAverages(ra, false);
if (ra.getTotalEventCount() == 0) if (ra.getTotalEventCount() == 0)
return _t(NA); return NA;
return DataHelper.formatDuration2(Math.round(ra.getAverage())); return DataHelper.formatDuration2(Math.round(ra.getAverage()));
} }
...@@ -447,7 +447,7 @@ class ProfileOrganizerRenderer { ...@@ -447,7 +447,7 @@ class ProfileOrganizerRenderer {
/** @since 0.9.21 */ /** @since 0.9.21 */
private String formatInterval(long now, long then) { private String formatInterval(long now, long then) {
if (then <= 0) if (then <= 0)
return _t(NA); return NA;
// avoid 0 or negative // avoid 0 or negative
if (now <= then) if (now <= then)
return DataHelper.formatDuration2(1); return DataHelper.formatDuration2(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment