Commit Graph

68 Commits

Author SHA1 Message Date
Marcus Efraimsson
890e1d8f94
Backend plugins: Send query type to backend plugins (#24120)
Use v0.60.0 of sdk.
2020-05-05 10:32:34 +02:00
Kyle Brandt
0dc8f4ea89
backend_plugins: duration support in Frame (#23962)
sdk v0.57.0
go mod tidy
2020-04-27 14:48:20 -04:00
kay delaney
f48ba11d4c
Datasource/Cloudwatch: Adds support for Cloudwatch Logs (#23566)
* Datasource/Cloudwatch: Adds support for Cloudwatch Logs

* Fix rebase leftover

* Use jsurl for AWS url serialization

* WIP: Temporary workaround for CLIQ metrics

* Only allow up to 20 log groups to be selected

* WIP additional changes

* More changes based on feedback

* More changes based on PR feedback

* Fix strict null errors
2020-04-25 22:48:20 +02:00
Kyle Brandt
80e1191ca0
Backend Plugins: (breaking change) Add PluginContext (#23788)
* breaking change for newer backend plugins
* use exported protobuf converters and sdk types to reduce duplicate code
* uses grafana-plugin-sdk-go@v0.54.0
2020-04-23 14:08:21 -04:00
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
Ryan McKinley
aaab636bf4
Plugins: verify manifest signature (#23519)
* try decode

* vendor crypto deps

* commited missing vendor deps

* Theme: Refactoring theme colors variables  (#23513)

* Theme: Typography updates

* Updated

* Updated snapshot

* Renamed colors to palette

* Introduce colors namespace

* Massive theme color move

* Removing color selection logic with more abstract concepts

* Updates

* Minor sidemenu change

* Fix example jaeger agent port in docs (#23514)

* @grafana/ui: Replace various icons using Icon component (#23442)

* Replace icons in dashboard and settings

* Replace icons in alerting

* Update batch of icons

* Implement icons accross various files

* Style updates

* Search: Fix recent and starred icons

* Update styling and details

* Replace new icon created by unicons

* Fix e2e test, styling

* Minor styling updates

Co-authored-by: Clarity-89 <homes89@ukr.net>

* trying with p512 key

* trying with p512 key

* lint

* update with real signatures

* fixes spacing in test files

* remove convey from test

* use errutil to wrap errors

* removes print statement

* splitt tests into two run statements

* unexport plugin manifest struct

Co-authored-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
2020-04-14 06:02:39 -07:00
Kyle Brandt
5153673884
BackendPlugins: update to sdk v0.42.0
misc cleanup
2020-04-09 15:47:30 -04:00
Marcus Efraimsson
a29056966c
Use v0.39.0 of SDK (#23388) 2020-04-08 18:54:23 +02:00
Arve Knudsen
7799dd84c1
Chore: Upgrade to Go 1.14 (#23371)
* Chore: Upgrade to Go 1.14
* Chore: Bump version of grafana/grafana-ci-deploy Docker image
* Chore: Fix/bump version of grafana/build-container Docker image
* CircleCI: Upgrade build Docker images
2020-04-08 14:13:05 +02:00
Kyle Brandt
f6cbb26167
BackendPlugin: Change QueryData response format (#23234)
* BackendPlugin: (wip) change response format
goes with https://github.com/grafana/grafana-plugin-sdk-go/pull/109

* fix error mapping in wrapper

* latest of my sdk branch

* latest of my sdk branch

* TransformWrapper fixes

* latest of sdk branch (removes extra meta)

* add metadata in wrappers

* also set error string

* sdk: v0.35.0
2020-04-07 10:13:14 -04:00
Noval Agung Prayogo
ea35ae4d1f
Chore: Update the xorm dependency (#22376)
* Upgrade xorm

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-01 15:57:21 +02:00
Agnès Toulet
f63877f247
Core: Add go-datemath library (#22978) 2020-03-26 10:26:47 +01:00
Marcus Efraimsson
b0253219eb
Use v0.33.0 of SDK (#23031) 2020-03-24 15:01:02 +01:00
Kyle Brandt
0e09a3fe15
Alerting: support alerting on data.Frame (that can be time series) (#22812)
data.Frame (that can be series) are converted to as tsdb.TimeSeriesSlice - so new backend plugins can be shimmed into existing alerting

use sdk v0.31.0
2020-03-18 10:30:07 -04:00
Carl Bergquist
b0407b3578
upgrades plugin sdk to 0.30.0 (#22846)
ref grafana/grafana-plugin-sdk-go#94
ref grafana/grafana-plugin-sdk-go#70
2020-03-17 16:58:52 +01:00
Carl Bergquist
ebc9549cbc
Add support for sending health check to datasource plugins. (#22771)
closes #21519
ref grafana/grafana-plugin-sdk-go#93
2020-03-13 12:31:44 +01:00
Kyle Brandt
69a5530aec
Backend Plugins: use sdk v0.26.0 (#22725)
allows Field names to be duplicated, goes with #22705
2020-03-11 10:06:16 -04:00
Kyle Brandt
73c4bef70f
Dependency: sdk's dataframe package renamed to data (#22700)
* use sdk 0.24.0
2020-03-10 15:42:15 -04:00
Carl Bergquist
5f94d31da9
Send jsondata for Datasources on DatasourceConfig for backend plugins (#22681)
ref https://github.com/grafana/grafana-plugin-sdk-go/pull/84
2020-03-10 15:18:27 +01:00
Marcus Efraimsson
c12245bbb3
Backend plugins: Updates due to changes in SDK (#22649)
Use v0.20.0 of SDK
2020-03-10 12:59:03 +01:00
Marcus Efraimsson
4ff613a432
Backend Plugins: Support handling of streaming resource response (#22580)
Use v0.19.0 of SDK.
Support handling of streaming resource response.
Disable gzip/compression middleware for resources 
to allow chunked/streaming response to clients the gzip
middleware had to be disabled since it buffers the full
response before sending it to the client.

Closes #22569

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>
2020-03-06 01:44:07 +07:00
Marcus Efraimsson
c6cc840ceb
Chore: Modules tidy and vendor (#22578) 2020-03-05 00:45:05 +01:00
Erik Sundell
934a8f08ae
Stackdriver: Project selector (#22447)
* clean PR #17366

* udpate vendor

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* Implement projects management for stackdriver

* [WIP][Tests] Fix errors

* clean anonymous struct

* remove await

* don't store project list

* Add default project on query editor

* gofmt

* Fix tests

* Move test data source to backend

* Use segment instead of dropdown. remove ensure default project since it's not being used anymore.

* Fix broken annotation editor

* Load gceDefaultAccount only once when in the config page

* Reset error message on auth type change

* Add metric find query for projects

* Remove debug code

* Fix broken tests

* Fix typings

* Fix lint error

* Slightly different approach - now having a distiction between config page default project, and project that is selectable from the dropdown in the query editor.

* Fix broken tests

* Attempt to fix strict ts errors

* Prevent state from being set multiple times

* Remove noOptionsMessage since it seems to be obosolete in react select

* One more attempt to solve ts strict error

* Interpolate project template variable. Make sure its loaded correctly when opening variable query editor first time

* Implicit any fix

* fix: typescript strict null check fixes

* Return empty array in case project endpoint fails

* Rename project to projectName to prevent clashing with legacy query prop

* Fix broken test

* fix: Stackdriver - template replace on filter label

should have a regex format as that escapes the dots
in the label name which is not valid.

Co-authored-by: Labesse Kévin <kevin@labesse.me>
Co-authored-by: Elias Cédric Laouiti <elias@abtasty.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2020-03-02 09:31:09 -05:00
Arve Knudsen
eb98d9c15b
grafana-cli: Upgrade to urfave/cli v2 (#22402)
* grafana-cli: Upgrade to urfave/cli v2
2020-02-26 12:27:31 +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
twendt
ff6a082e23
Auth: Azure AD OAuth (#20030)
* Implement Azure AD oauth

* Use go-jose and cleanup

* Update go-jose in go.mod

* cleanup

* Add unit tests

* Fix scopes

* Add documentation page

* Improve documentation

* Convert extract_role into function.

* Do not use upn and replace unique_name with preferred_username

* Configure login button

* Use official microsoft icon and color from branding guideline.

* Add Azure AD config section in sample.ini.
2020-02-13 12:12:25 +03: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
John Dyer
0fcb2d0b2f Alerting: Support passing tags to Pagerduty and allow notification on specific event categories (#21335)
Add support for passing tags to Pagerduty and allow notification 
on specific event categories such as Class, Group and Component.

Ref #19912, #19913

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-01-23 13:20:07 +01:00
Kyle Brandt
5a31e48548
Vendor: grafana-plugin-sdk-go v0.11.0 (#21552)
upgrades https://github.com/grafana/grafana-plugin-sdk-go from v0.6.0 to v0.11.0
2020-01-16 12:53:51 -05: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
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
Ryan McKinley
57c8155971
Websockets: upgrade websocket libray to 1.4.1 (#21280) 2019-12-29 23:07:38 -08:00
Dave Henderson
66b70b50b8 Tracing: Support configuring Jaeger client from environment (#21103)
* Tracing: Support configuring Jaeger client from environment
* Tracing: Replace deprecated Jaeger Client call
2019-12-18 20:09:15 +01:00
Emil Tullstedt
fe8b533497
Modules: Add patched goavro dependency for extensions (#21027) 2019-12-11 14:44:29 +01:00
Mitsuhiro Tanda
0c89b93ce0 upgrade aws-sdk-go (#20957)
Upgrading aws-sdk-go since there's additional changes 
for IMDSv2 support.
2019-12-10 10:26:53 +01:00
Emil Tullstedt
30771f25bf
Revert "Modules: Add goavro dependency for extensions (#20920)" (#20928)
Goavro doesn't compile on 32-bit systems.

This reverts commit 413be3a6a0.
2019-12-06 14:10:07 +01:00
Emil Tullstedt
413be3a6a0
Modules: Add goavro dependency for extensions (#20920) 2019-12-06 10:33:19 +01:00
Mitsuhiro Tanda
a1605c58d9 CloudWatch: Upgrade aws-sdk-go (#20510)
There is security risk of SSRF if Grafana is running on EC2.

#20508
2019-12-02 19:25:44 +01:00
Kyle Brandt
4afd40018b
transform: update to use sdk with frame.labels moved to frame.[]field.labels (#20670)
sdk v0.4.0
2019-11-26 13:28:16 -05:00
Kyle Brandt
c9309edbb0
transform: changes to support sdk v0.2.0 (#20426)
and update vendor
2019-11-18 11:40:40 -05:00
Kyle Brandt
ef4d98b441
Chore/Go-dep: change sdk to use new tag (#20422)
dependency code is the same, just new tag for same commit
2019-11-15 12:10:20 -05:00
Torkel Ödegaard
be2bf1a297
AuthProxy: Can now login with auth proxy and get a login token (#20175)
* AuthProxy: Can now login with auth proxy and get a login token

* added unit tests

* renamed setting and updated docs

* AuthProxy: minor tweak

* Fixed tests and namings

* spellfix

* fix

* remove unused setting, probably from merge conflict

* fix
2019-11-07 17:48:56 +01:00
Stephan Eicher
8cf75b4e75 pkg/util: Replace custom pbkdf2 implementation by maintained version (#19941) 2019-11-06 10:03:10 +02: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
Leonard Gram
30775a3f49
Build: adds the pkg/errors dependency that was missing from go.mod (#20143)
This dependency was added a while back and exists in the vendor
directory but was never properly added to go.mod.
2019-11-01 16:54:44 +01:00
gotjosh
378208c6ae
Depedency: Bump crewjam/saml to the latest master (#20126)
* Dependency: Bump our SAML Library to the latest version
Fixes a non-obligatory check for RSA encrypted assertions. Previously they required a certificate embedded in the assertion, this is not mandatory according to the SAML standard.
2019-11-01 10:32:47 +00:00
Kyle Brandt
009d58c4a2
Plugins: Transform plugin support (#20036)
currently temporary separate http api
2019-10-29 12:22:31 -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
Patrik Karlström
b848276fb8 Update aws-sdk-go (#19138)
With the recent release of IAM roles for service accounts 
the AWS sdk needs to be updated to at least 1.23.13 in 
order to utilize this feature.
2019-10-14 20:39:54 +02:00
Arve Knudsen
39d8e73412
Chore: Upgrade to Go 1.13 (#19502)
* Chore: Upgrade to Go 1.13

Fixes: #18878

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Upgrade lint tools in order to work with Go 1.13

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Fix Go linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2019-10-02 13:59:05 +02:00