i’m using a compact-controller 100 - plc-prg, docker with influxdb- and grafana-images on it. All works fine - but:
In the codesys-visu i’m using the browser-element in the hope of displaying the grafana-web-page there.
The URL was set as http://xxx.xxx.xxx.xxx:3000…pagewithgraphics…
It worked when used in the normal webbrowser, but inside the visu-element it doesn’t. A grey frame appears with the message: Website is blocked - contact the user.
Can this have to do with the grafana-proxy-setting?
I already tried different settings in the grafana-ini and my web-knowledge is still expandable! Can someone help?
Hi @schweichichi,
For security reason embedding webpage in another is by default disabled.
To allow embedding, you can modify the grafana config file, but it looks more convenient to do it using an environment variable, so you can add the following parameter to your docker run command :
Does this still work? I’m using a EdgeController with CoDeSys 3.5 FW25.
$HTTP["url"] =~ "^/webvisu/?" {
var.response_header_policy_webvisu = (
# CSP for WebVisu, allowing inline sources.
#"Content-Security-Policy" => "default-src 'self' 'unsafe-inline'",
"Content-Security-Policy" => "default-src 'self' 'unsafe-inline';frame-src * 'unsafe-inline' 'unsafe-eval'",
# Tell older browsers that this page can only be displayed if all ancestor
# frames are same origin to the page itself.
"X-Frame-Options" => "SAMEORIGIN"
)
Still get “Content blocked” message when trying to display Grafana as embedded “browser control” in my visualization.
— Edit
Not sure where it went wrong, but this still works on EdgeController as well.
To be able to display Grafana on TP600, you will have to use an older version of Grafana. The latest version I found supported by the TP600’s browser is 7.5.7
I’m not sure https allows to display http content.
Maybe you should try enable http and try with http://192.168.1.169/webvisu URL.
Have you modified the webserver config as mentionned upper ?
I was using a PFC100 2nd gen and there was not a webvisu.conf file located in /etc/lighttpd…
I switched over to a 762-5304 since this is what will be used for the project. Because I am running target visualizations I had no need to edit that file.
I setup the network configuration for the TP600 to DHCP and connected it to the network that has internet access.
I used the ‘Special Controls’>‘Web Browser’ from the Visualization toolbox. This web browser allowed me to connect to web links including the IP camera and display a live feed.
Notes:
The camera needs to be compatible with a modern browser (I had to update the firmware (my camera was 6yrs old)).
The camera feed can not exceed the resolution of the display (762-5304 = 1280x800px)
@quenorha I am doing the same, I have Codesys 3.5 and wago PFC 200, I want to embed the web page object in the runtime, and connect the grafana dashboard over the container IP shared address. Is this procedure valid also for the hardware + software mentioned ?
Thank you.
Should work as well.
Please note that there might be some adaptation to be made in the /etc/lighttpd/webvisu.conf config file, depending on the firmware version.