PHP Weathermap from CLI #179
Replies: 4 comments 1 reply
-
|
OK, I've been fiddling around a heap, and it's due to the changes in the weathermap.class.php file. With the old 0.9x version, this was resulting in the HTML file using onmouseover="return overlib type directive, whereas in the new file the output seems to do it all in css: data-hover="
|
Beta Was this translation helpful? Give feedback.
-
|
It should work using jQueryUI. See if you are getting JavaScript issues when hovering. It's no longer using OverLib though. |
Beta Was this translation helpful? Give feedback.
-
When, I updated this plugin, I kind of locked things into Cacti as I have a full time job, and there are lot's of Cacti plugins out there. It mostly works in Cacti and I would love to cover the gaps that remain between what can be done via the Cacti UI, and the raw config files. However, doing that will require time, something that always remains fleeting. Of course, if you can get the core working both inside and outside of Cacti, a pull request would of course be welcomed. But make sure it can work in Cacti too :) As far as Unsafe evals, there still some work to do there as well. WRT hovers, my other comment still holds. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your replies. Not knowing how Cacti actually works, I ended up forming the suspicion that jquery was being called from within Cacti, rather than from the output files weathermap makes when called by the CLI. Looking at the resulting output files showed that there was no script that was calling jquery - but the overlib.js reference was still there. Working on that assumption, and with the impediment of not wanting to modify any of the core files much, rather than following my first approach, I instead re-wrote the overlib.js file that was still being referenced by the HTML output files to incorporate the relevant bits of the weathermap.js and jquery UI scripts, and it works nicely now. Re-writing the overlib.js file saves me from having to change the code that adds that reference into the output HTML (inside weathermap.class.php), and saves me from having to have a separate HTML file that has all the other references in it. The outcome is that I can call weathermap from the CLI and the popups function as desired. Thanks to your work on this project I'm now doing that all from a VM that uses Debian 12 and PHP 8.2 instead of my old Debian 10 PHP 7 VM. I don't know what (if anything) you want to do with this information. I know your motivations are directed for Cacti users, rather than those Philistines like me whom come from the old MRTG + PHPWeathermap days, however, I very much appreciate your work on this project, and am grateful that I've been able to piggy-back off it. If my presumption about Cacti calling the necessary tooltip JS directly is correct, maybe in a future release you might consider ensuring that the weathermap output HTML files work stand alone and incorporate the relevant JS directly, but now I know what I need to do to get this working, I'm content. Thanks again. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
To get this out of the way, I don't expect help. I'm not a Cacti user, but I'm lost, and I'm hoping someone can help.
For years (>15) I've been a loyal MRTG & PHP Weathermap user. However, the old versions of php weathermap relied on old versions of PHP, so I've been trying to upgrade. I found this cacti plugin, and thought I'd give it a bash.
So far, I've managed to get everything working except for the graphs that should pop up when I hover over a link. For some reason I cannot get that working. There are no errors in the console, no apache errors. I've seen some of the various comments about unsafe-eval settings, and I've tried both with and without that.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions