Browse Source

add rest

master
zeus 4 years ago
parent
commit
3aa4c107bf
  1. 14
      swarmlab-app/src/run/app.js

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

@ -398,11 +398,15 @@ cors(corsOptions), (req, res, next) => {
console.log(' vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv '+ JSON.stringify(item))
for (let i in item) {
reslab = item[i].message.app_name
console.log('------------------- ' + item[i].message.app_name)
RES.reslab = reslab
if(resdata.data.filter(item1 => item1.res25swarmlabname.includes(reslab))){
console.log('------->>>>>----->>>------- ' + item[i].message.app_name)
reslab = item[i].tailed_path
var segment_array = reslab.split( '/' );
var last_segment = segment_array.pop();
var fieldstmp = last_segment.split('-');
var nameofswarmlab = fieldstmp[0];
console.log('------------------- ' + item[i].tailed_path)
console.log('-----++++++++++++++++++++++++--- ' + nameofswarmlab)
if(resdata.data.filter(item1 => item1.res25swarmlabname.includes(nameofswarmlab))){
resdataarray.push(item[i])
RES.found = item[i]
}

Loading…
Cancel
Save