|
@ -98,7 +98,7 @@ const corsOptions = { |
|
|
// ------------------------------
|
|
|
// ------------------------------
|
|
|
// Lefos - get length of logs
|
|
|
// Lefos - get length of logs
|
|
|
app.get("/length", cors(corsOptions), (req, res) => { |
|
|
app.get("/length", cors(corsOptions), (req, res) => { |
|
|
console.log("getting length of logs"); |
|
|
console.error("getting length of logs"); |
|
|
|
|
|
|
|
|
var url = "mongodb://mongo:27017/"; |
|
|
var url = "mongodb://mongo:27017/"; |
|
|
|
|
|
|
|
@ -217,7 +217,13 @@ app.get("/test2", cors(corsOptions), (req, res) => { |
|
|
|
|
|
|
|
|
obj.forEach((value) => { |
|
|
obj.forEach((value) => { |
|
|
if (value.log.includes("app_name")) { |
|
|
if (value.log.includes("app_name")) { |
|
|
jsonfinal.push(JSON.parse(value.log)); |
|
|
var tmp = JSON.parse(value.log); |
|
|
|
|
|
if (tmp.type == "out") { |
|
|
|
|
|
tmp.type = '<div class="outtype" >' + tmp.type + "</div>"; |
|
|
|
|
|
} else if (tmp.type == "err") { |
|
|
|
|
|
tmp.type = '<div class="errtype" >' + tmp.type + "</div>"; |
|
|
|
|
|
} |
|
|
|
|
|
jsonfinal.push(tmp); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
//console.log("Sending Data: " + jsonfinal);
|
|
|
//console.log("Sending Data: " + jsonfinal);
|
|
|