Browse Source

add rest

master
zeus 4 years ago
parent
commit
f593439886
  1. 10
      swarmlab-app/src/run/app.js

10
swarmlab-app/src/run/app.js

@ -389,14 +389,16 @@ cors(corsOptions), (req, res, next) => {
var resdataarray = [] var resdataarray = []
var resraw = {} var resraw = {}
var reslab = ''
db.collection('logs').find({}, {}).toArray() db.collection('logs').find({}, {}).toArray()
.then(item => { .then(item => {
console.log(item) console.log(item)
for (let i in resdata.data) { for (let i in item) {
var resdataobj = {} reslab = item[i].message.app_name
resdataobj.lab = resdata.data[i].res25swarmlabname if(resdata.filter(item1 => item1.res25swarmlabname.includes(reslab))({
resdataarray.push(resdataobj) resdataarray.push(item[i])
resraw = resdata.data[i] resraw = resdata.data[i]
}
} }
RES.error_msg = "ok" RES.error_msg = "ok"
RES.data = item RES.data = item

Loading…
Cancel
Save