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 resraw = {}
var reslab = ''
db.collection('logs').find({}, {}).toArray()
.then(item => {
console.log(item)
for (let i in resdata.data) {
var resdataobj = {}
resdataobj.lab = resdata.data[i].res25swarmlabname
resdataarray.push(resdataobj)
for (let i in item) {
reslab = item[i].message.app_name
if(resdata.filter(item1 => item1.res25swarmlabname.includes(reslab))({
resdataarray.push(item[i])
resraw = resdata.data[i]
}
}
RES.error_msg = "ok"
RES.data = item

Loading…
Cancel
Save