happy hippo
This commit is contained in:
@@ -134,7 +134,7 @@ app.get('/lancianoCheck', async (req, res) => {
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
});
|
||||
let hostRes='';
|
||||
let hosts = ["10.8.0.2","10.8.0.3"];
|
||||
let hosts = ["10.8.0.45","10.8.0.46"];
|
||||
let promArr=[];
|
||||
for(let host of hosts) {
|
||||
promArr.push(ping.promise.probe(host));
|
||||
@@ -143,10 +143,10 @@ app.get('/lancianoCheck', async (req, res) => {
|
||||
.then(function (res) {
|
||||
for (let item of res) {
|
||||
if(item.alive) {
|
||||
hostRes+=item.host+' is alive ';
|
||||
hostRes+=item.host+' alive ';
|
||||
}
|
||||
else{
|
||||
hostRes+=item.host+' is dead ';
|
||||
hostRes+=item.host+' dead ';
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user