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 ++++++++----------------
frontend/src/components/objects/Connection.scss | 4 +++
frontend/src/components/objects/LinkPopover.scss | 5 +++
3 files changed, 22 insertions(+), 26 deletions(-)
(limited to 'frontend/src/components/objects')
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"/>
|
);
diff --git a/frontend/src/components/objects/Connection.scss b/frontend/src/components/objects/Connection.scss
index 3b9f479..bf66272 100644
--- a/frontend/src/components/objects/Connection.scss
+++ b/frontend/src/components/objects/Connection.scss
@@ -46,6 +46,10 @@
.link-popover {
font-weight: 400;
}
+
+ .connection-actions .link-popover {
+ text-decoration: none;
+ }
}
.connection-popover {
diff --git a/frontend/src/components/objects/LinkPopover.scss b/frontend/src/components/objects/LinkPopover.scss
index 725224c..c81f8bb 100644
--- a/frontend/src/components/objects/LinkPopover.scss
+++ b/frontend/src/components/objects/LinkPopover.scss
@@ -5,3 +5,8 @@
cursor: pointer;
text-decoration: underline;
}
+
+.popover {
+ font-family: "Fira Code", monospace;
+ font-size: 0.75em;
+}
--
cgit v1.2.3-70-g09d2