Fix indents

This commit is contained in:
Akkadius 2017-09-21 21:35:06 -05:00
parent 64a08e2e68
commit f2481111df
1 changed files with 38 additions and 38 deletions

View File

@ -16,10 +16,10 @@ function connect_websocket() {
}; };
socket.onmessage = function (event) { socket.onmessage = function (event) {
if(killed_connection) if (killed_connection)
return false; return false;
if(!document.getElementById("dhcp_log")){ if (!document.getElementById("dhcp_log")) {
console.log("[Websocket] DHCP Log unsubscribed"); console.log("[Websocket] DHCP Log unsubscribed");
socket.send(JSON.stringify({"event_unsubscribe": "dhcp_log_subscription"})); socket.send(JSON.stringify({"event_unsubscribe": "dhcp_log_subscription"}));
killed_connection = 1; killed_connection = 1;
@ -29,7 +29,7 @@ function connect_websocket() {
console_data = event.data; console_data = event.data;
if(typeof mac_oui_data !== "undefined") { if (typeof mac_oui_data !== "undefined") {
if (console_data.split(":").length - 1 >= 8) { if (console_data.split(":").length - 1 >= 8) {
var line_data = console_data.split(" "); var line_data = console_data.split(" ");
for (i = 0; i < line_data.length; i++) { for (i = 0; i < line_data.length; i++) {
@ -48,10 +48,10 @@ function connect_websocket() {
var grep_value = document.getElementById("grep_fitler").value; var grep_value = document.getElementById("grep_fitler").value;
if(grep_value){ if (grep_value) {
var matcher = new RegExp(grep_value, "i"); var matcher = new RegExp(grep_value, "i");
var found = matcher.test(console_data); var found = matcher.test(console_data);
if(!found && !console_data.includes(grep_value)){ if (!found && !console_data.includes(grep_value)) {
return false; return false;
} }
} }
@ -62,7 +62,7 @@ function connect_websocket() {
column: 0 column: 0
}, "\n" + console_data); }, "\n" + console_data);
if(session.getLength() >= 50000){ if (session.getLength() >= 50000) {
/* If we get over 500,000 lines lets clear the editor */ /* If we get over 500,000 lines lets clear the editor */
editor.setValue(""); editor.setValue("");
} }