From 7ecf3ef52b5f36ec9e52bf100fa958f5cb0b37b5 Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Tue, 20 Oct 2020 22:04:09 +0200 Subject: Add comment dialog --- frontend/src/components/panels/ConnectionsPane.js | 2 +- frontend/src/components/panels/StreamsPane.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'frontend/src/components/panels') diff --git a/frontend/src/components/panels/ConnectionsPane.js b/frontend/src/components/panels/ConnectionsPane.js index 6418b3e..708fc86 100644 --- a/frontend/src/components/panels/ConnectionsPane.js +++ b/frontend/src/components/panels/ConnectionsPane.js @@ -287,7 +287,7 @@ class ConnectionsPane extends Component { return [ this.connectionSelected(c)} selected={this.state.selected === c.id} onMarked={(marked) => c.marked = marked} - onEnabled={(enabled) => c.hidden = !enabled} + onCommented={(comment) => c.comment = comment} services={this.state.services}/>, c.matched_rules.length > 0 && ; + if (typeof json === "object") { + body = ; + } } catch (e) { log.error(e); - body = m.body; } } @@ -157,11 +158,11 @@ class StreamsPane extends Component { if (!connectionMessage.metadata["reproducers"]) { return; } - return Object.entries(connectionMessage.metadata["reproducers"]).map(([actionName, actionValue]) => - { + return Object.entries(connectionMessage.metadata["reproducers"]).map(([name, value]) => + { this.setState({ - messageActionDialog: this.setState({messageActionDialog: null})}/> + messageActionDialog: this.setState({messageActionDialog: null})}/> }); }}/> ); -- cgit v1.2.3-70-g09d2 From 216f53dc7de379956f884cd68ed7fcf33adf6c65 Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Thu, 17 Dec 2020 10:55:28 +0100 Subject: Add empty config pane --- frontend/src/components/pages/MainPage.js | 2 ++ frontend/src/components/panels/ConfigPane.js | 39 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 frontend/src/components/panels/ConfigPane.js (limited to 'frontend/src/components/panels') diff --git a/frontend/src/components/pages/MainPage.js b/frontend/src/components/pages/MainPage.js index 3bf8065..6058edc 100644 --- a/frontend/src/components/pages/MainPage.js +++ b/frontend/src/components/pages/MainPage.js @@ -21,6 +21,7 @@ import "react-reflex/styles.css" import {Route, Switch} from "react-router-dom"; import Filters from "../dialogs/Filters"; import Header from "../Header"; +import ConfigPane from "../panels/ConfigPane"; import Connections from "../panels/ConnectionsPane"; import MainPane from "../panels/MainPane"; import PcapsPane from "../panels/PcapsPane"; @@ -75,6 +76,7 @@ class MainPage extends Component { }/> }/> }/> + }/> }/> }/> diff --git a/frontend/src/components/panels/ConfigPane.js b/frontend/src/components/panels/ConfigPane.js new file mode 100644 index 0000000..9710abd --- /dev/null +++ b/frontend/src/components/panels/ConfigPane.js @@ -0,0 +1,39 @@ +/* + * This file is part of caronte (https://github.com/eciavatta/caronte). + * Copyright (c) 2020 Emiliano Ciavatta. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import React, {Component} from "react"; +import "./common.scss"; + +class ConfigPane extends Component { + + state = {}; + + render() { + return ( +
+
+
+ Not implemented +
+
+
+ ); + } + +} + +export default ConfigPane; -- cgit v1.2.3-70-g09d2