From 314671bf9802f3e5186202c079f0dcb10eaa80cd Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 10 Dec 2020 22:50:12 +0200 Subject: [PATCH] add rest --- swarmlab-app/src/run/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index ea680b6..cc42982 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -406,8 +406,9 @@ cors(corsOptions), (req, res, next) => { console.log('------------------- ' + item[i].tailed_path) console.log('-----++++++++++++++++++++++++--- ' + nameofswarmlab) - if( resdata.data.filter(item1 => item1.res25swarmlabname.includes(nameofswarmlab)).length > 0 ){ - RES.lenght = resdata.data.filter(item1 => item1.res25swarmlabname.includes(nameofswarmlab)).length + //if( resdata.data.filter(item1 => item1.res25swarmlabname.includes(nameofswarmlab)).length > 0 ){ + var regexlog = '/'+nameofswarmlab+'/' + if( resdata.data.filter(item1 => regexlog.test(item1.res25swarmlabname))){ resdataarray.push(item[i]) RES.found = item[i] }