plugin_weathermap icon indicating copy to clipboard operation
plugin_weathermap copied to clipboard

Hover is not working

Open pradeepspa opened this issue 4 years ago • 9 comments

I have installed this plugin on a latest cacti version 1.2.11. Looks like hover function is not working even though html style is chose "Overlib". Is hover not supported with this version?

pradeepspa avatar May 15 '20 14:05 pradeepspa

@pradeepspa if you go to settings/General and look for

Allow Unsafe JavaScript eval() calls
Certain Cacti plugins require the use of unsafe JavaScript eval() calls. If you select this option, they will be allowed in Cacti.

Set it to Yes and that should resolve your problem.

jpobeda avatar Jun 01 '20 20:06 jpobeda

@pradeepspa if you go to settings/General and look for

Allow Unsafe JavaScript eval() calls
Certain Cacti plugins require the use of unsafe JavaScript eval() calls. If you select this option, they will be allowed in Cacti.

Set it to Yes and that should resolve your problem.

I confirm that this solve the hover problem, this issue should be closed.

DoubleBeast avatar Nov 26 '20 16:11 DoubleBeast

Actually this was (partially) fixed in a merge commit on the master branch. See https://github.com/thurban/plugin_weathermap/commit/2314cf1547ff3563dbf3b23e18feb2d827ce1804

Also, "unsafe" is in the name of the option... It is a workaround, not a fix. Please try the master branch of this repo.

jamesbtate avatar Nov 27 '20 01:11 jamesbtate

Actually this was (partially) fixed in a merge commit on the master branch. See 2314cf1

Also, "unsafe" is in the name of the option... It is a workaround, not a fix. Please try the master branch of this repo.

you are right, it is solved in the master branch, thanks for the info.

DoubleBeast avatar Nov 27 '20 12:11 DoubleBeast

I've just had the same issue. I installed from the master branch. Console started erroring that overlib.js was not found. I copied the overlib.js from plugins/weathermap to the root installation and the error went away. However Now I'm getting the following error:

overlib.js:1146 Uncaught TypeError: Cannot read property 'clientWidth' of undefined at windowWidth (overlib.js:1146) at placeLayer (overlib.js:568) at runHook (overlib.js:1437) at disp (overlib.js:525) at runHook (overlib.js:1437) at olMain (overlib.js:443) at runHook (overlib.js:1437)

overlib.js seems to use this fixscroll div a couple of times, however on the page source it does not exist. Manually creating this div resolves the issue.

metrotyranno avatar Jan 07 '21 13:01 metrotyranno

Hi That clientWidth statement on line 1146 of overlib.js is only in the development branch. Are you sure you took the file from the master branch ?

thurban avatar Jan 07 '21 13:01 thurban

I think the file was cached by my browser. I did a empty cache and reload. When I manually created the div, the hover graph's corner was right on the mouse. Now after the reset the graph is offset from the mouse. Is this intentional or is there still going something wrong.

metrotyranno avatar Jan 07 '21 14:01 metrotyranno

I have also noticed. When you use the weathermap menu button the hovering does not work. If you refresh the page it starts working again. There are no errors in the console though.

metrotyranno avatar Jan 07 '21 15:01 metrotyranno

On my tests it only works with the console open(?) cuz it forces the javasc call /o/

Cacti 1.2.16 Weathermap Master

zuka1337 avatar Apr 01 '21 18:04 zuka1337

@metrotyranno, @zuka1337, @DoubleBeast, @jamesbtate, @jpobeda, @pradeepspa see the note below.. Overlib will be gone after this.

This issue will be resolved once this pull request is merged: https://github.com/Cacti/plugin_weathermap/pull/39

TheWitness avatar Jan 02 '23 13:01 TheWitness