Repository navigation
v1.0.2
Fixed
-
Malformed iframe URLs: every embedded Grafana iframe was loading a
URL missing both?andpanelId=N, e.g.
/d-solo/<uid>/<slug>&var-device=.... Grafana responded with a 404
whose defaultX-Frame-Options: denymade the browser show the
iframe as<host> refused to connect, masquerading as a Grafana
embedding/CSP problem.Root cause: in
_iframe_pair.html,"?panelId="|add:panel_id|stringformat:"s"
evaluated asstringformat(add("?panelId=", 3), "s"). Django'sadd
filter, given a string and an int, fails both theint()+int()and
str+strbranches and returns the empty string, deleting the whole
?panelId=Nprefix from the query string. Coercepanel_idto a
string before feeding it intoadd. -
URL-encode
device_valueandcomponent_valuein the iframesrc
so Device/component names containing spaces or&produce valid URLs.
Install
pip install git+https://github.com/AlphaCompute/netbox-grafana-embed.git@v1.0.2