Browse Source

add webclient

master
zeus 3 years ago
parent
commit
1462d95dc2
  1. 16
      readmongo/swarmlab-app/src/run/app.js

16
readmongo/swarmlab-app/src/run/app.js

@ -244,6 +244,9 @@ app.get("/test2", cors(corsOptions), (req, res) => {
RES.data = await mydb.collection(COLLECTION).find({}).toArray()
var jsonfinal = [];
RES.data.forEach((value) => {
if (value.tailed_path == selected) {
var tmp = {
message: value.message,
timestamp: value.time,
@ -251,7 +254,18 @@ app.get("/test2", cors(corsOptions), (req, res) => {
process_id: '',
app_name: value.tailed_path,
};
jsonfinal.push(tmp);
jsonfinal.push(tmp);
} else if (selected == "All") {
var tmp = {
message: value.message,
timestamp: value.time,
type: "<div class= 'outtype'>" + value._id+ "</div>",
process_id: '',
app_name: value.tailed_path,
};
jsonfinal.push(tmp);
}
});
//Pagination

Loading…
Cancel
Save