Best way to show Grafana in Dashboard?

yes i do that . But if i has a security problem , i could not see the Grafana curves in Chrome by paste the http adress. right ?

@Colin yes this is the code in Template node

You need to change the & to & so the code is

"src=http://localhost:3000/d-solo/GQ47zhIZk/chri-dashboard?orgId=1"+ 
"&refresh=1m"+
"&theme=dark"+ 
"&from="+ msg.fromdate +
"&to="+ msg.enddate +
"&panelId="+panelid+"> </iframe>"

@zenofmud :
the same :frowning:

Someone else :rofl:

Doesn't that need to be
"src=/"http://localhost:3000/d-solo/GQ47zhIZk/chri-dashboard?orgId=1/""+
to get the extra quotes round the URL?

Also make sure you are not logged into grafana in the browser when you test it like that. Remember you will not be logged into grafana in the iframe.

@Colin I do beleive you are right, I was just looking at the &amps;

@SuperNinja put a debug node (display complete msg) on the Build Template and see what is actually being built.
show us what you get.

you also need a closing \" at the end of the src= statement
"&panelId="+panelid+"\"> "

Plus I had put one in at the end of the first line, so to summarise it should be, I think

"src=\"http://localhost:3000/d-solo/GQ47zhIZk/chri-dashboard?orgId=1"+ 
"&refresh=1m"+
"&theme=dark"+ 
"&from="+ msg.fromdate +
"&to="+ msg.enddate +
"&panelId="+panelid+\""> </iframe>"

ther is something wrong :

Surely you can work that out.

with this code in TEmplate Node:

panelid=2
msg.template= "<iframe "+
"style=\"width:600px; height:300px; overflow:hidden;  margin:auto; border:0px solid green;\" "+ 

"src=http://localhost:3000/d-solo/GQ47zhIZk/chri-dashboard?orgId=1"+ 
"&refresh=1m"+
"&theme=dark"+
"&from="+ msg.fromdate +
"&to="+ msg.enddate +
"&panelId="+panelid+"> </iframe>"

return msg;

i got this DEBUG :

msg : Object
object
payload: 24
socketid: "ThfNmwf-XPiEqAj6AAAY"
_msgid: "ed4f735b.2837d"
fromdate: "now-24h"
enddate: "now"
template: "<iframe style="width:600px; height:300px; overflow:hidden; margin:auto; border:0px solid green;" src=http://localhost:3000/d-solo/GQ47zhIZk/chri-dashboard?orgId=1&refresh=1m&theme=dark&from=now-24h&to=now&panelId=2> </iframe>"

If i copy the adress generated :

http://localhost:3000/d-solo/GQ47zhIZk/chri-dashboard?orgId=1&refresh=1m&theme=dark&from=now-24h&to=now&panelId=2

And past in Chrome (with Grafana CLOSED) , i got this working graph :


But this non working Dashboard :

:thinking:

You still haven't got the quotes round the url, it needs to be src="http:.."

The security warning is because you did not edit the grafana.ini correct.
URL should be as in the example flow, no need for extra @#£*&())+.

It is much simpler if you use single quotes for the JavaScript strings, then you don't have to worry about escaping the double quotes for html.

in your opinion, if i has a security problem , i could not see the Grafana curves in Chrome by paste the http adress ? right or wrong?
image

To complete the search:

  • Node Red runs on Win10 (Node Red Desktop by Sakazuki)
  • Grafana is also installed on Win10 (through InfluxdB on win10 too)
  • I do not have a Grafana.ini (i search everywhere) but Custom.ini in which I found and modified the anonymous access enabled = true and allow_embedding = true

You know everything

To verify grafana.ini (or custom.ini in win10) settings go in Grafana dashboard to (left side) server admin -> settings
Search for the section auth.anonymous and check the enabled is true.
Goto the security section and verify that the allow_embedding is also true.

Tested with Grafana 6.3.2

in custom.ini
security :


anonymous:
image

i don't understand why, in Grafana they are False !?
in grafana server admin-> settings :
image
image

How to restart Grafana ? I restart the win10 PC : Is that enough?

Just to confirm ... you are running the Grafana service on a Windows 10 PC?

How are you starting it?

good question !
After download and install the last Grafana Win10 package, i connecting to http://localhost:3000/ and create new Grafana dashboard.
https://grafana.com/docs/installation/windows/

Hello msmthng,
Did you manage to find any solution to this.