Commit Graph

36 Commits

Author SHA1 Message Date
Marcus Efraimsson
871ad73414
Backend plugins: Renderer v2 plugin (#23625)
grafana-plugin-model is legacy and is replaced by new backend 
plugins SDK and architecture. Renderer is not part of SDK and 
we want to keep it that way for now since it's highly unlikely there 
will be more than one kind of renderer plugin.
So this PR adds support for renderer plugin v2.
Also adds support sending a Device Scale Factor parameter to the 
plugin v2 remote rendering service and by that replaces #22474.
Adds support sending a Headers parameter to the plugin v2 and
remote rendering service which for now only include 
Accect-Language header (the user locale in browser when using 
Grafana), ref grafana/grafana-image-renderer#45.
Fixes health check json details response.
Adds image renderer plugin configuration settings in defaults.ini 
and sample.ini.

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-21 16:16:41 +02:00
Carl Bergquist
3fdd2648b1
Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
Jon Gyllenswärd
7a8c6a9b54
Reporting: Handle timeouts in rendering (#20415)
* Added timeout in grpc call to plugins for rendering
2019-11-18 16:58:15 +01:00
Mario Trangoni
8261613b51 pkg/util/{ip.go,url.go}: Fix some golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
ip.go:8:6⚠️ func SplitIpPort should be SplitIPPort (golint)
url.go:14:6⚠️ func NewUrlQueryReader should be NewURLQueryReader (golint)
url.go:9:6⚠️ type UrlQueryReader should be URLQueryReader (golint)
url.go:37:6⚠️ func JoinUrlFragments should be JoinURLFragments (golint)
2019-01-28 22:29:20 +01:00
Torkel Ödegaard
cb96c6d942 Changed setting to be an alerting setting 2018-09-25 12:17:04 +02:00
Marcus Efraimsson
f106de0efd
enhance error message if phantomjs executable is not found
if arm build, explain that phantomjs is not included by default in arm
builds. If not explain that phantom js isn't installed correctly
2018-06-25 16:06:52 +02:00
Torkel Ödegaard
80d694d205
Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
Dan Cech
c0ecdee375
rename Context to ReqContext 2018-03-07 11:54:50 -05:00
Dan Cech
338655dd37
move Context and session out of middleware 2018-03-06 18:16:49 -05:00
bergquist
8a5fe5b0df renderer: avoid calling Handle twice 2017-12-28 14:37:10 +01:00
Torkel Ödegaard
cafed8ce8f Merge branch 'master' into develop 2017-12-12 13:19:07 +01:00
jomenxiao
ad2a69bff4 add encoding param 2017-12-11 16:01:17 +08:00
Torkel Ödegaard
beb9f8ee74 Merge remote-tracking branch 'origin/master' into develop 2017-12-07 14:14:50 +01:00
bergquist
d6d64c53cd typo 💥 2017-12-01 16:23:55 +01:00
jomenxiao
3f95180c98 fix render http[get] params error 2017-11-28 22:20:22 +08:00
Torkel Ödegaard
9fb60c2fc8 Merge branch 'develop' into panel-title-menu-ux 2017-08-02 09:56:08 +02:00
Torkel Ödegaard
34cda65998 fix: png rendering api & timeout parameter now works as it should AND default render timeout increased from 30 to 60 seconds, fixes #8710 2017-07-31 16:04:04 +02:00
Daniel Lee
f68d2816ab dashfolders: security for png rendering 2017-06-22 01:23:48 +02:00
Torkel Ödegaard
1a9aaa4138 feat(server side png rendering): added timezone parameter for server side rendering, refactoring PR #7264 2017-01-31 07:48:10 +01:00
Ryuichi Sakai
1bc55a2d38 Enable image rendering to use browser time offset 2017-01-15 22:01:28 +09:00
bergquist
1a32ab64b6 tech(renderer): improve renderOpts names 2016-09-26 11:07:36 +02:00
Torkel Ödegaard
175c651e65 fix(server side rendering): Fixed issues with server side rendering for alerting & for auth proxy scenarios, fixes #6115, fixes #5906 2016-09-23 12:29:53 +02:00
fg2it
303cd8a5af [RenderToPng fix] (#4901)
* removing useless code

* fix various minor typo

* don't silence phantomjs timeout and allow more time

* fix gofmt
2016-05-04 09:07:45 +02:00
bergquist
43073da7eb feat(renderer): add timeout for the renderer api
closes #4325
2016-03-10 16:02:10 +01:00
Torkel Ödegaard
059db533d5 HTTP API: grafana /render calls nows with api keys, Fixes #1649 2015-04-08 08:59:12 +02:00
Anthony Woods
7010df0fe8 fixes #1619 Secure PhantomJS Png rendering
removes auth hack to allow phantomjs to query pages as a user
without auth.  Instead we pass phantomjs the session cookie,
which it then includes in the request.
2015-03-21 07:14:13 +08:00
Torkel Ödegaard
397dfc54cd Fixed bug in png rendering when having changed public url 2015-02-06 14:17:40 +01:00
Torkel Ödegaard
e5fbbe96fd fixed error handling, and error logging for panel rendering 2015-02-05 12:23:24 +01:00
Torkel Ödegaard
10820f31c2 Changed go package path 2015-02-05 10:37:13 +01:00
Torkel Ödegaard
1d6413bfae More work on backend for user favorites 2015-01-29 12:10:34 +01:00
Torkel Ödegaard
3744bc3228 fixed server side rendering 2015-01-21 10:51:42 +01:00
Torkel Ödegaard
90925273a0 User / Account model split, User and account now seperate entities, collaborators are now AccountUsers 2015-01-19 18:01:04 +01:00
Torkel Ödegaard
1532eb4278 Fixed png rendering 2015-01-16 17:00:31 +01:00
Torkel Ödegaard
22156fe309 Big refactoring for context.User, and how current user info is fetching, now included collaborator role 2015-01-16 14:32:18 +01:00
Torkel Ödegaard
3226a3a58e Fixed hashing of passwords, Closes #3 2015-01-08 09:00:00 +01:00
Torkel Ödegaard
164d11c816 InfluxDB now works in proxy mode, influxdb username and password is added in the backend and never exposed to frontend, #8 2014-12-29 13:36:08 +01:00