1
0
Fork 0

Show error counter in bold red if it's greater than zero

This commit is contained in:
Gregory Eremin 2016-01-10 19:47:30 +03:00
parent d9717e60c9
commit 38171549fb
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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 (
<div className="table-row">
<div className="table-cell col-name">{this.props.name}</div>
<div className="table-cell col-processed">{value.processed}</div>
<div className="table-cell col-errors">{value.errors}</div>
<div className={errorsClasses.join(" ")}>{value.errors}</div>
<div className="table-cell col-min">{formatDuration(value.min)}</div>
<div className="table-cell col-median">{formatDuration(value.median)}</div>
<div className="table-cell col-max">{formatDuration(value.max)}</div>