Closed hugonh closed 3 years ago
This does not seem like a React issue. Just because https://github.com/nocodeapi/status is a React application doesn't mean we can answer questions about it here :)
Looks like you've already asked there (https://github.com/nocodeapi/status/issues/11) which is the right place.
Im trying to use an API from UpTimeRobot to monitor 2 cloud providers, Locaweb and AWS, so im using a git called "nocodeapi/status" ( https://github.com/nocodeapi/status ) that is a React program, that pulls data from here as example https://v1.nocodeapi.com/hugonh/uptime/XPBjzmgSBPYqMCNj?monitors=785820041-785820037-787326309-787325770 and convert to graphical interfaces on localhost:3000 as showed on images
Now im trying as facebook/react
How can i get how many times Down flag(red arrows) happened or Which downtime lasted most, more duration?
My first time using React (JS)
function getLastDown(logs){ const downLogIndex = logs.findIndex(log => log.type === 1) let message; if(downLogIndex === -1){ message = "No down time"
//else happens when its down and shows the time and duration }else { message =
${moment .unix(logs[downLogIndex].datetime) .format("YYYY-MM-DD, h:mm:ss")} (${secondsToHms(logs[downLogIndex].duration)})
} return message }