XavierBerger / RPi-Monitor

Real time monitoring for embedded devices
https://xavierberger.github.io/RPi-Monitor-docs/index.html
GNU General Public License v3.0
1.16k stars 175 forks source link

InsertHTML cross-over #269

Open patricktokeeffe opened 5 years ago

patricktokeeffe commented 5 years ago

I have a status page configured with two InsertHTML directives:

web.status.2.content.4.name=Alarms
web.status.2.content.4.icon=warning.png
web.status.2.content.4.line.1="<pre>"+InsertHTML("/data/ebam/latest/Alarm_Report")+"</pre>"

web.status.2.content.5.name=Settings
web.status.2.content.5.icon=usb_hdd.png
web.status.2.content.5.line.1="<pre>"+InsertHTML("/data/ebam/latest/Settings_Report")+"</pre>"

A small typo (Alarms_Report instead of Alarm_Report) resulted in one of my HTML sources being unavailable:

image

Instead of ignoring the missing HTML file, it is silently replaced with the parameter provided to my other InsertHTML directive (i.e. the result is duplicate insertions):

image

A hard page refresh will produce the expected result (blank entry for Alarms) but the "Auto refresh page status" feature will repopulate the alarm field with the wrong file.

Leepic commented 5 years ago

Have you try to restart rpimonitor and open it's webUI in a private tab? Maybe it can be caused by the cache...

htcfreek commented 4 years ago

Hello.

I have encountered a similar problem with the following pages:

My config: [...]line.1="Public IPv4: "+InsertHTML("https://api4.ipify.org") [...]line.2="Public IPv6: "+InsertHTML("https://api6.ipify.org")

Right after setting config, reastarting the deamon and loading rpimonitor-page in browser, I get shown the same value for both addresses.