diff options
author | Emiliano Ciavatta | 2020-05-07 10:25:41 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-05-07 10:25:41 +0000 |
commit | dee7d7dfcbec7ef4475896935873f04d4df0d40f (patch) | |
tree | 78b77cd829b77e1efc9bd27e5d79941d8c14404d /frontend/src/components | |
parent | 8db3b3b43bec6170a7f1db21772c48c5e270c97b (diff) |
Add colors to services dialog
Diffstat (limited to 'frontend/src/components')
-rw-r--r-- | frontend/src/components/Connection.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/frontend/src/components/Connection.js b/frontend/src/components/Connection.js index ce2b173..13b394a 100644 --- a/frontend/src/components/Connection.js +++ b/frontend/src/components/Connection.js @@ -4,24 +4,24 @@ import {Button, OverlayTrigger, Tooltip} from "react-bootstrap"; class Connection extends Component { render() { - let conn = this.props.data - let serviceName = "/dev/null" - let serviceColor = "#0F192E" + let conn = this.props.data; + let serviceName = "/dev/null"; + let serviceColor = "#0F192E"; if (conn.service.port !== 0) { - serviceName = conn.service.name - serviceColor = conn.service.color + serviceName = conn.service.name; + serviceColor = conn.service.color; } - let startedAt = new Date(conn.started_at) - let closedAt = new Date(conn.closed_at) - let duration = ((closedAt - startedAt) / 1000).toFixed(3) - let timeInfo = `Started at ${startedAt}\nClosed at ${closedAt}\nProcessed at ${new Date(conn.processed_at)}` + let startedAt = new Date(conn.started_at); + let closedAt = new Date(conn.closed_at); + let duration = ((closedAt - startedAt) / 1000).toFixed(3); + let timeInfo = `Started at ${startedAt}\nClosed at ${closedAt}\nProcessed at ${new Date(conn.processed_at)}`; - let classes = "connection" + let classes = "connection"; if (this.props.selected) { - classes += " connection-selected" + classes += " connection-selected"; } if (conn.marked){ - classes += " connection-marked" + classes += " connection-marked"; } return ( |