aletson / zabbixweb

A frontend monitoring board for Zabbix server.
MIT License
69 stars 41 forks source link

Index.html showing plain black screen #34

Closed jashankochar closed 7 years ago

jashankochar commented 7 years ago

i have configured the way u described but when am opening the url it is displaying bllank screen error

eburgueno commented 7 years ago

@jashankochar can you post a diff between the index on the repo and the one you have? do mask the username and password before posting.

jashankochar commented 7 years ago

index.html is same as i have just configured var zabbix with my zabbix server /zabbix/api_jsonrpc.php , nothing else i changed

eburgueno commented 7 years ago

@jashankochar the reason I was asking was just to make sure you didn't accidentally leave out a quotiation mark or something like that.

But looking at your console error in more details, it appears that the Zabbix API call is not returning you any hosts. Are you able to see any response headers and/or data in the Network tab? Also, what version of Zabbix are you running?

jashankochar commented 7 years ago

3.2 for zabbix versions

aletson commented 7 years ago

I think @eburgueno is probably on the right track, can you post what's in your Network tab when you load the page? Wondering what the API call to Zabbix is returning, or whether this might be a CORS issue.

aletson commented 7 years ago

Looks like a blog commenter may have solved this one. https://www.andrewletson.com/building-better-zabbix-frontend/#comment-30

It looks like, in the latest version, the string comparison between the Zabbix API versoin and the string '2.4' is failing.

My vote is to branch the old version and call it a day, which I've now done. Please pull latest from master and give it another shot.

m-vanson commented 7 years ago

Yes, it probably has something to do with detecting the API version. The latest commit is a dirty fix for this but it will only work on API version > 2.4.

Perhaps this is worth mentioning in the readme.md?

aletson commented 7 years ago

Yeah, it's forked to pre-3.0 for older versions. I'll make a note in readme.md for those still running older versions of Zabbix.

jashankochar commented 7 years ago

@velinath , sorry for late replying that day i discovered this problem and solved. For api call it was calling user.authenticate by default , which i corrected by deleting that part and keeping user.login and it works. Thanks. And i will surely contribute more to this repo in coming days.