- Persistent option on GUI

- Fix HTML errors
- Refresh improvements
- Fix Rate.equals() bug
- More cleanups
This commit is contained in:
zzz
2011-03-18 15:49:58 +00:00
parent 79358f4271
commit cf0d2197b8
6 changed files with 97 additions and 73 deletions

View File

@ -101,12 +101,11 @@ class SummaryRenderer {
String title;
String p;
// we want the formatting and translation of formatDuration2(), except not zh, and not the  
if ("zh".equals(Messages.getLanguage(_context)))
p = DataHelper.formatDuration(_listener.getRate().getPeriod());
else
//if ("zh".equals(Messages.getLanguage(_context)))
// p = DataHelper.formatDuration(_listener.getRate().getPeriod());
//else
p = DataHelper.formatDuration2(_listener.getRate().getPeriod()).replace(" ", " ");
if (showEvents)
// Note to translators: all runtime zh translation disabled in this file, no font available in RRD
title = name + ' ' + _("events in {0}", p);
else
title = name + ' ' + _("averaged for {0}", p);
@ -133,7 +132,10 @@ class SummaryRenderer {
if (started > start && started < end)
def.vrule(started / 1000, Color.BLACK, _("Restart"), 4.0f);
def.datasource(plotName, path, plotName, SummaryListener.CF, _listener.getBackendName());
def.area(plotName, Color.BLUE, descr + "\\r");
if (descr.length() > 0)
def.area(plotName, Color.BLUE, descr + "\\r");
else
def.area(plotName, Color.BLUE);
if (!hideLegend) {
def.gprint(plotName, SummaryListener.CF, _("avg") + ": %.2f %s");
def.gprint(plotName, "MAX", ' ' + _("max") + ": %.2f %S");