Commit Graph

5823 Commits

Author SHA1 Message Date
Emil Hessman
71899a0ed7
Chore: Rewrite models dashboards test to standard library (#30023) 2021-01-01 13:29:40 +01:00
Emil Hessman
4f3a7bb0fa
Chore: Rewrite models dashboard acl test to standard library (#30022) 2021-01-01 13:22:48 +01:00
Emil Hessman
8e1196e3ed
Chore: Rewrite models alert test to standard library (#30021) 2021-01-01 13:18:47 +01:00
Emil Hessman
18bc6810f9
Chore: Rewrite ldap login test to standard library (#29998)
* Chore: Rewrite ldap login test to standard library

* Preserve original ldap enabled setting after test
2021-01-01 13:11:04 +01:00
Emil Hessman
504e4f23f2
Chore: Rewrite grafana login test to standard library (#29997) 2020-12-31 11:21:14 +01:00
Joan López de la Franca Beltran
67ea8758a0
Chore: Add Enterprise dependencies (#29994)
* Docs: update auditing docs

* Chore: Add Enterprise dependencies

* Apply suggestions from code review

Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-12-29 16:37:20 +01:00
ying-jeanne
375e8e4fd0
SQLStore: customise the limit of retrieved datasources per organisation (#29358)
* SQLStore: customise the limit of retrieved datasources per organisation

* update all suggestions regarding nil or 0 as default

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* correct default.ini description + adding unittest

* Apply suggestions from code review

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>

* modify unittest name

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-12-28 12:24:42 +01:00
Tania B
551f96089b
Remove the bus from teamgroupsync (#29810)
* Add fake TeamSyncService

* Change SyncTeams dispatch to direct method call

* Remove SyncTeamsCommand struct

* Move TeamSyncService to a separate package

* Remove context from SyncTeams args

* Add comments to teamsyncgroup package

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Replace TeamSyncService with TeamSyncFunc

* Remove unnecessary error check

* Add a test

* Fix test input

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-12-23 14:42:20 +02:00
Hugo Häggmark
40d17af2e3
PanelLibrary: Add PATCH to the API (#29956)
* PanelLibrary: Adds uid and renames title to name

* Chore: removing lines

* PanelLibrary: Adds update to api

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/database.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: changes after PR comments

* Replace references to put with patch

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-23 12:42:52 +01:00
Arve Knudsen
be62dc4d2f
librarypanels: Fix JSON field casing in tests (#29954)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-22 14:52:43 +01:00
Hugo Häggmark
35a755fe50
PanelLibrary: Adds uid and renames title to name (#29944)
* PanelLibrary: Adds uid and renames title to name

* Chore: removing lines

* Chore: updates comments

* Chore: changes after PR comments
2020-12-22 12:00:41 +01:00
Arve Knudsen
216b6b01f4
RedirectResponse: Implement all of api.Response (#29946)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-21 13:44:22 +01:00
Hugo Häggmark
433b861093
PanelLibrary: Adds get and getAll to the api (#29772)
* PanelLibrary: Adds get to the API

* Refactor: adds tests for get and getAll and cleans up other tests

* Refactor: changed name on DTO

* Update pkg/services/librarypanels/api.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/database.go
2020-12-21 09:40:27 +01:00
Emil Hessman
e598c9e6d9
Chore: Remove duplicate interpolateString test (#29941) 2020-12-21 07:53:31 +01:00
Emil Hessman
5c0094feef
Chore: Rewrite influxdb query parser test to standard library (#29940) 2020-12-21 07:51:46 +01:00
Emil Hessman
19b2845581
Chore: Convert tsdb request test to standard library (#29936)
* Chore: Convert tsdb request test to standard library

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-20 11:53:28 +01:00
Emil Hessman
408c96fee3
Chore: Convert tsdb interval test to standard library (#29935) 2020-12-20 09:43:06 +01:00
Sofia Papagiannaki
3cac10e598
AlertingNG: Create a scheduler to evaluate alert definitions (#29305)
* Always use cache: stop passing skipCache among ngalert functions

* Add updated column

* Scheduler initial draft

* Add retry on failure

* Allow settting/updating alert definition interval

Set default interval if no interval is provided during alert definition creation.
Keep existing alert definition interval if no interval is provided during alert definition update.

* Parameterise alerting.Ticker to run on custom interval

* Allow updating alert definition interval without having to provide the queries and expressions

* Add schedule tests

* Use xorm tags for having initialisms with consistent case in Go

* Add ability to pause/unpause the scheduler

* Add alert definition versioning

* Optimise scheduler to fetch alert definition only when it's necessary

* Change MySQL data column to mediumtext

* Delete alert definition versions

* Increase default scheduler interval to 10 seconds

* Fix setting OrgID on updates

* Add validation for alert definition name length

* Recreate tables
2020-12-17 16:00:09 +02:00
Will Browne
af47d28499
Alerting: Copy frame field labels to time series tags (#29886)
* Alerting: Copy frame field labels to time series tags

* keep comment

* add test case
2020-12-16 18:07:45 +01:00
Vardan Torosyan
de22374751
Usage Stats: Introduce an interface for usage stats service (#29882)
Adding an interface type for usage stats service allows us to not depend on the implementation outside of the package, for example when testing we can easily mock the service
2020-12-16 16:12:02 +01:00
Vardan Torosyan
fac34f65c9
Usage Stats: Allow to add additional metrics to the stats (#29774)
The change allows to add external, additional metrics which will be reported with the rest of hardcoded metrics, allowing to add metrics without a need to change the service itself.
2020-12-16 12:44:33 +01:00
Arve Knudsen
dd2d206d99
Backend: Remove more globals (#29644)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-15 19:09:04 +01:00
Arve Knudsen
c2cad26ca9
Chore: Disable default golangci-lint filter (#29751)
* Disable default golangci-lint filter

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

* Chore: Fix linter warnings

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-15 09:32:06 +01:00
Kyle Brandt
c6b11a8f90
Expressions: support ${my var} syntax (#29819) 2020-12-14 14:21:16 -05:00
Arve Knudsen
3fdf4be529
Chore: Enable more go-ruleguard rules (#29781)
* Chore: Enable more go-ruleguard rules

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-14 15:51:59 +01:00
Arve Knudsen
ac09baae7d
Chore: Use Header.Set method instead of Header.Add (#29804)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-14 15:13:01 +01:00
Emil Hessman
cedaf41a36
Chore: Rewrite opentsdb test to standard library (#29792) 2020-12-14 09:33:25 +01:00
Benjamin Häringer
2b5a88bf8c
CloudWatch: Add support for AWS DirectConnect ConnectionErrorCount metric (#29583) 2020-12-14 10:02:16 +02:00
Peter Holmberg
6118ab415d
Alerting: Next gen Alerting page (#28397)
* create page and sidebar entry

* add components for query editor and definition

* split pane things

* add reducer and action

* implement split pane and update ui actions

* making things pretty

* Unify toolbar

* minor tweak to title prefix and some padding

* can create definitions

* fix default state

* add notificaion channel

* add wrappers to get correct spacing between panes

* include or exclude description

* implement query editor

* start on query result component

* update from master

* some cleanup and remove expressions touch ups

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-11 14:49:14 +01:00
Kyle Brandt
67372378ac
Expressions: Field names from refId (#29755)
so one can see which expression data came from when visualizing
2020-12-11 06:59:12 -05:00
Will Browne
a515c54404
Plugins: Add support for signature manifest V2 (#29240)
* add support for signing manifest v2

* add log and fix var name

* shorten comment

* improve comment

* remove unnecessary param

* improve naming

* reformat

* rename var

* refactor test

* remove unnecessary assert

* simplify test requirements

* add more test cases

* address feedback

* revert naming

* flip tracking missing

* fix check

* Trigger Build
2020-12-11 12:57:57 +01:00
Arve Knudsen
e2351f7951
Chore: Configure go-ruleguard via golangci-lint (#28419)
* Chore: Configure go-ruleguard via golangci-lint

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-11 11:45:17 +01:00
Arve Knudsen
12661e8a9d
Move middleware context handler logic to service (#29605)
* middleware: Move context handler to own service

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

Co-authored-by: Emil Tullsted <sakjur@users.noreply.github.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2020-12-11 11:44:44 +01:00
Hugo Häggmark
47afe1fa42
PanelLibrary: Adds delete Api (#29741)
* PanelLibrary: Adds delete

* Chore: fixes some comments

* Chore: changes after PR comments

* Refactor: deletes from correct org
2020-12-11 06:08:32 +01:00
Jeremy Alvis
f021f97c31
DataSourceSettings: Add servername field to DataSource TLS config (#29279)
* DataSourceSettings: Add servername field to DataSource TLS config

A DNS lookup URL can be provided in the DataSource URL field in order
to dynamically load balance between multiple instances of a DataSource.
When using mutual TLS, Golang's TLS config implementation checks that
the certificate's common name (< 1.15) or subject alternative name
(>= 1.15) has the same value as the domain being accessed. If the DNS
entry is dynamically generated for a specific environment, the
certificate cannot be generated with a name matching the dynamic
DNS URL. As such, Golang offers a servername field that can be set to
overwrite what value is used when checking against the certificate's
common name (or subject alternative name). Without this change, Skip
TLS Verify must be set to true in order for the DataSource to work,
removing some of the benefits gained by using mutual TLS.

This commit adds the ability to set Grafana's internal Golang TLS config
servername field from the UI or a provisioned DataSource.

The servername field is optional and the existing behavior is retained if
the field is not set.

Co-authored-by: Dana Pruitt <dpruitt@vmware.com>
Co-authored-by: Jeremy Alvis <jalvis@pivotal.io>

* Update docs with PR review changes

Co-authored-by: Jeremy Alvis <jalvis@pivotal.io>
Co-authored-by: Dana Pruitt <dpruitt@vmware.com>

* Update with additional PR requested changes

* Minor updates based on PR change requests

Co-authored-by: Dana Pruitt <dpruitt@vmware.com>
2020-12-10 16:07:05 +01:00
Arve Knudsen
8b21290164
Chore: Disable gosec on certain line (#29382)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-10 11:53:21 +01:00
Domas
70d68c156d
Logging: log frontend errors caught by ErrorBoundary, including component stack (#29345)
* log component stack on error boundary

* test for error boundary

* PR feedback fixes
2020-12-10 10:50:37 +01:00
Domas
7d9a528184
Logging: rate limit fronted logging endpoint (#29272)
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2020-12-09 16:22:24 +01:00
Agnès Toulet
924212b42b
API: add Status() to RedirectResponse (#29722) 2020-12-09 15:08:53 +01:00
Hugo Häggmark
941ba1d2f7
PanelLibrary: Adds api and db to create Library/Shared/Reusable Panel (#29642)
* PanelLibrary: Adds panellib table

* Refactor: removes drop table migration

* Refactor: fixes spelling mistake

* Refactor: changes after PR comments

* Refactor: some more renames

* PanelLibrary: Adds api and db to create Library/Shared/Reusable Panel

* Refactor: reverts SqlStore change and uses RegisterOverride instead

* Refactor: fixes lint error

* Refactor: fixes imports

* Refactor: reverts unintentional changes

* Refactor: Adds repository

* Revert "Refactor: Adds repository"

This reverts commit 4c46e8a6c4.

* Refactor: changes after PR comments

* Refactor: Simplfies further

* Chore: fixes linting

* Chore: Changes after PR comments

* Update pkg/services/librarypanels/api.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: fixes import after commited suggestion

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-09 13:10:18 +01:00
Will Browne
31d64d9074
Auth: Add SigV4 header allowlist to reduce chances of verification issues (#29650)
* enforce allowlist

* fix default auth selection

* add Host and comment
2020-12-09 10:45:57 +01:00
Will Browne
3de091edf1
Alerting: Use correct time series name override from frame fields (#29693)
* cater for empty labels and new DisplayNameFromDS field

* simplify

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* increase priority for ds display name

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-08 22:04:05 +01:00
Dafydd
af3c0fe602
Bugfix 29848: Remove annotation_tag entries as part of annotations cleanup (#29534)
closes https://github.com/grafana/grafana/issues/29484
2020-12-08 19:41:35 +01:00
Carl Bergquist
609d61dece
Adds go dep used by an Enterprise feature. (#29645)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-12-08 16:22:24 +01:00
Carl Bergquist
e1d5fc8627
instrumentation: align label name with our other projects (#29514)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-12-08 14:26:07 +01:00
ying-jeanne
9668c172b3
CloudWatch: namespace in search expression should be quoted if match exact is enabled #29109 (#29563) 2020-12-08 12:37:07 +01:00
Kyle Brandt
46d1c99e2c
Expr: fix time unit typo in ds queries (#29668) 2020-12-07 16:14:22 -05:00
Kyle Brandt
311b563c9b
Expr: make reduction nan/null more consistent (#29665) 2020-12-07 15:07:18 -05:00
Kyle Brandt
da32cef4ae
Expr: fix func argument panic (#29663)
would get wrong type for reflect
2020-12-07 13:58:20 -05:00
Kyle Brandt
6d64c603c2
Expr: fix failure to execute due to OrgID (#29653)
* Expr: fix failure to execute due to OrgID
Get orgID from the plugin context, which makes more sense anyways.
makes expressions work again after https://github.com/grafana/grafana/pull/29449 changes.

* Do not save organisation on its alert query model

Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
2020-12-07 10:30:38 -05:00
Tania B
c869ae5791
Support svg embedded favicons in whitelabeling (#29436)
* Fix favicon embedding in whitelabeling

* Fix formatting
2020-12-07 12:23:53 +02:00
Emil Hessman
a5e43535b3
Chore: Rewrite tsdb sql engine test to standard library (#29590)
* Chore: Rewrite tsdb sql engine test to standard library

Signed-off-by: Emil Hessman <emil@hessman.se>
2020-12-07 09:10:33 +01:00
Ryan McKinley
752d4ed941
Cloudwatch: session cache should use UTC consistently (#29627) 2020-12-04 12:44:16 -08:00
Agnès Toulet
d92beeee3d
API: add ID to snapshot API responses (#29600)
* API: add ID to snapshot API responses

* API: update snapshot tests
2020-12-04 16:22:58 +01:00
Torkel Ödegaard
3d6380a0aa
QueryGroup & DataSourceSrv & DataSourcePicker changes simplify usage, error handling and reduce duplication, support for uid (#29542)
* Starting moving more stuff into data source picker

* WIP progress

* Progress on datasource picker rethink

* Things are working now some details to figure out

* Removed commented part

* Complex work on getting data source lists

* Fixed variable support showing correct data sources

* Tried fixing dashboard import but failed

* Fixes

* Fixed import dashboard

* Fixed unit test

* Fixed explore test

* Fixed test

* Fix

* fixed more tests

* fixed more tests

* fixed showing which option is default in picker

* Changed query variable to use data source picker, updated tests and e2e

* Fixed more tests

* Updated snapshots, had wrong typescript version
2020-12-04 14:24:55 +01:00
Arve Knudsen
4e0ad50102
middleware: Make scenario test functions take a testing.T argument (#29564)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-04 11:09:32 +01:00
Emil Hessman
db0fb1e2c1
Chore: Rewrite sqlstore migration test to use standard library (#29589)
Signed-off-by: Emil Hessman <emil@hessman.se>
2020-12-04 09:05:00 +01:00
Emil Hessman
3c1bcc7275
Chore: Rewrite tsdb prometheus test to standard library (#29592)
Signed-off-by: Emil Hessman <emil@hessman.se>
2020-12-04 08:49:39 +01:00
Arve Knudsen
f326b79cc1
Security: Add gosec G304 auditing annotations (#29578)
* Security: Add gosec G304 auditing annotations

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

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* Add gosec annotations

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

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* Add gosec annotations

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

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* add G304 auditing comment

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* Add gosec annotations

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

* space

Signed-off-by: bergquist <carl.bergquist@gmail.com>

* Add gosec annotations

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

Co-authored-by: bergquist <carl.bergquist@gmail.com>
2020-12-03 22:13:06 +01:00
Emil Hessman
69ac69b7c5
Chore: Rewrite tsdb testdatasource scenarios test to standard library (#29591)
Signed-off-by: Emil Hessman <emil@hessman.se>
2020-12-03 21:31:01 +01:00
Hugo Häggmark
562a1c36b1
PanelLibrary: Adds library_panel table (#29565)
* PanelLibrary: Adds panellib table

* Refactor: removes drop table migration

* Refactor: fixes spelling mistake

* Refactor: changes after PR comments

* Refactor: some more renames
2020-12-03 15:18:10 +01:00
Arve Knudsen
f2b7fbc32a
Chore: Check errors from Close calls (#29562)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-03 10:11:14 +01:00
Arve Knudsen
58dbf96a12
Middleware: Rewrite tests to use standard library (#29535)
* middleware: Rewrite tests to use standard library

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-03 08:28:54 +01:00
Arve Knudsen
752a424e1f
Auth proxy: Return standard error type (#29502)
* Rewrite auth proxy tests to use standard lib

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

* Auth proxy: Use standard error type

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-02 16:57:16 +01:00
Jack Westbrook
aa70a38391
Dashboards: hide playlist edit functionality from viewers and snapshots link from unauthenticated users (#28992)
* feat: hide snapshots menu item from viewers

* feat(playlists): prevent viewers from creating/editing playlists

* feat: prevent viewers seeing playlist nav link if no playlists

* refactor(playlist): rename isViewer property to canEditPlaylists

* revert(playlists): put back note if viewer and no playlists

* refactor(snapshots): consider admin/editor permission in folders/dashboards for displaying menu item

* feat(snapshots): only show snapshot nav item if user is signed in

* fix(snapshots): revert snapshots to previous state if delete snapshot api error
2020-12-02 15:51:22 +01:00
Carl Bergquist
4edb1364e9
fixes bug with invalid handler name for metrics (#29529)
closes https://github.com/grafana/grafana/issues/29487

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-12-02 13:42:17 +01:00
Arve Knudsen
8d5b0084f1
Middleware: Simplifications (#29491)
* Middleware: Simplify

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

* middleware: Rename auth_proxy directory to authproxy

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-02 12:44:51 +01:00
Tomo Wang
d33c4e5e7c
Alarting: fix alarm messages in dingding (Fixes #29470) (#29482) 2020-12-02 11:09:49 +01:00
Sebastian Poxhofer
63c8945db5
AzureMonitor: Unit MilliSeconds naming (#29399) 2020-12-02 10:09:33 +01:00
Hugo Häggmark
1581d04e65
Chore: Adds Panel Library featuretoggle (#29521) 2020-12-02 08:47:04 +01:00
Ryan McKinley
e0dee06252
Live: publish all dashboard changes to a single channel (#29474) 2020-12-01 07:56:56 -08:00
Carl Bergquist
b7aa6fed1d
Instrumentation: Add examplars for request histograms (#29357)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-12-01 15:04:59 +01:00
Arve Knudsen
f55818ca70
Chore: Enable exhaustive linter (#29458)
* Chore: Enable exhaustive linter

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-01 09:53:27 +01:00
Arve Knudsen
3c229c6bee
Log: Use os.Open to open file for reading (#29483)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-01 09:28:18 +01:00
Todd Campbell
643f790753
Alerting: Add support for Sensu Go notification channel (#28012)
* Add support for Sensu Go notification channel

Similar to current support for the older "Core" version of
Sensu, this commit add support for the newer version.

Closes #19908

Signed-off-by: Todd Campbell <todd@sensu.io>

* fix linter errors

Signed-off-by: Todd Campbell <todd@sensu.io>

* Apply suggestions from code review

PR review suggestions

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix no new variables error

* Replace convey testing with testify

Signed-off-by: Todd Campbell <todd@sensu.io>

* Wording suggestions

Signed-off-by: Todd Campbell <todd@sensu.io>

* Add docker compose environment for testing/maintenance

Signed-off-by: Todd Campbell <todd@sensu.io>

* Renamed and fixed docker-compose.yaml to work in devenv

Signed-off-by: Todd Campbell <todd@sensu.io>

* Change sensugo web UI port to 3080 so as not to conflict with grafana

Signed-off-by: Todd Campbell <todd@sensu.io>

* Apply suggestions from code review

Set the API key as a secure value.

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>

* Add Sensu Go information to notifications doc

Signed-off-by: Todd Campbell <todd@sensu.io>

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

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>

* change assert to require for Error/NoError tests

Signed-off-by: Todd Campbell <todd@sensu.io>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-11-27 19:09:24 +02:00
Carl Bergquist
cffc1b13ad
adds tracing for all bus calls that passes ctx (#29434)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-11-27 14:58:45 +01:00
Arve Knudsen
107f658229
prometheus: Improve IsAPIError's documentation (#29432)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-27 12:05:49 +01:00
Tom Daly
ee3475d900
Elasticsearch: Fix index pattern not working with multiple base sections (#28348)
* Add logic to allow for multiple [] sections in pattern

* Small refactor

* Fix goimport error

* Refactor formateDate
2020-11-27 10:50:35 +01:00
Joan López de la Franca Beltran
c22a39ab2d
Plugins: Add support for includes' icon (#29416)
* Plugins: Add support for includes' icon

* Docs: Add plugin includes' icon reference
2020-11-27 10:48:37 +01:00
Will Browne
d10a8b2761
Alerting: Improve Prometheus Alert Rule error message (#29390)
* provide better ctx for prom err

* rework

* Update pkg/tsdb/prometheus/prometheus.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/prometheus/prometheus.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* call func

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-26 13:38:36 +01:00
Carl Bergquist
bec3fbea47
remove insecure cipher suit as default option (#29378)
G402 (CWE-295):  TLS Bad Cipher Suite  TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-11-26 12:22:50 +01:00
Carl Bergquist
aebe8985c5
prefer server cipher suites (#29379)
G402 (CWE-295):  TLS PreferServerCipherSuites set false.

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-11-25 14:56:34 +01:00
taciomcosta
10ff4eecef
Backend: fix IPv6 address parsing erroneous (#28585)
* Backend: Fix parsing of client IP address

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-25 07:55:22 +01:00
Agnès Toulet
22788d1d86
Add an option to hide certain users in the UI (#28942)
* Add an option to hide certain users in the UI

* revert changes for admin users routes

* fix sqlstore function name

* Improve slice management

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Hidden users: convert slice to map

* filter with user logins instead of IDs

* put HiddenUsers in Cfg struct

* hide hidden users from dashboards/folders permissions list

* Update conf/defaults.ini

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* fix params order

* fix tests

* fix dashboard/folder update with hidden user

* add team tests

* add dashboard and folder permissions tests

* fixes after merge

* fix tests

* API: add test for org users endpoints

* update hidden users management for dashboard / folder permissions

* improve dashboard / folder permissions tests

* fixes after merge

* Guardian: add hidden acl tests

* API: add team members tests

* fix team sql syntax for postgres

* api tests update

* fix linter error

* fix tests errors after merge

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2020-11-24 12:10:32 +01:00
Arve Knudsen
4c47fc56bb
Guardian: Rewrite tests from goconvey (#29292)
* Guardian: Rewrite tests from goconvey

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

* Update pkg/services/guardian/guardian_test.go

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2020-11-24 11:36:00 +01:00
Will Browne
d796c61946
Security: Fixes minor security issue with alert notification webhooks that allowed GET & DELETE requests #29330 2020-11-24 10:42:54 +01:00
Torkel Ödegaard
763e958d9d
Login: Fixes redirect url encoding issues of # %23 being unencoded after login (#29299) 2020-11-24 07:27:08 +01:00
Ryan McKinley
cfaca42e97
InfluxDB: update flux library and support boolean label values (#29310) 2020-11-23 13:19:52 -08:00
Arve Knudsen
063f863abc
WebhookNotifier: Convert tests away from goconvey (#29291)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-23 10:37:53 +01:00
Torkel Ödegaard
1076f47509
Dashboard: Fixes kiosk state after being redirected to login page and back (#29273)
* Login: Fixes issue where url parameters where modified by golang url code

* Add tests

* Fix test cases

* Update pkg/middleware/auth_test.go

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>

* fixed formatting

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-11-20 19:30:37 +01:00
Carl Bergquist
702cb90846
make it possible to hide change password link in profile menu (#29246)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2020-11-20 17:01:10 +01:00
Arve Knudsen
9593d57914
Chore: Enable errorlint linter (#29227)
* Enable errorlint linter
* Handle wrapped errors

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-19 14:47:17 +01:00
Arve Knudsen
294770f411
Chore: Handle wrapped errors (#29223)
* Chore: Handle wrapped errors

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

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-19 13:34:28 +01:00
Kyle Brandt
0cb29d337a
Expressions: Move GEL into core as expressions (#29072)
* comes from grafana/gel-app
* remove transform plugin code
* move __expr__ and -100 constants to expr pkg
* set OrgID on request plugin context
* use gtime for resample duration
* in resample, rename "rule" to "window", use gtime for duration, parse duration before exec
* remove gel entry from plugins-bundled/external.json
which creates an empty array for plugins
2020-11-19 07:17:00 -05:00
Arve Knudsen
006868339d
Backend: Fix build (#29206)
* Backend: Fix build

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-18 16:16:58 +01:00
Will Browne
2939caf9a2
Permissions: Validate against Team/User permission role update (#29101)
* validate against role field update

* lowercase error string

* make all msgs consistent style

* fix wording

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* sayonara simple json

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-18 15:36:41 +01:00
Carl Bergquist
15a6508d4a
trace user login and datasource name instead of id (#29183)
id's are not very helpful when debugging a system.

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-11-18 09:21:45 +01:00
Arve Knudsen
8c9bb7a215
playlist: Improve test (#29120)
* playlist: Improve test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-18 09:16:49 +01:00
Karl Atkinson
65ed8a76a6
CloudWatch: added HTTP API Gateway specific metrics and dimensions (#28780) 2020-11-17 19:27:20 +01:00
Alexey Zhiltsov
2212c6dbbb
SQL: Define primary key for tables without it (#22255)
The annotation_tag and alert_rule_tag tables did not have
PRIMARY KEY defined what cause problems with migration to
MariaDB with Galera setup with
 innodb_force_primary_key=1
Or MySQL > 8.0.13 with
 sql_require_primary_key=ON

Which can manifest as follows:

MariaDB
Error 1173: This table type requires a primary key

MySQL
ERROR 3750 (HY000): Unable to create or change a table
without a primary key, when the system variable 'sql_require_primary_key' is set.

Extra reading for curious:
https://jfg-mysql.blogspot.com/2017/08/danger-no-pk-with-RBR-and-mariadb-protection.html

Fixes #12971

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-11-17 17:58:56 +01:00
Arve Knudsen
52c154a221
Backend: Rename variables for style conformance (#29097)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 17:09:14 +01:00
Arve Knudsen
4dd7b7a82d
Chore: Remove unused Go code (#28852)
* Chore: Remove more unused Go code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 11:51:31 +01:00
Arve Knudsen
8c765e8068
API: Rewrite tests from goconvey (#29091)
* API: Rewrite tests from goconvey

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

* Fix test

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

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 11:31:35 +01:00
Arve Knudsen
2bf964c61e
Chore: Fix linting issues caught by ruleguard (#28799)
* Chore: Fix linting issues caught by ruleguard

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

* Improve error check

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 11:27:45 +01:00
Victor Cinaglia
967e9b39e8
Fix panic when using complex dynamic URLs in app plugin routes (#27977)
* remove unused function to interpolate URLs

* share function to add headers between ds/plugin proxies

* stop performing unnecessary plugin setting lookup

* fix bug causing runtime errors when using complex templated URLs

* lower case util functions not used outside of pluginproxy package

* change test URL to a (valid) dummy URL to make intent clearer

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 10:56:42 +01:00
Andrew Mattheisen
4430ca2317
build paths in an os independent way (#29143)
Use filepath instead of path to manipulate filename paths in a way compatible with the target operating system-defined file paths.
2020-11-17 08:03:16 +01:00
Alexander Zobnin
4f9123ebe2
Provisioning: always pin app to the sidebar when enabled (#29084) 2020-11-17 09:45:40 +03:00
Emil Hessman
8c7e7e6d22
Chore: Rewrite preferences test from GoConvey to stdlib and testify (#29129) 2020-11-16 12:54:12 +01:00
Emil Hessman
bdc6e2fe0a
Chore: Require OrgId to be specified in delete playlist command (#29117) 2020-11-14 09:49:07 +01:00
Arve Knudsen
fbf0d2c086
Plugin proxy: Handle URL parsing errors (#29093)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-13 19:38:09 +01:00
Arve Knudsen
e503188b6f
Data source proxy: Convert 401 from data source to 400 (#28962)
* Data source proxy: Convert 401 from data source to 400

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-13 13:21:43 +01:00
Will Browne
eba046d3cb
Auth: Enable more complete credential chain for SigV4 default SDK auth option (#29065)
* Force more complete credential chain for default auth option

* simplify

* allow assume role for default
2020-11-13 10:27:35 +01:00
Arve Knudsen
cb62e69997
Chore: Convert API tests to standard Go lib (#29009)
* Chore: Convert tests to standard Go lib

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

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2020-11-13 09:52:38 +01:00
kay delaney
9659c98d61
Test Datasource/Bug: Fixes division by zero in csv metric values scenario (#29029)
Closes #8705
2020-11-12 16:20:08 +00:00
Arve Knudsen
8f9e5a839f
Plugins: Bring back coreplugin package (#29064)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-12 17:16:04 +01:00
Tom Daly
18f3969fdb
Add 'EventBusName' dimension to CloudWatch 'AWS/Events' namespace (#28402) 2020-11-12 16:48:35 +02:00
Marcus Efraimsson
ded4be0435
CloudWatch: Add support for AWS/ClientVPN metrics and dimensions (#29055)
Fixes #28778
2020-11-12 15:47:02 +01:00
Sofia Papagiannaki
43f580c299
AlertingNG: manage and evaluate alert definitions via the API (#28377)
* Alerting NG: prototype v2 (WIP)

* Separate eval package

* Modify eval alert definition endpoint

* Disable migration if ngalert is not enabled

* Remove premature test

* Fix lint issues

* Delete obsolete struct

* Apply suggestions from code review

* Update pkg/services/ngalert/ngalert.go

Co-authored-by: Kyle Brandt <kyle@grafana.com>

* Add API endpoint for listing alert definitions

* Introduce index for alert_definition table

* make ds object for expression to avoid panic

* wrap error

* Update pkg/services/ngalert/eval/eval.go

* Swith to backend.DataQuery

* Export TransformWrapper callback

* Fix lint issues

* Update pkg/services/ngalert/ngalert.go

Co-authored-by: Kyle Brandt <kyle@grafana.com>

* Validate alert definitions before storing them

* Introduce AlertQuery

* Add test

* Add QueryType in AlertQuery

* Accept only float64 (seconds) durations

* Apply suggestions from code review

* Get rid of bus

* Do not export symbols

* Fix failing test

* Fix failure due to service initialization order

Introduce MediumHigh service priority and assign it to backendplugin
service

* Fix test

* Apply suggestions from code review

* Fix renamed reference

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2020-11-12 15:11:30 +02:00
Arve Knudsen
a1e80af800
Fix linting issues (#28811)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-12 13:25:14 +01:00
Domas
76df096791
Logging: Log frontend errors (#28073)
* basic frontend  Sentry integration

* backend endpoint to capture sentry events

* WIP!

* log user email for frontend logs

* remove debug logging

* lint fixes

* Fix type exports & property names

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* additional struct naming fix

* rename log endpoint, config section & interface

* add sentry sample rate to config

* refac to use EchoSrv

* log user id

* backend tests

* tests for SentryEchoBackend

* sentry echo backend tests

* CustomEndpointTransport tests

* Update pkg/api/frontend_logging_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update conf/defaults.ini

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/api/frontend_logging_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* don't export unnecesasrily

* update go.sum

* get rid of Convey in tests, use stdlib

* add sentry config to sample.ini

* cleanup to set orig logging handler in test

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* PR feedback changes

* lock sentry version

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-12 12:29:43 +01:00
Emil Hessman
3519330166
Chore: Rewrite test helpers from GoConvey to stdlib (#28919) 2020-11-11 21:33:32 +01:00
Chris Cowan
4ed7612e57
Elasticsearch: Add Moving Function Pipeline Aggregation (#28131)
* Elasticsearch: Add Moving Function Pipeline Aggregation

* Removing support for moving average in 7.x

* Fixing getMetricAggTypes to handle undefined esVersion

* Adding moving_fn to go code

* Update public/app/plugins/datasource/elasticsearch/metric_agg.ts

Co-authored-by: Giordano Ricci <grdnricci@gmail.com>

* Adding test for esversion 70

* Removing default value for script, adding placeholder instead

* Fixing formatting

* Adding code for handling missing or obsolete aggregations

Co-authored-by: Giordano Ricci <grdnricci@gmail.com>
2020-11-11 17:42:28 +00:00
Arve Knudsen
ab078133bf
Backend: Remove unused code (#28933)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 11:38:04 +01:00
Carl Bergquist
e3c7d66324
Tracing: Add setting for sampling server (#29011)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-11 10:21:52 +01:00
Arve Knudsen
b5379c5335
Chore: Fix SQL related Go variable naming (#28887)
* Chore: Fix variable naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 06:21:08 +01:00
kay delaney
b2dcf06b60
Backend: Adds route for well-known change password URL (#28788)
* Backend: Adds route for well-known change password URL

* Include 'dashboard/new' in backend routes

* Move index route handler registration out of "not logged in views" section

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-10 22:36:35 +00:00
Carl Bergquist
db637a3630
Tracing: log traceID in request logger (#28952)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-11-10 05:45:39 +01:00
Carl Bergquist
afb06ec21a
start tracking usage stats for tempo (#28948)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-11-09 22:12:23 +01:00
Will Browne
a7ea8de47e
Short URL: Cleanup unvisited/stale short URLs (#28867)
* cleanup stale short urls

* refactor test case names

* service injection

* fix query

* add docs

* remove comma
2020-11-09 18:08:16 +01:00
Arve Knudsen
ef2de2d357
setting: Fix tests on Mac (#28886)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-09 14:39:56 +01:00
Leonard Gram
8fb06da34e
Plugins: allow override when allowing unsigned plugins (#28901)
* Plugins: allow override when allowing unsigned plugins

* Update pkg/plugins/plugins.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Plugins: removed java-style setter

* Plugins: cleanup

* Update pkg/plugins/plugins.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2020-11-09 09:50:23 +01:00
Emil Hessman
a717e856c5
Chore: Rewrite test in GoConvey to stdlib and testify (#28918) 2020-11-09 08:13:06 +01:00
Agnès Toulet
2c246276fd
API: replace SendLoginLogCommand with LoginHook (#28777)
* API: replace SendLoginLogCommand with LoginHook

* LoginInfo: Query -> LoginUsername
2020-11-06 10:01:13 +01:00
Agnès Toulet
f0421ed08e
Dashboards / Folders: delete related data (permissions, stars, tags, versions, annotations) when deleting a dashboard or a folder (#28826)
* Dashboard: delete related data when deleting a dashboard or a folder

* fix migrations order

* apply PR feedback
2020-11-06 09:02:31 +01:00
Ryan McKinley
b91e9faccf
Live: update centrifuge and the ChannelHandler api (#28843) 2020-11-05 10:37:04 -08:00
Arve Knudsen
676d393ec9
Chore: Fix issues reported by staticcheck; enable stylecheck linter (#28866)
* Chore: Fix issues reported by staticcheck

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

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-05 15:37:11 +01:00
Arve Knudsen
3d3a7cbba8
Chore: Fix staticcheck issues (#28860)
* Chore: Fix issues reported by staticcheck

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

* Undo changes

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

* Chore: Fix issues reported by staticcheck

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

* Fix test

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

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 13:07:06 +01:00
Arve Knudsen
7897c6b7d5
Chore: Fix staticcheck issues (#28854)
* Chore: Fix issues reported by staticcheck

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

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 11:57:20 +01:00
Alex Khomenko
9b90ff2961
Disable selecting enterprise plugins with no license (#28758)
* Add unlicensed property to plugins

* Disable selecting unlicensed plugin

* Add customizable plugin market place url

* License: workaround enabled only in enterprise

* linter

* Move licensing info to front end

* Update pkg/services/licensing/oss.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/licensing/oss.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/setting/setting.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/setting/setting.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/api/frontendsettings.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update sample.ini

* Update docs

* Update packages/grafana-runtime/src/config.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Update public/app/features/datasources/state/buildCategories.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Update pkg/api/frontendsettings.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/setting/setting.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix spelling

Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2020-11-05 12:55:40 +02:00
Arve Knudsen
574553ec7b
Chore: Fix issues found by staticcheck (#28802)
* Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 11:29:39 +01:00
Arve Knudsen
dff84f6a31
Chore: Remove dead code (#28664)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 11:00:00 +01:00
Will Browne
65554269ed
increase blob column size for encrypted dashboard data (#28831) 2020-11-04 18:41:05 +01:00
Ryan McKinley
b7a8416e02
Live: improve broadcast semantics and avoid double posting (#28765) 2020-11-03 09:11:23 -08:00
Torkel Ödegaard
fa567de9b8
Cloudwatch: Fix issue with field calculation transform not working properly with Cloudwatch data (#28761)
* Cloudwatch: Fix issue with reducer transform not working properly with Cloudwatch data

* Updated go sdk and updated code

* CloudWatch: Improve test

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-03 11:24:26 +01:00
Arve Knudsen
494c20db5f
gtime: Add ParseDuration function (#28525)
* gtime: Make calculations independent of current time

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

* Introduce gtime.ParseDuration function

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

* gtime: Fix ParseDuration

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-02 19:26:19 +01:00
Torkel Ödegaard
5fcff1a4c7
Provisioning: Fixed problem with getting started panel being added to custom home dashboard (#28750)
* Provisioning: Fixed problem with getting started panel being added to custom home dashboard

* Fixed comment

* Update pkg/api/dashboard.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-02 16:12:22 +01:00
Emil Hessman
f0b169bea6
Chore: Convert sqlstore annotation test from GoConvey to testify (#28715)
* Chore: Convert sqlstore annotation test from GoConvey to testify

* Use require.NoError

* Use assert.Empty

* Use assert.NoError in test cleanup
2020-10-31 19:37:51 +01:00
Will Browne
b9d71f5cdd
Plugins: Fix descendent frontend plugin signature validation (#28638)
* move plugin root check to earlier in validation process

* remove comment

* only check root if necessary
2020-10-29 15:03:37 +01:00
Arve Knudsen
00508295d1
CloudWatch: Improve method name, performance optimization (#28632)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-29 08:27:24 +01:00
kay delaney
c4c5b2dc61
CloudWatch Logs queue and websocket support (#28176)
CloudWatch Logs queue and websocket support
2020-10-28 08:36:57 +00:00