diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 6729122..012ee8c 100755 --- a/swarmlab-app/src/run/app.js +++ b/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] }