{
diff --git a/frontend/src/components/panels/SearchPane.js b/frontend/src/components/panels/SearchPane.js
index d3c0c8b..d36e85e 100644
--- a/frontend/src/components/panels/SearchPane.js
+++ b/frontend/src/components/panels/SearchPane.js
@@ -60,15 +60,14 @@ class SearchPane extends Component {
this.reset();
this.loadSearches();
- dispatcher.register("notifications", payload => {
- if (payload.event === "searches.new") {
- this.loadSearches();
- }
- });
-
+ dispatcher.register("notifications", this.handleNotification);
document.title = "caronte:~/searches$";
}
+ componentWillUnmount() {
+ dispatcher.unregister(this.handleNotification);
+ }
+
loadSearches = () => {
backend.get("/api/searches")
.then(res => this.setState({searches: res.json, searchesStatusCode: res.status}))
@@ -77,14 +76,18 @@ class SearchPane extends Component {
performSearch = () => {
const options = this.state.currentSearchOptions;
+ this.setState({loading: true});
if (this.validateSearch(options)) {
backend.post("/api/searches/perform", options).then(res => {
this.reset();
- this.setState({searchStatusCode: res.status});
+ this.setState({searchStatusCode: res.status, loading: false});
this.loadSearches();
this.viewSearch(res.json.id);
}).catch(res => {
- this.setState({searchStatusCode: res.status, searchResponse: JSON.stringify(res.json)});
+ this.setState({
+ searchStatusCode: res.status, searchResponse: JSON.stringify(res.json),
+ loading: false
+ });
});
}
};
@@ -156,6 +159,12 @@ class SearchPane extends Component {
dispatcher.dispatch("connections_filters", {"performed_search": searchId});
};
+ handleNotification = (payload) => {
+ if (payload.event === "searches.new") {
+ this.loadSearches();
+ }
+ };
+
render() {
const options = this.state.currentSearchOptions;
@@ -263,7 +272,8 @@ class SearchPane extends Component {
onChange={v => this.updateParam(s => s["regex_search"]["not_pattern"] = v)}/>
- this.updateParam(s => s["regex_search"]["case_insensitive"] = v)}/>
-
-
+
+
diff --git a/frontend/src/components/panels/ServicesPane.js b/frontend/src/components/panels/ServicesPane.js
index bc82356..48d9e29 100644
--- a/frontend/src/components/panels/ServicesPane.js
+++ b/frontend/src/components/panels/ServicesPane.js
@@ -15,24 +15,24 @@
* along with this program. If not, see .
*/
-import React, {Component} from 'react';
-import './common.scss';
-import './ServicesPane.scss';
-import Table from "react-bootstrap/Table";
+import React, {Component} from "react";
import {Col, Container, Row} from "react-bootstrap";
-import InputField from "../fields/InputField";
-import TextField from "../fields/TextField";
+import Table from "react-bootstrap/Table";
import backend from "../../backend";
-import NumericField from "../fields/extensions/NumericField";
-import ColorField from "../fields/extensions/ColorField";
-import ButtonField from "../fields/ButtonField";
+import dispatcher from "../../dispatcher";
+import {createCurlCommand} from "../../utils";
import validation from "../../validation";
+import ButtonField from "../fields/ButtonField";
+import ColorField from "../fields/extensions/ColorField";
+import NumericField from "../fields/extensions/NumericField";
+import InputField from "../fields/InputField";
+import TextField from "../fields/TextField";
import LinkPopover from "../objects/LinkPopover";
-import {createCurlCommand} from "../../utils";
-import dispatcher from "../../dispatcher";
+import "./common.scss";
+import "./ServicesPane.scss";
-const classNames = require('classnames');
-const _ = require('lodash');
+const classNames = require("classnames");
+const _ = require("lodash");
class ServicesPane extends Component {
@@ -52,15 +52,20 @@ class ServicesPane extends Component {
this.reset();
this.loadServices();
- dispatcher.register("notifications", payload => {
- if (payload.event === "services.edit") {
- this.loadServices();
- }
- });
-
+ dispatcher.register("notifications", this.handleNotifications);
document.title = "caronte:~/services$";
}
+ componentWillUnmount() {
+ dispatcher.unregister(this.handleNotifications);
+ }
+
+ handleNotifications = (payload) => {
+ if (payload.event === "services.edit") {
+ this.loadServices();
+ }
+ };
+
loadServices = () => {
backend.get("/api/services")
.then(res => this.setState({services: Object.values(res.json), servicesStatusCode: res.status}))
@@ -125,10 +130,10 @@ class ServicesPane extends Component {
{
this.reset();
this.setState({isUpdate: true, currentService: _.cloneDeep(s)});
- }} className={classNames("row-small", "row-clickable", {"row-selected": service.port === s.port })}>
+ }} className={classNames("row-small", "row-clickable", {"row-selected": service.port === s.port})}>
{s["port"]} |
{s["name"]} |
- |
+ |
{s["notes"]} |
);
@@ -141,9 +146,9 @@ class ServicesPane extends Component {
GET /api/services
{this.state.servicesStatusCode &&
- }
+ }
@@ -170,7 +175,7 @@ class ServicesPane extends Component {
PUT /api/services
+ placement="left"/>
@@ -179,17 +184,17 @@ class ServicesPane extends Component {
this.updateParam((s) => s.port = v)}
- min={0} max={65565} error={this.state.servicePortError} />
+ min={0} max={65565} error={this.state.servicePortError}/>
this.updateParam((s) => s.name = v)}
- error={this.state.serviceNameError} />
+ error={this.state.serviceNameError}/>
this.updateParam((s) => s.color = v)} />
+ onChange={(v) => this.updateParam((s) => s.color = v)}/>
this.updateParam((s) => s.notes = v)} />
+ onChange={(v) => this.updateParam((s) => s.notes = v)}/>
@@ -199,8 +204,9 @@ class ServicesPane extends Component {
{}
-
+
diff --git a/frontend/src/serviceWorker.js b/frontend/src/serviceWorker.js
index c633a91..a1f0ba8 100644
--- a/frontend/src/serviceWorker.js
+++ b/frontend/src/serviceWorker.js
@@ -11,131 +11,131 @@
// opt-in, read https://bit.ly/CRA-PWA
const isLocalhost = Boolean(
- window.location.hostname === 'localhost' ||
+ window.location.hostname === "localhost" ||
// [::1] is the IPv6 localhost address.
- window.location.hostname === '[::1]' ||
+ window.location.hostname === "[::1]" ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
- /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
+ /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
export function register(config) {
- if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
- // The URL constructor is available in all browsers that support SW.
- const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
- if (publicUrl.origin !== window.location.origin) {
- // Our service worker won't work if PUBLIC_URL is on a different origin
- // from what our page is served on. This might happen if a CDN is used to
- // serve assets; see https://github.com/facebook/create-react-app/issues/2374
- return;
- }
+ if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) {
+ // The URL constructor is available in all browsers that support SW.
+ const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
+ if (publicUrl.origin !== window.location.origin) {
+ // Our service worker won't work if PUBLIC_URL is on a different origin
+ // from what our page is served on. This might happen if a CDN is used to
+ // serve assets; see https://github.com/facebook/create-react-app/issues/2374
+ return;
+ }
- window.addEventListener('load', () => {
- const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
+ window.addEventListener("load", () => {
+ const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
- if (isLocalhost) {
- // This is running on localhost. Let's check if a service worker still exists or not.
- checkValidServiceWorker(swUrl, config);
+ if (isLocalhost) {
+ // This is running on localhost. Let's check if a service worker still exists or not.
+ checkValidServiceWorker(swUrl, config);
- // Add some additional logging to localhost, pointing developers to the
- // service worker/PWA documentation.
- navigator.serviceWorker.ready.then(() => {
- console.log(
- 'This web app is being served cache-first by a service ' +
- 'worker. To learn more, visit https://bit.ly/CRA-PWA'
- );
+ // Add some additional logging to localhost, pointing developers to the
+ // service worker/PWA documentation.
+ navigator.serviceWorker.ready.then(() => {
+ console.log(
+ "This web app is being served cache-first by a service " +
+ "worker. To learn more, visit https://bit.ly/CRA-PWA"
+ );
+ });
+ } else {
+ // Is not localhost. Just register service worker
+ registerValidSW(swUrl, config);
+ }
});
- } else {
- // Is not localhost. Just register service worker
- registerValidSW(swUrl, config);
- }
- });
- }
+ }
}
function registerValidSW(swUrl, config) {
- navigator.serviceWorker
- .register(swUrl)
- .then((registration) => {
- registration.onupdatefound = () => {
- const installingWorker = registration.installing;
- if (installingWorker == null) {
- return;
- }
- installingWorker.onstatechange = () => {
- if (installingWorker.state === 'installed') {
- if (navigator.serviceWorker.controller) {
- // At this point, the updated precached content has been fetched,
- // but the previous service worker will still serve the older
- // content until all client tabs are closed.
- console.log(
- 'New content is available and will be used when all ' +
- 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
- );
+ navigator.serviceWorker
+ .register(swUrl)
+ .then((registration) => {
+ registration.onupdatefound = () => {
+ const installingWorker = registration.installing;
+ if (installingWorker == null) {
+ return;
+ }
+ installingWorker.onstatechange = () => {
+ if (installingWorker.state === "installed") {
+ if (navigator.serviceWorker.controller) {
+ // At this point, the updated precached content has been fetched,
+ // but the previous service worker will still serve the older
+ // content until all client tabs are closed.
+ console.log(
+ "New content is available and will be used when all " +
+ "tabs for this page are closed. See https://bit.ly/CRA-PWA."
+ );
- // Execute callback
- if (config && config.onUpdate) {
- config.onUpdate(registration);
- }
- } else {
- // At this point, everything has been precached.
- // It's the perfect time to display a
- // "Content is cached for offline use." message.
- console.log('Content is cached for offline use.');
+ // Execute callback
+ if (config && config.onUpdate) {
+ config.onUpdate(registration);
+ }
+ } else {
+ // At this point, everything has been precached.
+ // It's the perfect time to display a
+ // "Content is cached for offline use." message.
+ console.log("Content is cached for offline use.");
- // Execute callback
- if (config && config.onSuccess) {
- config.onSuccess(registration);
- }
- }
- }
- };
- };
- })
- .catch((error) => {
- console.error('Error during service worker registration:', error);
- });
+ // Execute callback
+ if (config && config.onSuccess) {
+ config.onSuccess(registration);
+ }
+ }
+ }
+ };
+ };
+ })
+ .catch((error) => {
+ console.error("Error during service worker registration:", error);
+ });
}
function checkValidServiceWorker(swUrl, config) {
- // Check if the service worker can be found. If it can't reload the page.
- fetch(swUrl, {
- headers: { 'Service-Worker': 'script' },
- })
- .then((response) => {
- // Ensure service worker exists, and that we really are getting a JS file.
- const contentType = response.headers.get('content-type');
- if (
- response.status === 404 ||
- (contentType != null && contentType.indexOf('javascript') === -1)
- ) {
- // No service worker found. Probably a different app. Reload the page.
- navigator.serviceWorker.ready.then((registration) => {
- registration.unregister().then(() => {
- window.location.reload();
- });
- });
- } else {
- // Service worker found. Proceed as normal.
- registerValidSW(swUrl, config);
- }
+ // Check if the service worker can be found. If it can't reload the page.
+ fetch(swUrl, {
+ headers: {"Service-Worker": "script"},
})
- .catch(() => {
- console.log(
- 'No internet connection found. App is running in offline mode.'
- );
- });
+ .then((response) => {
+ // Ensure service worker exists, and that we really are getting a JS file.
+ const contentType = response.headers.get("content-type");
+ if (
+ response.status === 404 ||
+ (contentType != null && contentType.indexOf("javascript") === -1)
+ ) {
+ // No service worker found. Probably a different app. Reload the page.
+ navigator.serviceWorker.ready.then((registration) => {
+ registration.unregister().then(() => {
+ window.location.reload();
+ });
+ });
+ } else {
+ // Service worker found. Proceed as normal.
+ registerValidSW(swUrl, config);
+ }
+ })
+ .catch(() => {
+ console.log(
+ "No internet connection found. App is running in offline mode."
+ );
+ });
}
export function unregister() {
- if ('serviceWorker' in navigator) {
- navigator.serviceWorker.ready
- .then((registration) => {
- registration.unregister();
- })
- .catch((error) => {
- console.error(error.message);
- });
- }
+ if ("serviceWorker" in navigator) {
+ navigator.serviceWorker.ready
+ .then((registration) => {
+ registration.unregister();
+ })
+ .catch((error) => {
+ console.error(error.message);
+ });
+ }
}
diff --git a/parsers/http_request_parser.go b/parsers/http_request_parser.go
index bc98f8f..56093c9 100644
--- a/parsers/http_request_parser.go
+++ b/parsers/http_request_parser.go
@@ -82,7 +82,7 @@ func (p HttpRequestParser) TryParse(content []byte) Metadata {
Trailer: JoinArrayMap(request.Trailer),
Reproducers: HttpRequestMetadataReproducers{
CurlCommand: curlCommand(content),
- RequestsCode: requestsCode(request),
+ RequestsCode: requestsCode(request, body),
FetchRequest: fetchRequest(request, body),
},
}
@@ -99,19 +99,15 @@ func curlCommand(content []byte) string {
}
}
-func requestsCode(request *http.Request) string {
+func requestsCode(request *http.Request, body string) string {
var b strings.Builder
- var params string
- if request.Form != nil {
- params = toJson(JoinArrayMap(request.PostForm))
- }
headers := toJson(JoinArrayMap(request.Header))
cookies := toJson(CookiesMap(request.Cookies()))
b.WriteString("import requests\n\nresponse = requests." + strings.ToLower(request.Method) + "(")
b.WriteString("\"" + request.URL.String() + "\"")
- if params != "" {
- b.WriteString(", data = " + params)
+ if body != "" {
+ b.WriteString(", data = \"" + strings.Replace(body, "\"", "\\\"", -1) + "\"")
}
if headers != "" {
b.WriteString(", headers = " + headers)
diff --git a/pcap_importer.go b/pcap_importer.go
index 41ed082..1c80b3f 100644
--- a/pcap_importer.go
+++ b/pcap_importer.go
@@ -29,6 +29,7 @@ import (
"os"
"path"
"path/filepath"
+ "sort"
"sync"
"time"
)
@@ -39,13 +40,14 @@ const initialAssemblerPoolSize = 16
const importUpdateProgressInterval = 100 * time.Millisecond
type PcapImporter struct {
- storage Storage
- streamPool *tcpassembly.StreamPool
- assemblers []*tcpassembly.Assembler
- sessions map[string]ImportingSession
- mAssemblers sync.Mutex
- mSessions sync.Mutex
- serverNet net.IPNet
+ storage Storage
+ streamPool *tcpassembly.StreamPool
+ assemblers []*tcpassembly.Assembler
+ sessions map[string]ImportingSession
+ mAssemblers sync.Mutex
+ mSessions sync.Mutex
+ serverNet net.IPNet
+ notificationController *NotificationController
}
type ImportingSession struct {
@@ -63,7 +65,8 @@ type ImportingSession struct {
type flowCount [2]int
-func NewPcapImporter(storage Storage, serverNet net.IPNet, rulesManager RulesManager) *PcapImporter {
+func NewPcapImporter(storage Storage, serverNet net.IPNet, rulesManager RulesManager,
+ notificationController *NotificationController) *PcapImporter {
streamPool := tcpassembly.NewStreamPool(NewBiDirectionalStreamFactory(storage, serverNet, rulesManager))
var result []ImportingSession
@@ -76,13 +79,14 @@ func NewPcapImporter(storage Storage, serverNet net.IPNet, rulesManager RulesMan
}
return &PcapImporter{
- storage: storage,
- streamPool: streamPool,
- assemblers: make([]*tcpassembly.Assembler, 0, initialAssemblerPoolSize),
- sessions: sessions,
- mAssemblers: sync.Mutex{},
- mSessions: sync.Mutex{},
- serverNet: serverNet,
+ storage: storage,
+ streamPool: streamPool,
+ assemblers: make([]*tcpassembly.Assembler, 0, initialAssemblerPoolSize),
+ sessions: sessions,
+ mAssemblers: sync.Mutex{},
+ mSessions: sync.Mutex{},
+ serverNet: serverNet,
+ notificationController: notificationController,
}
}
@@ -136,6 +140,9 @@ func (pi *PcapImporter) GetSessions() []ImportingSession {
for _, session := range pi.sessions {
sessions = append(sessions, session)
}
+ sort.Slice(sessions, func(i, j int) bool {
+ return sessions[i].StartedAt.Before(sessions[j].StartedAt)
+ })
pi.mSessions.Unlock()
return sessions
}
@@ -202,6 +209,8 @@ func (pi *PcapImporter) parsePcap(session ImportingSession, fileName string, flu
handle.Close()
pi.releaseAssembler(assembler)
pi.progressUpdate(session, fileName, true, "")
+ pi.notificationController.Notify("pcap.completed", session)
+
return
}
--
cgit v1.2.3-70-g09d2
From d429a344ef34bb9289616dc7ca11c161fabce5d7 Mon Sep 17 00:00:00 2001
From: Emiliano Ciavatta
Date: Fri, 16 Oct 2020 15:26:55 +0200
Subject: Refactor js arrow functions
---
frontend/src/components/App.js | 2 +-
frontend/src/components/Notifications.js | 2 +-
frontend/src/components/Timeline.js | 2 +-
frontend/src/components/filters/AdvancedFilters.js | 4 ++--
.../src/components/filters/ExitSearchFilter.js | 2 +-
.../components/filters/RulesConnectionsFilter.js | 2 +-
frontend/src/components/objects/Connection.js | 4 ++--
.../components/objects/ConnectionMatchedRules.js | 4 ++--
frontend/src/components/panels/ConnectionsPane.js | 10 +++++-----
frontend/src/components/panels/PcapsPane.js | 6 +++---
frontend/src/components/panels/RulesPane.js | 16 ++++++++--------
frontend/src/components/panels/SearchPane.js | 22 +++++++++++-----------
frontend/src/components/panels/ServicesPane.js | 10 +++++-----
frontend/src/components/panels/StreamsPane.js | 6 +++---
frontend/src/dispatcher.js | 8 ++++----
frontend/src/log.js | 2 +-
parsers/http_request_parser.go | 3 +--
17 files changed, 52 insertions(+), 53 deletions(-)
(limited to 'frontend/src/components/Timeline.js')
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js
index 888ff86..e12a99d 100644
--- a/frontend/src/components/App.js
+++ b/frontend/src/components/App.js
@@ -27,7 +27,7 @@ class App extends Component {
state = {};
componentDidMount() {
- dispatcher.register("notifications", payload => {
+ dispatcher.register("notifications", (payload) => {
if (payload.event === "connected") {
this.setState({
connected: true,
diff --git a/frontend/src/components/Notifications.js b/frontend/src/components/Notifications.js
index a81eba1..0b47b43 100644
--- a/frontend/src/components/Notifications.js
+++ b/frontend/src/components/Notifications.js
@@ -107,7 +107,7 @@ class Notifications extends Component {
{
- this.state.closedNotifications.concat(this.state.notifications).map(n => {
+ this.state.closedNotifications.concat(this.state.notifications).map((n) => {
const notificationClassnames = {
"notification": true,
"notification-closed": n.closed,
diff --git a/frontend/src/components/Timeline.js b/frontend/src/components/Timeline.js
index 94fa4d0..9ecbd80 100644
--- a/frontend/src/components/Timeline.js
+++ b/frontend/src/components/Timeline.js
@@ -127,7 +127,7 @@ class Timeline extends Component {
const series = new TimeSeries({
name: "statistics",
columns: ["time"].concat(columns),
- points: zeroFilledMetrics.map((m) => [m["range_start"]].concat(columns.map(c =>
+ points: zeroFilledMetrics.map((m) => [m["range_start"]].concat(columns.map((c) =>
((metric in m) && (m[metric] != null)) ? (m[metric][c] || 0) : 0
)))
});
diff --git a/frontend/src/components/filters/AdvancedFilters.js b/frontend/src/components/filters/AdvancedFilters.js
index 15667a5..8598185 100644
--- a/frontend/src/components/filters/AdvancedFilters.js
+++ b/frontend/src/components/filters/AdvancedFilters.js
@@ -28,10 +28,10 @@ class AdvancedFilters extends Component {
componentDidMount() {
this.urlParams = new URLSearchParams(this.props.location.search);
- this.connectionsFiltersCallback = payload => {
+ this.connectionsFiltersCallback = (payload) => {
this.urlParams = updateParams(this.urlParams, payload);
const active = ["client_address", "client_port", "min_duration", "max_duration", "min_bytes", "max_bytes"]
- .some(f => this.urlParams.has(f));
+ .some((f) => this.urlParams.has(f));
if (this.state.active !== active) {
this.setState({active});
}
diff --git a/frontend/src/components/filters/ExitSearchFilter.js b/frontend/src/components/filters/ExitSearchFilter.js
index 72cfb0c..0aacfd6 100644
--- a/frontend/src/components/filters/ExitSearchFilter.js
+++ b/frontend/src/components/filters/ExitSearchFilter.js
@@ -28,7 +28,7 @@ class ExitSearchFilter extends Component {
let params = new URLSearchParams(this.props.location.search);
this.setState({performedSearch: params.get("performed_search")});
- this.connectionsFiltersCallback = payload => {
+ this.connectionsFiltersCallback = (payload) => {
if (this.state.performedSearch !== payload["performed_search"]) {
this.setState({performedSearch: payload["performed_search"]});
}
diff --git a/frontend/src/components/filters/RulesConnectionsFilter.js b/frontend/src/components/filters/RulesConnectionsFilter.js
index 37d36b7..210ee36 100644
--- a/frontend/src/components/filters/RulesConnectionsFilter.js
+++ b/frontend/src/components/filters/RulesConnectionsFilter.js
@@ -37,7 +37,7 @@ class RulesConnectionsFilter extends Component {
backend.get("/api/rules").then((res) => {
let rules = res.json.flatMap((rule) => rule.enabled ? [{id: rule.id, name: rule.name}] : []);
- activeRules = rules.filter((rule) => activeRules.some(id => rule.id === id));
+ activeRules = rules.filter((rule) => activeRules.some((id) => rule.id === id));
this.setState({rules, activeRules});
});
diff --git a/frontend/src/components/objects/Connection.js b/frontend/src/components/objects/Connection.js
index e5896e9..b70b7f7 100644
--- a/frontend/src/components/objects/Connection.js
+++ b/frontend/src/components/objects/Connection.js
@@ -37,7 +37,7 @@ class Connection extends Component {
if (name === "hide") {
const enabled = !this.props.data.hidden;
backend.post(`/api/connections/${this.props.data.id}/${enabled ? "hide" : "show"}`)
- .then(_ => {
+ .then((_) => {
this.props.onEnabled(!enabled);
this.setState({update: true});
});
@@ -45,7 +45,7 @@ class Connection extends Component {
if (name === "mark") {
const marked = this.props.data.marked;
backend.post(`/api/connections/${this.props.data.id}/${marked ? "unmark" : "mark"}`)
- .then(_ => {
+ .then((_) => {
this.props.onMarked(!marked);
this.setState({update: true});
});
diff --git a/frontend/src/components/objects/ConnectionMatchedRules.js b/frontend/src/components/objects/ConnectionMatchedRules.js
index cfd1254..a69cad8 100644
--- a/frontend/src/components/objects/ConnectionMatchedRules.js
+++ b/frontend/src/components/objects/ConnectionMatchedRules.js
@@ -33,8 +33,8 @@ class ConnectionMatchedRules extends Component {
};
render() {
- const matchedRules = this.props.matchedRules.map(mr => {
- const rule = this.props.rules.find(r => r.id === mr);
+ const matchedRules = this.props.matchedRules.map((mr) => {
+ const rule = this.props.rules.find((r) => r.id === mr);
return this.onMatchedRulesSelected(rule.id)} name={rule.name}
color={rule.color} small/>;
});
diff --git a/frontend/src/components/panels/ConnectionsPane.js b/frontend/src/components/panels/ConnectionsPane.js
index 9418fad..457c249 100644
--- a/frontend/src/components/panels/ConnectionsPane.js
+++ b/frontend/src/components/panels/ConnectionsPane.js
@@ -61,8 +61,8 @@ class ConnectionsPane extends Component {
const id = match[1];
additionalParams.from = id;
backend.get(`/api/connections/${id}`)
- .then(res => this.connectionSelected(res.json))
- .catch(error => log.error("Error loading initial connection", error));
+ .then((res) => this.connectionSelected(res.json))
+ .catch((error) => log.error("Error loading initial connection", error));
}
this.loadConnections(additionalParams, urlParams, true).then(() => log.debug("Connections loaded"));
@@ -283,11 +283,11 @@ class ConnectionsPane extends Component {
|