+ className={classNames("connection-message", c["from_client"] ? "from-client" : "from-server")}>
@@ -175,9 +183,9 @@ class ConnectionContent extends Component {
{this.connectionsActions(c)}
-
{c.from_client ? "client" : "server"}
+
{c["from_client"] ? "client" : "server"}
+ className="message-content">
{this.state.tryParse && this.state.format === "default" ? this.tryParseConnectionMessage(c) : c.content}
@@ -188,20 +196,20 @@ class ConnectionContent extends Component {
- flow: {this.props.connection.ip_src}:{this.props.connection.port_src} -> {this.props.connection.ip_dst}:{this.props.connection.port_dst}
- | timestamp: {this.props.connection.started_at}
+ flow: {conn["ip_src"]}:{conn["port_src"]} -> {conn["ip_dst"]}:{conn["port_dst"]}
+ | timestamp: {conn["started_at"]}
+ onChange={this.setFormat} value={this.state.value}/>
-
+
-
+
diff --git a/frontend/src/utils.js b/frontend/src/utils.js
index fb0e5d9..aacc625 100644
--- a/frontend/src/utils.js
+++ b/frontend/src/utils.js
@@ -118,3 +118,14 @@ export function getHeaderValue(request, key) {
}
return undefined;
}
+
+export function downloadBlob(blob, fileName) {
+ const url = window.URL.createObjectURL(blob);
+ const a = document.createElement("a");
+ a.style.display = "none";
+ a.href = url;
+ a.download = fileName;
+ document.body.appendChild(a);
+ a.click();
+ window.URL.revokeObjectURL(url);
+}
--
cgit v1.2.3-70-g09d2