- {
+ {
return {name: t};
})}
name="terms" min={3} inline allowNew={true}
readonly={regexOptionsModified || options["text_search"]["exact_phrase"]}
- onChange={(tags) => this.updateParam(s => s["text_search"].terms = tags.map(t => t.name))}/>
+ onChange={(tags) => this.updateParam((s) => s["text_search"].terms = tags.map(t => t.name))}/>
{
return {name: t};
})}
name="excluded_terms" min={3} inline allowNew={true}
readonly={regexOptionsModified || options["text_search"]["exact_phrase"]}
- onChange={(tags) => this.updateParam(s => s["text_search"]["excluded_terms"] = tags.map(t => t.name))}/>
+ onChange={(tags) => this.updateParam((s) => s["text_search"]["excluded_terms"] = tags.map(t => t.name))}/>
or
this.updateParam(s => s["text_search"]["exact_phrase"] = v)}
+ onChange={(v) => this.updateParam((s) => s["text_search"]["exact_phrase"] = v)}
readonly={regexOptionsModified || (Array.isArray(options["text_search"].terms) && options["text_search"].terms.length > 0)}/>
this.updateParam(s => s["text_search"]["case_sensitive"] = v)}/>
+ onChange={(v) => this.updateParam((s) => s["text_search"]["case_sensitive"] = v)}/>
@@ -264,28 +264,28 @@ class SearchPane extends Component {
this.updateParam(s => s["regex_search"].pattern = v)}/>
+ onChange={(v) => this.updateParam((s) => s["regex_search"].pattern = v)}/>
or
this.updateParam(s => s["regex_search"]["not_pattern"] = v)}/>
+ onChange={(v) => this.updateParam((s) => s["regex_search"]["not_pattern"] = v)}/>
this.updateParam(s => s["regex_search"]["case_insensitive"] = v)}/>
+ onChange={(v) => this.updateParam((s) => s["regex_search"]["case_insensitive"] = v)}/>
this.updateParam(s => s["regex_search"]["multi_line"] = v)}/>
+ onChange={(v) => this.updateParam((s) => s["regex_search"]["multi_line"] = v)}/>
this.updateParam(s => s["regex_search"]["ignore_whitespaces"] = v)}/>
+ onChange={(v) => this.updateParam((s) => s["regex_search"]["ignore_whitespaces"] = v)}/>
this.updateParam(s => s["regex_search"]["dot_character"] = v)}/>
+ onChange={(v) => this.updateParam((s) => s["regex_search"]["dot_character"] = v)}/>
diff --git a/frontend/src/components/panels/ServicesPane.js b/frontend/src/components/panels/ServicesPane.js
index 48d9e29..5986804 100644
--- a/frontend/src/components/panels/ServicesPane.js
+++ b/frontend/src/components/panels/ServicesPane.js
@@ -68,18 +68,18 @@ class ServicesPane extends Component {
loadServices = () => {
backend.get("/api/services")
- .then(res => this.setState({services: Object.values(res.json), servicesStatusCode: res.status}))
- .catch(res => this.setState({servicesStatusCode: res.status, servicesResponse: JSON.stringify(res.json)}));
+ .then((res) => this.setState({services: Object.values(res.json), servicesStatusCode: res.status}))
+ .catch((res) => this.setState({servicesStatusCode: res.status, servicesResponse: JSON.stringify(res.json)}));
};
updateService = () => {
const service = this.state.currentService;
if (this.validateService(service)) {
- backend.put("/api/services", service).then(res => {
+ backend.put("/api/services", service).then((res) => {
this.reset();
this.setState({serviceStatusCode: res.status});
this.loadServices();
- }).catch(res => {
+ }).catch((res) => {
this.setState({serviceStatusCode: res.status, serviceResponse: JSON.stringify(res.json)});
});
}
@@ -126,7 +126,7 @@ class ServicesPane extends Component {
const isUpdate = this.state.isUpdate;
const service = this.state.currentService;
- let services = this.state.services.map(s =>
+ let services = this.state.services.map((s) =>
{
this.reset();
this.setState({isUpdate: true, currentService: _.cloneDeep(s)});
diff --git a/frontend/src/components/panels/StreamsPane.js b/frontend/src/components/panels/StreamsPane.js
index 1819fec..9470d7d 100644
--- a/frontend/src/components/panels/StreamsPane.js
+++ b/frontend/src/components/panels/StreamsPane.js
@@ -67,7 +67,7 @@ class StreamsPane extends Component {
loadStream = (connectionId) => {
this.setState({messages: [], currentId: connectionId});
backend.get(`/api/streams/${connectionId}?format=${this.state.format}`)
- .then(res => this.setState({messages: res.json}));
+ .then((res) => this.setState({messages: res.json}));
};
setFormat = (format) => {
@@ -166,8 +166,8 @@ class StreamsPane extends Component {
downloadStreamRaw = (value) => {
if (this.state.currentId) {
backend.download(`/api/streams/${this.props.connection.id}/download?format=${this.state.format}&type=${value}`)
- .then(res => downloadBlob(res.blob, `${this.state.currentId}-${value}-${this.state.format}.txt`))
- .catch(_ => log.error("Failed to download stream messages"));
+ .then((res) => downloadBlob(res.blob, `${this.state.currentId}-${value}-${this.state.format}.txt`))
+ .catch((_) => log.error("Failed to download stream messages"));
}
};
diff --git a/frontend/src/dispatcher.js b/frontend/src/dispatcher.js
index ef5dbde..32f3f33 100644
--- a/frontend/src/dispatcher.js
+++ b/frontend/src/dispatcher.js
@@ -24,7 +24,7 @@ class Dispatcher {
}
dispatch = (topic, payload) => {
- this.listeners.filter(l => l.topic === topic).forEach(l => l.callback(payload));
+ this.listeners.filter((l) => l.topic === topic).forEach((l) => l.callback(payload));
};
register = (topic, callback) => {
@@ -34,20 +34,20 @@ class Dispatcher {
if (typeof topic === "string") {
this.listeners.push({topic, callback});
} else if (typeof topic === "object" && Array.isArray(topic)) {
- topic.forEach(e => {
+ topic.forEach((e) => {
if (typeof e !== "string") {
throw new Error("all topics must be strings");
}
});
- topic.forEach(e => this.listeners.push({e, callback}));
+ topic.forEach((e) => this.listeners.push({e, callback}));
} else {
throw new Error("topic must be a string or an array of strings");
}
};
unregister = (callback) => {
- _.remove(this.listeners, l => l.callback === callback);
+ _.remove(this.listeners, (l) => l.callback === callback);
};
}
diff --git a/frontend/src/log.js b/frontend/src/log.js
index 0afac47..9a75fbc 100644
--- a/frontend/src/log.js
+++ b/frontend/src/log.js
@@ -23,7 +23,7 @@ const log = {
};
function isDevelopment() {
- return !process.env.NODE_ENV || process.env.NODE_ENV === 'development';
+ return !process.env.NODE_ENV || process.env.NODE_ENV === "development";
}
export default log;
diff --git a/parsers/http_request_parser.go b/parsers/http_request_parser.go
index d7ed81c..98ba8e3 100644
--- a/parsers/http_request_parser.go
+++ b/parsers/http_request_parser.go
@@ -148,9 +148,8 @@ func fetchRequest(request *http.Request, body string) string {
if jsonData := toJSON(data); jsonData != "" {
return "fetch(\"" + request.URL.String() + "\", " + jsonData + ");"
- } else {
- return "invalid-request"
}
+ return "invalid-request"
}
func toJSON(obj interface{}) string {
--
cgit v1.2.3-70-g09d2
|