diff options
author | Emiliano Ciavatta | 2020-09-16 15:56:19 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-09-16 15:56:19 +0000 |
commit | a77f2f97f1df204c663119fe8ccafb6f274cb634 (patch) | |
tree | 294d839017dbf67d85a2501e9a0570e87602e30a /frontend/src/components/Connection.js | |
parent | 991d3b6c91d9fe3046ec94a3716a7dd21f496feb (diff) | |
parent | dfd6d543074b4a30c2fc990063ca69ebf8a734e1 (diff) |
Merge branch 'feature/decode-gzip' into develop
Diffstat (limited to 'frontend/src/components/Connection.js')
-rw-r--r-- | frontend/src/components/Connection.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/src/components/Connection.js b/frontend/src/components/Connection.js index e41f542..93c6438 100644 --- a/frontend/src/components/Connection.js +++ b/frontend/src/components/Connection.js @@ -57,6 +57,11 @@ class Connection extends Component { let closedAt = new Date(conn.closed_at); let processedAt = new Date(conn.processed_at); let duration = ((closedAt - startedAt) / 1000).toFixed(3); + if (duration > 1000 || duration < -1000) { + duration = "∞"; + } else { + duration += "s"; + } let timeInfo = <div> <span>Started at {startedAt.toLocaleDateString() + " " + startedAt.toLocaleTimeString()}</span><br/> <span>Processed at {processedAt.toLocaleDateString() + " " + processedAt.toLocaleTimeString()}</span><br/> @@ -106,7 +111,7 @@ class Connection extends Component { <td className="clickable" onClick={this.props.onSelected}> <OverlayTrigger trigger={["focus", "hover"]} placement="right" overlay={popoverFor("duration", timeInfo)}> - <span className="test-tooltip">{duration}s</span> + <span className="test-tooltip">{duration}</span> </OverlayTrigger> </td> <td className="clickable" onClick={this.props.onSelected}>{conn.client_bytes}</td> |