Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering: Fix panel PNG rendering when using sub url & serve_from_sub_path = true #21306

Merged
merged 2 commits into from Jan 6, 2020

Conversation

bgranvea
Copy link
Contributor

@bgranvea bgranvea commented Dec 31, 2019

What this PR does / why we need it:
This is an improvement to allow rendering dashboards (phantomjs or grafana-image-renderer) when a sub url is configured. The setting 'serve_from_sub_path' must be set to true.

Example:

[server]
domain = bgr-dev.iv.local
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true

[rendering]
server_url = http://bgr-dev.iv.local:8081/render
callback_url = http://bgr-dev.iv.local:3000/grafana/

An nginx reverse proxy is set up as described in documentation. The following URL gives a rendering of a dashboard:

http://bgr-dev.iv.local/grafana/render/d/vmie2cmWz/bar-gauge-demo?orgId=1&refresh=10s&from=1577776682916&to=1577798282916&width=1000&height=1500&tz=Europe%2FParis

@claassistantio
Copy link

claassistantio commented Dec 31, 2019

CLA assistant check
All committers have signed the CLA.

@torkelo torkelo changed the title Rendering: fix dashboard rendering when using sub url Rendering: Fix panel PNG rendering when using sub url & serve_from_sub_path = true Jan 6, 2020
@torkelo torkelo added this to the 6.5.3 milestone Jan 6, 2020
@torkelo torkelo merged commit b8b6182 into grafana:master Jan 6, 2020
@torkelo
Copy link
Member

torkelo commented Jan 6, 2020

Thanks for contributing!

ryantxu added a commit that referenced this pull request Jan 6, 2020
* origin/master: (43 commits)
  Docs: Use https scheme for Grafana playground links (#21360)
  fix docs links (#21359)
  AddDatasourcePage: Refactoring & more Phantom plugins (#21261)
  Chore: Remove empty flot.pie file (#21356)
  Docs: Fix link (#21358)
  Docs: Fix InfluxDB templated dashboard link (#21343)
  Rendering: Fix panel PNG rendering when using sub url & serve_from_sub_path = true (#21306)
  NewsPanel: update default feed url (#21342)
  docs: fix influxdb templated dashboard link (#21336)
  Docs: Update Windows.md (#21333)
  Arrow: don't export arrow... breaking phantomjs e2e test (#21331)
  DataFrame: round trip metadata to arrow Table (#21277)
  Prometheus: user metrics metadata to inform query hints (#21304)
  Panel: disable edit/duplicate/delete entry for repeat panel (#21257)
  Prometheus: Disable suggestions at beginning of value (#21302)
  grafana/ui: Do not build in strict mode as grafana/ui depends on non-strict libs (#21319)
  Docs: Update security.md (#20981)
  @grafana/data: use timeZone parameter rather than isUtc (#21276)
  Units: support dynamic count and currency units (#21279)
  Docs: Added sudo and removed $ where inconsistent. (#21314)
  ...
@bgranvea bgranvea deleted the fix-rendering-suburl branch January 7, 2020 12:48
ryantxu added a commit that referenced this pull request Jan 8, 2020
* grafana/master:
  TimeZones: fix utc test (#21393)
  Build: package all binaries for enterprise (#21381)
  Datasource: fixes prometheus datasource tests - adds align range
  CircleCI: Testing upgrade to CircleCI 2.1 (#21374)
  Storybook: Remove reference to jquery.flot.pie file from storybook config (#21378)
  Cloudwatch: Fixed crash when switching from cloudwatch data source (#21376)
  Docs: Added Squadcast notifications (#21372)
  Chore: upgrade d3 (#21368)
  Datasource: fix a bug where deleting data source will trigger save and test events (#21300)
  Forms: revamped select (#21092)
  Toolkit: add git log info to the plugin build report (#21344)
  Docs: Use https scheme for Grafana playground links (#21360)
  fix docs links (#21359)
  AddDatasourcePage: Refactoring & more Phantom plugins (#21261)
  Chore: Remove empty flot.pie file (#21356)
  Docs: Fix link (#21358)
  Docs: Fix InfluxDB templated dashboard link (#21343)
  Rendering: Fix panel PNG rendering when using sub url & serve_from_sub_path = true (#21306)
aocenas pushed a commit that referenced this pull request Jan 14, 2020
…b_path = true (#21306)

* Rendering: fix dashboard rendering when using sub url

* rollback on render.go: no need to add sub-path

(cherry picked from commit b8b6182)
@aocenas aocenas mentioned this pull request Jan 14, 2020
aocenas pushed a commit that referenced this pull request Jan 15, 2020
…b_path = true (#21306)

* Rendering: fix dashboard rendering when using sub url

* rollback on render.go: no need to add sub-path

(cherry picked from commit b8b6182)
paulfantom added a commit to paulfantom/grafana that referenced this pull request Jan 21, 2020
* upstream/v6.5.x: (559 commits)
  DataLinks: Make data links input grow again (grafana#21499)
  Release 6.5.3 version changes
  CloudWatch: dimension_values templating fix (grafana#21401)
  Build: package all binaries for enterprise (grafana#21381)
  Cloudwatch: Fixed crash when switching from cloudwatch data source (grafana#21376)
  Rendering: Fix panel PNG rendering when using sub url & serve_from_sub_path = true (grafana#21306)
  Units: support farenheit (existing misspelling) (grafana#21249)
  Docs: fixed broken doc link for graph and table panels (grafana#21238)
  Docs: fix of broken doc link in the dashlist panel's help section (grafana#21230)
  Docs: Update the link to docs for singlestat (grafana#21225)
  Table: Matches column names with unescaped regex characters (grafana#21164)
  DataLinks: Sanitize data/panel link URLs (grafana#21140)
  API: Validate redirect_to cookie has valid (Grafana) url  (grafana#21057)
  Prometheus: Prevents validation of inputs when clicking in them without changing the value (grafana#21059)
  Prometheus: Fixes so user can change HTTP Method in config (grafana#21055)
  Templating: Fixes default visibility for submenu to same as dashboard (grafana#21050)
  Fix: Shows SubMenu when filtering directly from table (grafana#21017)
  Elastic: Fix multiselect variable interpolation for logs (grafana#20894)
  release 6.5.2
  Prometheus: removes metric syntax (grafana#21003)
  ...
@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants