weathermap 098a_cacti1.x_updated Page refresh issue

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
jckruger
Posts: 7
Joined: Wed Jun 17, 2015 6:56 pm

weathermap 098a_cacti1.x_updated Page refresh issue

Post by jckruger »

Hi all,

I have been struggling with trying to get the map to update and haven't had much luck. Not sure if it is me but I have noticed a js file may be referenced incorrectly. When trying to investigate why it won't refresh I saw a referance to plugins/weathermap/vendor/jquery-/dist/idle-timer.min.js with a 500 response. The directory doesn't exist. I edited the weathermap-cacti-plugin.php line 529 to be plugins/weathermap/vendor/jquery-idletimer/dist/idle-timer.min.js and the error went away for that bit.

I also have an error about overlib.js about

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".
I assume that is how my nginx is setup as it is quite tight.

Can someone show me what files are involved in the refrest. I have tried to look how the graphs are being refreshed and see how that works

Cheers
Justin

Cacti Version 1.2.10
Cacti OS unix
RSA Fingerprint de:cd:18:29:97:34:d5:91:9d:20:f4:a8:99:57:c9:8f
NET-SNMP Version NET-SNMP version: 5.7.2.1
RRDtool Version Configured 1.4.0+
RRDtool Version Found 1.4.8

PHP Version 7.3.15-1+0~20200220.53+debian8~1.gbp931d08
PHP OS Linux
PHP uname Linux xxxxxxxxxxxx 3.16.0-10-amd64 #1 SMP Debian 3.16.81-1 (2020-01-17) x86_64
PHP SNMP Installed
max_execution_time 120
memory_limit 512M


Weathermap version: 0.98a

[EDIT\ Correct me if I am wrong but do I need to add another entry to the cron. Just saw a post viewtopic.php?f=16&t=57111
To generate all the maps, the same as the poller would, you can run "php weathermap-cacti-rebuild.php", but be careful of the permissions in the output directory so that the poller can still write to those files. If any errors are generated, you should see them on the console.
jamesbtate
Posts: 4
Joined: Tue Feb 25, 2020 3:32 pm

Re: weathermap 098a_cacti1.x_updated Page refresh issue

Post by jamesbtate »

jckruger wrote: Wed May 06, 2020 7:04 pm I have been struggling with trying to get the map to update and haven't had much luck. Not sure if it is me but I have noticed a js file may be referenced incorrectly. When trying to investigate why it won't refresh I saw a referance to plugins/weathermap/vendor/jquery-/dist/idle-timer.min.js with a 500 response. The directory doesn't exist. I edited the weathermap-cacti-plugin.php line 529 to be plugins/weathermap/vendor/jquery-idletimer/dist/idle-timer.min.js and the error went away for that bit.
I fixed the cycle/refresh by tweaking two files. One is the fix you got above with the bad path. The other is a change in the cacti-resource/map-cycle.js in the weathermap plugin. See the exact change at https://github.com/thurban/plugin_weath ... 29eee94d0e

I also fixed the overlib.js unsafe-eval stuff in a different commit in the same pull request as I referenced above. Apparently there is also a workaround for that in Cacti 1.2.11 by tweaking a setting. There are other threads in this forum that talk about the hovering not working and explain it.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests