-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined index:state, object, not refreshing #28
Comments
I've got the same issue. The refresh seems to work just fine if any alerts come and go, but I've disabled the refresh spinner as that seems to come up and never disappear. PHP Version: My machine is running CentOS 7. Thanks |
These seem to be two problems. I think we have to use The second one seems to be because we don't fill out the curl stats for the nagios-api implementation. I opened #29 to fix it. |
Hi mrtazz, thanks for looking into it. I'm definitely seeing
|
If you have a minute, could you test if the current master HEAD fixes this for you? |
Well, appears to have changed the error, so progress? 😄
|
urgh ok, I'll try to test this against a nagios-api instance and see what's up there. |
I've been playing around with this today and hit the same errors reported by @squidsoup and added some workarounds to see if they were causing the problem:
Wrapped line 267 in an if (isset(...)) same was required for https://github.com/lozzd/Nagdash/blob/master/phplib/utils.php#L221 to eliminate the errors.
This appears to be logic fail in resulting in $prospect never being set. I just forced it to " ago" for testing.
I just removed the nagios stats for now. After all that refresh still wasn't working. In fact looking at the js console it was never firing. So I called Disabling the spinner in config causes it to work fine as well as. This looks like it might be a .js logic issue. |
Right after more digging I believe I've found the issue in nagdash.js: Here is the load_nagios_data function:
When the page loads
Clearly if The easy fix is this:
but I think it needs a quick refactor - If i get chance later tonight I'll have a go. |
Refactor wasn't necessary - just remove the else condition. Here is my fix: |
The JS side fix is merged into master. Please let me know if your problems still occur. |
closing this, if the problem persists please reopen. |
Receiving the following errors with php 5.5.14-1, curl, enable_short_tags and nagios-api 1.2.2:
Service status is rendering correctly, but doesn't refresh.
I have
$api_type = "nagios-api";
defined in config.php.Thanks.
The text was updated successfully, but these errors were encountered: