nerdbaggy / StatusPage

Public Status Page for UptimeRobot

Home Page:http://projects.spencerl.com/statuspage/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make compatible with API v2

bgeneto opened this issue · comments

Hello! Uptime Robot API v1 will be dead after june 2017. I've created a new "statusPage.php" file compatible with API v2. You have to change "main.js" duration calculation method, but It's even easier now: just use the new "events.duration" as "diffSeconds" instead of doing the math by hand. Regards. Sorry for posting code directly in here... I'm no github guru :-)

statusPage.php

Also looking for that. Does this really work with API 2 ? Thanks for file - I will give try.

Copied to Paste Bin: https://pastebin.com/Pdkzrwr1

Can you advise the javascript change needs, thanks

The updated js file is here (see variables diffSeconds, diffHours, diffMinutes, and timeDiff):
main.js
And the v2 compatible php file is here (same file as above):
statusPage.php

thank you :-)

Thanks bgeneto. Could you please add an file statuspage.min.js with your new version of main.js.
So Users could just replace the statuspage.min.js instead of Running it through Gulp.

Any chance of finding a way to sort them: #18

commented

@TomasHurtz I posted a way to do this in #18

Yes - I got it working thank you :-)

Hey all -

[EDIT: I fixed the below issue using the revised statusPage.php file in the above comment > https://github.com//issues/44#issuecomment-300221190

@bgeneto What I would like to know is what is the difference between main.js and statuspage.min.js ? Do I need both of these JS files (main.js does not appear in the main build ? ] - otherwise - how to incorporate JS changes mentioned?


Issue I am facing is it does not appear to be collecting any Graphing Data in my outputted page: When clicking on the graph icon

server status

Clicking on the icon I get "No graphing data is currently available, sorry!" (appears to be generating from the JS file)

Any one else have this issue? I cleared cache - but not changed.

Could this be due to incorrect API parameters in statusPage.php ? I notice parameters used appear to be from APIv1 (different in APIv2)

Fixed! Working again now - I had to delete htaccess file and phpfastcache. Then restore phpfastcache.

Would be good if the main branch could be updated to latest ;-)