Commit Graph

6484 Commits

Author SHA1 Message Date
Will Browne
94688be398
Plugins: Use plugin.pluginDir as source of truth for plugin location (#36711)
* use plugin.pluginDir as source of truth for plugin location

* correct the interface
2021-07-15 09:08:25 +02:00
Will Browne
e82f8dbef9
switch to json resp for errors (#36743) 2021-07-15 08:56:11 +02:00
Marcus Efraimsson
10c892fa5b
Postgres/MySQL/MSSQL: Fix name of time field should be named Time for time series queries (#36720)
Name of time field changed in v8 for time series queries from Time to the name of the selected 
time column, i.e. time or time_sec. These changes should make sure that the name of time field 
is always returned as Time for time series queries.

Fixes #36059

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-14 11:29:51 +02:00
Andres Martinez Gotor
114f6714c4
AzureMonitor: Fail rather than warn if Log credentials are set (#36652) 2021-07-14 09:53:24 +02:00
Will Browne
7dbe388d4e
fix gzipped plugin asset response (#36721) 2021-07-14 09:38:49 +02:00
David Parrott
19f18bcecc
Alerting: annotation on state change (#36535)
* WIP

* Add annotation on alert state change

* move annotation creation to manager

* praise the linter!

* add debug msg when creating annotation
2021-07-13 09:50:10 -07:00
Alexander Emelin
607c5d2555
Live: handle influx input with incomplete/asymmetrical field set (#36664) 2021-07-13 19:17:59 +03:00
David Parrott
310d3ebe3d
change template expansion missing value handling (#36679) 2021-07-13 06:57:18 -07:00
Kevin Song
0b95fd8ae6
Legacy Alerting: Replace simplejson with a struct in webhook notification channel (#34952)
* Add type for webhook body

* Update pkg/services/alerting/notifiers/webhook.go

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-13 15:14:04 +03:00
Torkel Ödegaard
702fd1cad9
Visualizations: Dynamically set any config (min, max, unit, color, thresholds) from query results (#36548)
* initial steps for config from data

* Moving to core and separate transforms

* Progress

* Rows to fields are starting to work

* Config from query transform working

* UI progress

* More scenarios working

* Update public/app/core/components/TransformersUI/rowsToFields/rowsToFields.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* transform all

* Refactor

* UI starting to work

* Add matcher UI to transform

* Apply to self

* Adding a reducer option

* Value mapping via new all values reducer

* value mappings workg add -A

* Minor changes

* Improving UI and adding test dashboards

* RowsToFieldsTransformerEditor tests

* Added tests for FieldToConfigMapping Editor

* Added test for ConfigFromQueryTransformerEditor

* Minor UI tweaks

* Added missing test

* Added label extraction

* unified mapping

* Progress refactoring

* Updates

* UI tweaks

* Rename

* Updates

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-13 10:51:34 +02:00
Will Browne
e06335ffe9
Plugins: Improve grafana-cli UX + API response messaging for plugin install incompatibility scenario (#36556)
* improve UX for plugin install incompatability

* refactor test
2021-07-13 09:58:46 +02:00
idafurjes
5d01add7da
Fix Postgres query handling null values for smallint (#36648)
* Fix Postgres query handling null values for smallint

* Fix converting to int16
2021-07-13 09:36:24 +02:00
Ganesh Vernekar
8efe1856e2
Alerting: A better and cleaner way to know if Alertmanager is initialised (#36659)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-07-12 18:53:01 +05:30
Brent Cetinich
37c3e6f9b9
Add StreamName dimension for AWS/KinesisVideo namespace (#36655) 2021-07-12 14:24:10 +02:00
Zoltán Bedi
ee89e51c48
Tempo: show hex strings instead of uints for ids (#36471) 2021-07-12 14:12:47 +02:00
Ganesh Vernekar
e19c690426
Alerting: Fix potential panic in Alertmanager when starting up (#36562)
* Alerting: Fix potential panic in Alertmanager when starting up

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix reviews

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-07-12 11:15:16 +05:30
Alexander Emelin
e1358eeb76
live: better error logging in push API (#36601) 2021-07-10 16:46:21 +03:00
Marcus Efraimsson
ca2223f705
Database: Fix incorrect format of isolation level configuration parameter for MySQL (#36565) 2021-07-09 19:05:48 +02:00
Gábor Farkas
e4ece0530a
InfluxDB: Flux: fix backward compatibility for some queries (#36603)
* influxdb: flux: better backward-compatibility

* added comment-explanation
2021-07-09 17:37:14 +02:00
Ryan McKinley
44afe4a597
Testdata: generate data that can link to USA state codes (#36537) 2021-07-09 08:02:57 -07:00
Andres Martinez Gotor
1dc5d037e4
Add AWS/AmazonMQ dimensions (#36573) 2021-07-09 16:19:29 +02:00
Andrej Ocenas
ea2ba06b93
CloudWatch/Logs: Fix log alerts in new unified alerting (#36558)
* Pass FromAlert header from new alerting

* Add better error messages
2021-07-09 13:43:22 +02:00
Dominik Prokop
663a8935f7
User analytics: Add Rudderstack integration (#36567)
* Replace analytics service with Echo backend

* Add Rudderstack integration and general pageview and interaction Echo events

* Update conf/defaults.ini

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update packages/grafana-runtime/src/types/analytics.ts

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update conf/defaults.ini

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update tests

* Force cla check

Co-authored-by: Dan Cech <dcech@grafana.com>
2021-07-09 11:45:25 +02:00
Marcus Andersson
52bd1eb1c5
Plugins: converted the plugins admin app to a core feature in grafana (#36026)
* moved the plugins admin to core and used the plugins toggle to decide which version to use.

* reverted change.

* changed so the library tab is the default one.

* fixing navigation.
#

* fixed so we have the proper header.

* including the core plugins

* fixed so we display logos for local plugins.

* fixed so we have a working version of plugin catalog.

* removed console logs.

* reverted changes.

* fixing failed test.
2021-07-08 17:50:42 +02:00
Ganesh Vernekar
94d2520a84
Alerting: Allow space in label and annotation names (#36549)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-07-08 18:26:09 +05:30
Serge Zaitsev
9b2d7d6d69
Gradually remove Macaron web framework (#36325)
* add macaron code to the code base

* remove unused secure cookies support from macaron

* clean up modules

* remove com dependency

* fix silly typos

* little cleanup, remove recovery middleware

* remove logger middleware

* remove static handler and remove unused context methods

* bring inject into macaron codebase

* remove unused applicator

* add back macaron license

* more cleanups in macaron code

* remove unused injector Set method

* remove unused context methods: param to int conversion, body helper type, cookie helpers

* remove action from context

* remove complex environment handling, we only use Env variable

* restore ReplaceAllParams to fix the tests
2021-07-08 14:19:40 +02:00
ying-jeanne
c22905f864
Graphite: Convert to use grafana-plugin-sdk-go contracts (#35798)
* Use Dataframes and extract tags from response

* Fix timestamp conversion

* Add tests for data frame conversion

* Add missing RefID and simplify returning an error

* draft dataframe/sdk convertion for graphite

* intermedia

* modify init because registration failed

* Allocate memory for each data point value

* Remove redundant memory aliasing

* Remove redundant new line

* Sort imports

* Simplify returning nil values

* fix lint

* remove unused jsondata

* add checks on query length

* remove basic auth from request

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-07-08 18:03:55 +08:00
Will Browne
2616580bae
allow for appropriate content-type to be set (#36545) 2021-07-08 11:14:24 +02:00
Nathan Rodman
a0dac9c6d9
Alerting: Add alertmanager notifications tab (#35759)
* Add alertmanager notifications tab

* Link to silences page from am alert

* Include summary for alertmanager group

* Fix colors for am state

* Add horizontal dividing line

* PR feedback

* Add basic unit test for alert notificaitons

* Rename Notificaitons component file

* Polling interval to groups

* Add alertmanager notifications tab

* Link to silences page from am alert

* Include summary for alertmanager group

* PR feedback

* Add basic unit test for alert notificaitons

* Rename Notificaitons component file

* Alerting: make alertmanager notifications view responsive (#36067)

* refac DynamicTableWithGuidelines

* more responsiveness fixes

* Add more to tests

* Add loading and alert state for notifications

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-07-07 16:17:26 -07:00
Joan López de la Franca Beltran
d9e500b654
UsageStats: Expose what ds types should be reported (#35916) 2021-07-07 23:12:00 +02:00
gotjosh
a86ad1190c
Alerting: Refactor state manager as a dependency (#36513)
* Alerting: Refactor state manager as a dependency

Within the scheduler, the state manager was being passed around a
certain number of functions. I've introduced it as a dependency to keep
the "service" interfaces as clean and homogeneous as possible.

This is relevant, because I'm going to introduce live reload of these
components as part of my next PR and it is better if dependencies are
self-contained.

* remove unused functions

* Fix a few more tests

* Make sure the `stateManager` is declared before the schedule
2021-07-07 17:18:31 +01:00
Sofia Papagiannaki
fc90d47863
Alerting API: Restrict access to Alertmanager configuration (#36507)
* Alerting API: Restrict access to Alertmanager configuration to viewers
2021-07-07 16:29:18 +03:00
Will Browne
333d520528
Plugins: Improve API response for plugin assets (#36352)
* improve API response for plugin assets 403

* remove unnecessary newline
2021-07-07 12:18:05 +02:00
Dimitris Sotirakis
069fb0cf38
HTTP Client: Introduce dataproxy_max_idle_connections config variable (#35864)
* Introduce dataproxy_max_idle_connections config var

* Fix according to reviewer's comments

* Fix according to reviewer's comments - round 2

* Remove unused const

* Bring back MaxIdleConnsPerHost

* Fixes according to reviewer's comments
2021-07-07 13:13:53 +03:00
idafurjes
60ac54d969
Chore: Refactor OAuth/social package to service (#35403)
* Creating SocialService

* Add GetOAuthProviders as socialService method

* Add OAuthTokenService

* Add GetOAuthHttpClient method to SocialService

* Rename services, access socialMap from GetConnector

* Fix tests by mocking oauthtoken methods

* Move NewAuthService into Init

* Move OAuthService to social pkg

* Refactor OAuthService to OAuthProvider

* Fix nil map error, rename file, simplify tests

* Fix bug for Forward OAuth Identify

* Remove file after rebase
2021-07-07 08:54:17 +02:00
Kevin Minehart
92cb503486
use absolute path when getting grafana path; add test for directory (#36001) 2021-07-06 11:28:02 -05:00
Dimitris Sotirakis
a18d3007a7
Folders: Return 409 Conflict status when folder already exists (#36429)
* Return 409 Conflict when trying to post folder that already exists

* Fix tests

* Update documentation for new error message in folders api
2021-07-06 11:11:29 +02:00
Zoltán Bedi
0ae8a85828
CloudwatchLogs: send error down to client (#36277)
* CloudwatchLogs: send error down to client

* Move error handling down to startLiveQuery
2021-07-05 16:12:58 +02:00
Tharun Rajendran
f62bc59688
DataSource: change status code to 404 if datasource and plugin is not found (#36426)
Fixes #36418
2021-07-05 14:46:34 +02:00
Torkel Ödegaard
4932b9dfa4
DateFormats: Fix reading correct setting key for use_browser_locale (#36428) 2021-07-05 14:45:36 +02:00
Sergey Kostrukov
89ba607382
AzureMonitor: strongly-typed AzureCredentials and correct resolution of auth type and cloud (#36284) 2021-07-05 12:20:12 +02:00
Tharun Rajendran
1ab452e88a
API: Fix 404 status code plugin pages (#36402) 2021-07-05 10:24:14 +02:00
Sofia Papagiannaki
8a3edf280e
Alerting: Fix prometheus API to check folder permissions (#36301) 2021-07-05 10:49:14 +03:00
Marcus Efraimsson
b26b922658
Contribute: Ongoing refactoring of context.Context everywhere (#36363) 2021-07-02 17:07:21 +02:00
Leonard Gram
09a96ad2ad
Azure OAuth: debug logs for user information (#36389) 2021-07-02 16:24:33 +02:00
Karl Persson
2fd7031102
Access Control: Add fine-grained access control to explore (#35883)
* add fixed role for datasource read operations

* Add action for datasource explore

* add authorize middleware to explore index route

* add fgac support for explore navlink

* update hasAccessToExplore to check if accesscontrol is enable and evalute action if it is

* add getExploreRoles to evalute roles based onaccesscontrol, viewersCanEdit and default

* create function to evaluate permissions or using fallback if accesscontrol is disabled

* change hasAccess to prop and derive the value in mapStateToProps

* add test case to ensure buttons is not rendered when user does not have access

* Only hide return with changes button

* remove internal links if user does not have access to explorer

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-02 14:43:12 +02:00
Selene
ef05596e07
Allow white labeling loading logo (#36174)
* Allow to whitelabeling loading logo

* Add loading_logo to documentation

* Change loading_logo to loading_logo_url
2021-07-02 14:17:10 +02:00
ying-jeanne
54acb18c5f
migrate away from goconvey (#36203) 2021-07-02 19:22:47 +08:00
Andres Martinez Gotor
30dc4025c2
Remove AWS CW client cache (#36311) 2021-07-02 10:13:23 +02:00
Ward Bekker
b255f3db3f
Team Sync: Add group mapping to support team sync in the Generic OAuth provider (#36307)
Added group mapping to support team sync in the Generic OAuth provider.

Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Dan Cech <dan@aussiedan.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-07-01 22:40:46 +02:00