diff --git a/dashboard.py b/dashboard.py index 3339dc5..5cc6ddc 100644 --- a/dashboard.py +++ b/dashboard.py @@ -392,6 +392,7 @@ class TimeSeries(Widget): max_value = max([d[3] if len(d) >= 4 else d[1] for d in self.lts.data]) max_value = max(max_value, 0.001) # ensure positive + unit = self.lts.description["unit"] if self.yscale == "log": try: min_value = min(d[1] for d in self.lts.data if d[1] > 0) @@ -471,7 +472,8 @@ class TimeSeries(Widget): log.debug("in as_html") return Markup(render_template("timeseries.html", widget=self)) - def format_time(seconds): + def format_time(self, seconds): + value = seconds unit = "s" if value >= 365.25 * 86400: value /= 365.25 * 86400 diff --git a/templates/dashboard.html b/templates/dashboard.html index 20e3ac3..d338b08 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -8,8 +8,9 @@ body { font-family: sans-serif; } - th { + th, td { text-align: left; + vertical-align: baseline; } main { display: flex;