From c21541a31fe45ba3a0bafca46415247f3837713e Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Fri, 9 Oct 2020 17:07:24 +0200 Subject: Add MainPane --- frontend/src/components/objects/Connection.js | 39 +++++++++------------------ 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'frontend/src/components/objects/Connection.js') diff --git a/frontend/src/components/objects/Connection.js b/frontend/src/components/objects/Connection.js index 5e2beba..e0e942a 100644 --- a/frontend/src/components/objects/Connection.js +++ b/frontend/src/components/objects/Connection.js @@ -17,11 +17,12 @@ import React, {Component} from 'react'; import './Connection.scss'; -import {Form, OverlayTrigger, Popover} from "react-bootstrap"; +import {Form} from "react-bootstrap"; import backend from "../../backend"; import {dateTimeToTime, durationBetween, formatSize} from "../../utils"; import ButtonField from "../fields/ButtonField"; import LinkPopover from "./LinkPopover"; +import TextField from "../fields/TextField"; const classNames = require('classnames'); @@ -81,14 +82,6 @@ class Connection extends Component { Closed at {closedAt.toLocaleDateString() + " " + closedAt.toLocaleTimeString()} ; - const popoverFor = function (name, content) { - return - - {content} - - ; - }; - const commentPopoverContent =
Click to {conn.comment.length > 0 ? "edit" : "add"} comment {conn.comment && } @@ -97,7 +90,7 @@ class Connection extends Component { const copyPopoverContent =
{this.state.copiedMessage ? Copied! : Click to copy the connection id} - +
; return ( @@ -119,22 +112,16 @@ class Connection extends Component { {durationBetween(startedAt, closedAt)} {formatSize(conn["client_bytes"])} {formatSize(conn["server_bytes"])} - - Mark this connection)}> - this.handleAction("mark")}>!! - - - this.handleAction("comment")}>@ - - - this.handleAction("copy")}># - + + this.handleAction("mark")}>!!} + content={Mark this connection} placement="right"/> + this.handleAction("comment")}>@} + content={commentPopoverContent} placement="right"/> + this.handleAction("copy")}>#} + content={copyPopoverContent} placement="right"/> ); -- cgit v1.2.3-70-g09d2