From 38171549fb0d722943639c417885da13df3cd10c Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sun, 10 Jan 2016 19:47:30 +0300 Subject: [PATCH] Show error counter in bold red if it's greater than zero --- dashboard/css/app.css | 4 ++++ dashboard/js/app.jsx | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dashboard/css/app.css b/dashboard/css/app.css index 7808121..1a515a3 100644 --- a/dashboard/css/app.css +++ b/dashboard/css/app.css @@ -25,6 +25,10 @@ body { text-align: right; font-family: monospace; } + .table-cell.attn { + font-weight: 600; + color: red; + } .table-cell.col-name { width: 350px; text-align: left; diff --git a/dashboard/js/app.jsx b/dashboard/js/app.jsx index df35b79..bfce4d6 100644 --- a/dashboard/js/app.jsx +++ b/dashboard/js/app.jsx @@ -93,11 +93,16 @@ var Header = React.createClass({ var StatsRow = React.createClass({ render: function() { var value = this.props.value; + var errorsClasses = ["table-cell", "col-errors"]; + if (value.errors > 0) { + errorsClasses.push("attn"); + } + return (
{this.props.name}
{value.processed}
-
{value.errors}
+
{value.errors}
{formatDuration(value.min)}
{formatDuration(value.median)}
{formatDuration(value.max)}