diff --git a/grafanimate/core.py b/grafanimate/core.py index 70b765b..607ad05 100644 --- a/grafanimate/core.py +++ b/grafanimate/core.py @@ -34,18 +34,17 @@ def make_grafana( view = "d" slug = "foo" - query = "" + query = [] if options["dashboard-view"]: view = options["dashboard-view"] if options["panel-id"]: if options["dashboard-view"] == "d-solo": - query = ( - "?panelId=" - + options["panel-id"] - + "&__feature.dashboardSceneSolo&fullscreen" - ) + query.append("panelId=" + options["panel-id"]) + query.append("__feature.dashboardSceneSolo&fullscreen") else: - query = "?viewPanel=" + options["panel-id"] + query.append("viewPanel=" + options["panel-id"]) + query.append("kiosk") + query = "?" + "&".join(query) if url[-1] != "/": url += "/" diff --git a/grafanimate/grafana-studio.js b/grafanimate/grafana-studio.js index e0276de..e24b0d2 100644 --- a/grafanimate/grafana-studio.js +++ b/grafanimate/grafana-studio.js @@ -142,12 +142,6 @@ class GrafanaStudioSrv { _this.improveDashboardChrome(); _this.improvePanelChrome(); }); - - // Adjust user interface on dashboard load. - // FIXME: This happens too fast. Complex dashboards might not have finished loading here. - if (this.hasHeaderLayout("no-chrome", "studio")) { - this.setKioskMode(); - } } improveDashboardChrome() { @@ -158,7 +152,6 @@ class GrafanaStudioSrv { // below CSS properteis are not working with Grafana 11 anymore if (this.hasHeaderLayout("no-chrome", "studio")) { - //this.setKioskMode(); // Add some padding to content top. $(".main-view").css("padding-top", "1rem"); @@ -262,13 +255,6 @@ class GrafanaStudioSrv { return title; } - setKioskMode() { - if (!document.querySelector('[title="Enable kiosk mode"]')) { - document.querySelector('[title="Toggle top search bar"]').click(); - } - document.querySelector('[title="Enable kiosk mode"]').click(); - } - addAttribution() { // Hijack Leaflet attribution area for Grafana and grafanimate. // TODO: Use alternative place if there 's not Worldmap in sight.