Marcus Efraimsson
e6cec8dbdc
Backend plugins: Prepare and clean request headers before resource calls ( #22321 )
...
Moves common request proxy utilities to proxyutil package with
support for removing X-Forwarded-Host, X-Forwarded-Port,
X-Forwarded-Proto headers, setting X-Forwarded-For header
and cleaning Cookie header.
Using the proxyutil package to prepare and clean request
headers before resource calls.
Closes #21512
2020-03-03 11:45:16 +01:00
Carl Bergquist
67ec9edcc8
chore: avoid alias for models in plugins ( #22483 )
2020-02-28 12:51:21 +01:00
Marcus Efraimsson
9d7c74ef91
Backend Plugins: Provide proper plugin config to plugins ( #21985 )
...
Properly provides plugin configs to backend plugins.
Uses v0.16.0 of grafana-plugin-sdk-go-
Ref #21512
Ref #19667
2020-02-19 19:17:05 +01:00
Marcus Efraimsson
679acd30ba
Backend Plugins: make transform work again ( #22078 )
2020-02-10 12:17:54 -05:00
Marcus Efraimsson
0390b5601e
Backend plugins: Implement support for resources ( #21805 )
...
Implements initial support for resources using v0.14.0 of SDK.
Ref #21512
2020-01-31 11:15:50 +01:00
Marcus Efraimsson
5c711bfb79
Backend Plugins: Collect and expose metrics and plugin process health check ( #21481 )
...
Adds support for collecting metrics from backend plugins and
exposing them thru Grafana's Prometheus metrics endpoint.
Enables to check health of backend plugin by using the route
`/api/plugins/<plugin id>/health`.
Uses sdk v0.6.0.
Closes #20984
2020-01-15 13:10:48 +01:00
Marcus Efraimsson
1a810ebfe4
Plugins: Move backend plugin manager to service ( #21474 )
...
Moves backend plugin manager to service instead of
global functions in backendplugin package.
Closes #20053
2020-01-13 20:18:45 +01:00
Marcus Efraimsson
bb849d53bf
Backend Plugins: Refactor backend plugin registration and start ( #21452 )
...
Moves the details of loading plugins into the backend
plugin manager from the respective plugin (datasource,
transform and renderer).
2020-01-13 17:13:17 +01:00
Marcus Efraimsson
baba1634b8
Plugins: Use grafana-plugin-sdk-go v0.5.0 ( #21116 )
...
* fix dispense
* plugin loading refactor
Moves common functionality of registering, starting,
stopping and restarting backend plugins to
backendplugin package.
* simplify plugin descriptors
* target sdk v0.5.0
Co-authored-by: Kyle Brandt <kyle@kbrandt.com >
2020-01-08 11:43:28 -05:00
Marcus Efraimsson
6a4ad136dc
Backend plugins: Log wrapper args formatting fix ( #20521 )
...
Formatting fix missed in #20514
2019-11-20 16:57:55 +01:00
Marcus Efraimsson
58b7958952
Backend plugins: Log wrapper args formatting ( #20514 )
...
Backend plugins is recommended to use hclog with json
formatting to get proper log output in grafana server log.
Old hclog-wrapper.go that I deleted while back is still in
the repo so deletes that.
2019-11-20 14:27:28 +01:00
Kyle Brandt
da1df02813
transform_plugin: stop plugin when grafana stops ( #20397 )
...
fixes https://github.com/grafana/gel-app/issues/49
until #20362
2019-11-14 15:49:31 -05:00
Kyle Brandt
b8029dcd4e
transform_plugin: pass encoded dataframes through ( #20333 )
2019-11-12 16:21:10 -05:00
Kyle Brandt
17f36d0492
sdk: update to latest ( #20182 )
...
which removes an unused field from the Transform api
2019-11-05 14:12:54 -05:00
Ryan McKinley
861eb72113
transform: add expressions to query editor (w/ feature flag) ( #20072 )
...
for use with gel which is not released yet.
2019-10-30 14:38:28 -04:00
Ryan McKinley
2bb4684741
DataSource: don't filter hidden queries automatically ( #20088 )
2019-10-30 09:51:13 -07:00
Kyle Brandt
009d58c4a2
Plugins: Transform plugin support ( #20036 )
...
currently temporary separate http api
2019-10-29 12:22:31 -04:00
Arve Knudsen
f9774acc4c
Enable errcheck for golangci-lint ( #19976 )
...
* Enable `errcheck` for golangci-lint
* Fix linting errors
* pkg/plugins: Fix tests
* pkg/plugins: Add test
2019-10-28 17:25:35 +01:00
Marcus Efraimsson
771f21ed09
api: new v2 metrics query endpoint
...
Requests to endpoint will currently will error unless expressions feature flag is true.
Co-authored-by: Sofia Papagiannaki <papagian@gmail.com >
2019-10-25 09:28:26 -04:00
Sofia Papagiannaki
fc08c26025
WIP: Spawn backend plugins v2 ( #19835 )
...
* WIP: Spawn backend plugins v2
* Add test for plugin version
* Fix support for SDK plugins
Co-authored-by: Kyle Brandt <kyle@kbrandt.com >
Co-authored-by: Marcus Olsson <olsson.e.marcus@gmail.com >
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* WIP: Draft PR for fork of V2 sdk / bi-directional support (#19890 )
* temporary use export-datasource-plugin branch of grafana-plugin-sdk
* fix failing test
* remove debug (spew) lines
* misc cleanup
* add expressions feature toggle
* use latest grafana-plugin-sdk-go
2019-10-24 17:15:27 +02:00
Arve Knudsen
31735422ef
pkg/plugins: Only warn if plugins fail to load. Fixes #19846 ( #19859 )
...
pkg/plugins: Only warn if plugins fail to load. Fixes #19846
2019-10-18 14:39:38 +02:00
Arve Knudsen
0b1913af6f
pkg/plugins: Check errors ( #19715 )
...
* pkg/plugins: Check errors
2019-10-11 21:02:15 +02:00
Jon Gyllenswärd
606392b4c6
API: added dashboardId and slug in response after import ( #19692 )
2019-10-08 17:47:18 +02:00
Hugo Häggmark
75dcaecc99
Plugins: Skips existence of module.js for renderer plugins ( #19318 )
...
* Fix: Skips test for module.js for plugins of renderer type
Fixes #19130
* Refactor: Changes after PR comments
* Chore: Fixes go lint issue
2019-09-23 22:54:28 -07:00
Ryan McKinley
f7c55d3968
Plugins: better warning when plugins fail to load ( #18671 )
...
* better pluin feedback
* add server side check for module.js
2019-08-22 07:04:02 +02:00
Andrej Ocenas
8c49d27705
CLI: Allow installing custom binary plugins ( #17551 )
...
Make sure all data is sent to API to be able to select correct archive version.
2019-07-29 10:44:58 +02:00
Ryan McKinley
0ca1e90b2e
Plugins: fix previous commit, output "build" property in json
2019-07-19 06:21:39 -07:00
Ryan McKinley
3e0625ff3d
Plugins: add build info to plugin metadata ( #18164 )
2019-07-18 11:52:34 -07:00
Hugo Häggmark
fb39831df2
Explore: Queries the datasource once per run query and uses DataStreamObserver ( #17263 )
...
* Refactor: Removes replaceUrl from actions
* Refactor: Moves saveState thunk to epic
* Refactor: Moves thunks to epics
* Wip: removes resulttype and queries once
* Refactor: LiveTailing uses observer in query
* Refactor: Creates epics folder for epics and move back actioncreators
* Tests: Adds tests for epics and reducer
* Fix: Checks for undefined as well
* Refactor: Cleans up previous live tailing implementation
* Chore: merge with master
* Fix: Fixes url issuses and prom graph in Panels
* Refactor: Removes supportsStreaming and adds sockets to DataSourcePluginMeta instead
* Refactor: Changes the way we create TimeSeries
* Refactor: Renames sockets to streaming
* Refactor: Changes the way Explore does incremental updates
* Refactor: Removes unused method
* Refactor: Adds back Loading indication
2019-06-03 14:54:32 +02:00
Ryan McKinley
1033f0f905
DataSourceMeta: add an option to get hidden queries ( #17124 )
...
* add an option to get hidden queries
* make sure you have meta
* supportsHiddenQueries
* remove spaces
* DataSources: hidden queries flag
2019-05-21 13:46:19 +02:00
zhulongcheng
2fff8f77dc
move log package to /infra ( #17023 )
...
ref #14679
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com >
2019-05-13 08:45:54 +02:00
Ryan McKinley
56702902a1
Plugins: Remove dataFormats key and add skipDataQuery ( #16984 )
2019-05-10 07:46:14 +02:00
Torkel Ödegaard
e1d408a66f
AddDataSource: Updated page design & categories ( #16971 )
...
* minor refactoring
* Added category
* Minor progress
* Progres
* Updated descriptions
* Added custom sort
* NewDataSource: progress
* Updated design
* NewDataSource: Updated design
* Updated link
* Feedback changes
2019-05-09 11:45:39 +02:00
Samuel
846b9327a5
LDAP: Added reload endpoint for LDAP config ( #15470 )
...
* 4843 - Added reload endpoint for LDAP config
closes #4843
* Refactor to make the reload work after master drifted
2019-05-03 14:53:07 +02:00
Carl Bergquist
68f5ddf18c
replace dep with go modules ( #16017 )
...
- guide shamelessly stolen from prometheus/prometheus
- updates local interface of oauth exchange
- updates local impl of hclogger
- bump jaeger client version
closes #16088
2019-04-16 12:00:55 +02:00
Ryan McKinley
d6887bf77f
Plugins: Optionally preload some plugins during frontend app boot ( #15266 )
...
* auto load
* update comments
* gofmt
* use preload from json
* fix formatting
* change general plugin loader to app
* Refactoring: Plugin preloading #15266
2019-04-11 08:02:22 +02:00
Torkel Ödegaard
a1453607a9
Changed noQueries to a dataFormats array that will allow a panel to define supported formats and prefered (first in array)
2019-02-12 16:05:29 +01:00
Johannes Schill
075fb8e91c
chore: Rename isDataPanel to noQueries
2019-02-12 12:28:53 +01:00
Johannes Schill
c4b2dcefbe
feat: Introduce IsDataPanel attribute to plugin.json
2019-02-12 12:28:53 +01:00
Mario Trangoni
b7628f2060
pkg/util/{filepath.go,shortid_generator.go}: Fix golint issues
...
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint ./...
filepath.go:12:5⚠️ error var WalkSkipDir should have name of the form ErrFoo (golint)
shortid_generator.go:11:5⚠️ var validUidPattern should be validUIDPattern (golint)
shortid_generator.go:19:6⚠️ func IsValidShortUid should be IsValidShortUID (golint)
shortid_generator.go:24:6⚠️ func GenerateShortUid should be GenerateShortUID (golint)
2019-01-28 22:37:44 +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
60ea99078e
Panel help view fixes
2018-12-19 11:03:54 +01:00
Erik Sundell
6f85fa6b35
add new flag in order to be able to indicate whether the datasource has native support for tables
2018-11-28 15:06:22 +01:00
Torkel Ödegaard
480da34279
filter out alpha plugins in api call, fixes #14030
2018-11-15 11:10:47 +01:00
Mario Trangoni
abb6b135a3
pkg/plugins/plugins.go: remove ineffective break statement.
...
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/plugins/plugins.go:124:4⚠️ ineffective break statement. Did you mean to break out of the outer loop? (SA4011) (megacheck)
2018-10-19 19:49:04 +02:00
Torkel Ödegaard
c282f39121
Merge branch 'master' into stackdriver-plugin
2018-09-21 10:17:13 +02:00
Mario Trangoni
f19fd1a9b0
pkg/plugins/dashboards_updater.go: Simplify err check
...
$ gometalinter --vendor --disable=all --enable=megacheck --deadline=10m ./...
pkg/plugins/dashboards_updater.go:51:2⚠️ 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013) (megacheck)
2018-09-18 23:42:25 +02:00
bergquist
8dbba467f1
moves /tests to /pkg/plugins
...
ref #11433
2018-09-17 17:29:47 +02:00
Daniel Lee
e7648c4070
dsproxy: implements support for plugin routes with jwt file
...
Google Cloud service accounts use a JWT token to get an
oauth access token. This adds support for that.
2018-09-14 09:35:27 +02:00
Erik Sundell
7197a4c17f
Adds jwt token signing google auth
2018-09-14 09:35:26 +02:00