Will Browne
9f2386a219
Alerting: Store sensitive settings encrypted for OpsGenie notifier ( #27074 )
...
* encrypt OpsGenie API key
* make whitespace consistent
* update docs
2020-08-20 16:05:48 +02:00
Kyle Brandt
96babf1268
Alerting: copy queryType prop to tsdb.Query ( #27053 )
...
fixes #27048
2020-08-19 10:03:39 -04:00
Arve Knudsen
a2fbffe48a
Server: Add health check route ( #26999 )
...
* Server: Add health check route
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Server: Remove health check middleware
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-18 14:58:08 +02:00
Kirchen99
5da3276db1
Dashboard: Use same min refresh interval fallback in the API as in provisioning ( #25926 )
...
* Dashboard: Solve the discrepancy between provisioning and the API, Handle min refresh interval when creating/updating dashboard via API
* Docs: Add refresh field in the example dashboard http api docs
* Update create dashboard API docs
Add refresh field in the create dashboard example response
* Fix create dashboard API docs
* Fix create dashboard API docs
* Update docs/sources/http_api/dashboard.md
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-08-17 12:00:10 -07:00
Joan López de la Franca Beltran
ef631582ba
Users: Improve conflict error handling ( #26958 )
...
* API: Improve error handling (#26934 )
* New ErrUserAlreadyExists error has been introduced
* Create user endpoint returns 412 Precondition Failed on ErrUserAlreadyExists errors
* Make ErrUserAlreadyExists error message clearer
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Use errors.Is instead of equality comparator on AdminCreateUser handler
* Improve sqlstore/user test definition
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Improve sqlstore/user tests for ErrUserAlreadyExists cases
* Remove no needed string fmt and err declaration on sqlstore/user tests
* Code improvements for sqlstore/user tests
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use err.Error() instead of sentinel error value on AdminCreateUser
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add ErrUserAlreadyExists handling for signup & org invite use cases
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-13 14:38:54 +02:00
Arve Knudsen
1698c74ec1
Chore: Fix tests for Go 1.15 ( #26957 )
...
* Chore: Fix tests for Go 1.15
2020-08-12 17:45:03 +02:00
Benjamin Blattberg
3403db190d
API: Support paging in the admin orgs list API ( #26932 )
...
* Add page/limit to org search
* Update docs
* Fix test per PR feedback
2020-08-12 10:59:07 +03:00
Maksim Nabokikh
b646a1d627
Provisioning: describe which folder caused an error while provisioning from files structure ( #26771 )
...
* Provisioning: describe which folder caused an error while provisioning from files structure
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
* Apply suggestions from code review
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove unused DashType constants
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-04 09:03:09 -07:00
Arve Knudsen
e344ff01ec
SQL: Fix missing org error messages ( #26785 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-04 17:06:37 +02:00
Leonard Gram
c266f45858
LDAP: users without org mappings are marked as disabled ( #26650 )
...
* LDAP: users without org mappings are marked as disabled
* Update pkg/services/ldap/ldap.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* LDAP: verifies that unmapped users are tagged as isDisabled
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-31 14:41:31 +02:00
Arve Knudsen
35c67606ce
Chore: Use errors.Is for comparing errors ( #26719 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-31 10:16:49 +02:00
Arve Knudsen
16c185c3b9
Chore: Drop xerrors dependency ( #26718 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-31 09:45:20 +02:00
Arve Knudsen
5a6afd9096
OAuth: Add some debug logs ( #26716 )
...
* OAuth: Add some debug logs
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-31 09:41:13 +02:00
Maksim Nabokikh
ba2524cd88
Provisioning: Add validation for missing organisations in datasource, dashboard, and notifier configurations ( #26601 )
...
* Provisioning: Check that org. from config exists
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix some code after applying suggestions
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
* Add negative test case
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-30 12:59:12 +03:00
Ryan McKinley
339138d61a
Live: include a streaming event manager ( #26537 )
2020-07-27 00:26:16 -07:00
Arve Knudsen
94d0934e90
CloudWatch: Fix a few API status codes ( #26578 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-24 12:34:56 +02:00
Sofia Papagiannaki
ad4f8b7091
Alerting: Change settings column type to mediumtext ( #26549 )
...
* Alerting: Change settings column type to mediumtext
* Remove unnecessary newline
2020-07-24 08:40:06 +03:00
Arve Knudsen
102448040d
SQLite: Set 0640 permissions on SQLite database file ( #26339 )
...
* SQLite: Set 640 permissions on SQLite database file
2020-07-23 15:47:26 +02:00
Arve Knudsen
415638cdda
Chore: Use interfaces where possible ( #26392 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-23 08:17:20 +02:00
Arve Knudsen
4c56eb3991
Chore: Enable goprintffuncname and nakedret linters ( #26376 )
...
* Chore: Enable goprintffuncname linter
* Chore: Enable nakedret linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-23 08:14:39 +02:00
gastonqiu
f427f90a45
Chore: Aggregate save dashboard error ( #26443 )
...
* Chore: Aggregate save dashboard error
* Use errors package for error detection
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-07-21 11:12:01 +02:00
Maksim Nabokikh
a1f40195be
Provisioning: Validate that datasource access field equals to direct or proxy ( #26440 )
...
* Validate that datasource access field equals to allowed value (direct or proxy)
2020-07-20 10:01:25 +02:00
Mitsuhiro Tanda
528a61b86b
Alerting: Store sensitive settings encrypted for alertmanager notifier ( #26318 )
...
Ref #25967
2020-07-17 13:56:06 +02:00
Marcus Efraimsson
7969d6645a
Provisioning: Support alert notification channel secure settings ( #26168 )
...
Closes #25968
2020-07-17 13:54:01 +02:00
Arve Knudsen
d4e4cb4c71
Chore: Enable Go linter gocritic ( #26224 )
...
* Chore: Enable gocritic linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-16 14:39:01 +02:00
Mitsuhiro Tanda
92767f00e0
Alerting: Store sensitive settings encrypted for pagerduty notifier ( #26319 )
...
Store pagerduty integration key in secure setting.
Ref #25967
2020-07-16 10:53:35 +02:00
Marcus Efraimsson
b97d1f4170
Provisioning: Fix bug when provision app plugins using Enterprise edition ( #26340 )
...
In OSS provisioning service init after plugin registration, but in
Enterprise it's the opposite order and installed app plugin check
fails. This adjusts service registry init priority to make sure plugins
are registered before provisioning inits.
Which issue(s) this PR fixes:
Fixes #26336
2020-07-16 10:36:08 +02:00
Arve Knudsen
d28d495235
Chore: Enable PR testing in Drone ( #26189 )
...
* Add Drone configuration
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build front-end before testing it
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade grafana/build-container
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add packaging step
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Trigger on push
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove some steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Enable steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Install Dockerize
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use node image for test-frontend
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Increase number of test workers
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Make plugin installation depend on frontend tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Make integration tests depend on frontend tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use grafana/build-container also for front-end tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade dependencies in order to fix front-end tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Depend on es-check
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Dont' depend on tests before building front-end
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix packaging
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Simplify
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Try to build images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Install netcat
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Include golangci-lint with grafana/build-container
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build storybook and docs website
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use build image with root user
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drop CircleCI dependencies
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e under Drone
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Execute e2e server separately
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use own plugin for building Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use Starlark to configure Drone
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add enterprise steps to pipeline
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more enterprise steps to pipeline
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Maintain Yarn cache
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build enterprise Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build Ubuntu Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Refactor
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add Postgres integration test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add MySQL integration test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Parameterize integration test DB connections
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Categorize integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use grabpl integration-tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove unintended change
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Disable Ubuntu Docker images for PR pipeline
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Regenerate yarn.lock
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade grabpl
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Restore Yarn cache before installing in grafana-enterprise
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use separate pipelines for OSS and enterprise
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Let OSS builds depend on tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Restore Go cache before building back-end
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Reduce number of variants built for PRs
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix building of Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Simplify logic
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Use Starlark
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Fix syntax error
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Convert .drone.star to YAML
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade AWS Go SDK
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Fix Go linting
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo irrelevant changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Revert "Undo irrelevant changes"
This reverts commit 5152f65972
.
* Undo irrelevant changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* e2e: Support Circle
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove unused script
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* TypeScript fixes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* TypeScript fixes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove unused script
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* More Drone support
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove unused script
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix build on Circle
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove TODO comment
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-10 16:09:21 +02:00
Marcus Efraimsson
c91e5adfcc
Alerting: Don't encrypt username for webhook notifier ( #26170 )
...
Can be hard for users to understand what user is configured
when encrypting the username field why this reverts to
store the username in cleartext.
Also, we don't encrypt username for data sources.
Ref #25967
2020-07-08 19:13:59 +02:00
Marcus Efraimsson
3223d4b419
Alerting: Store sensitive settings encrypted for webhook notifier ( #26164 )
...
Store sensitive settings (username and password) encrypted for webhook notifier.
Ref #25967
2020-07-08 17:46:34 +02:00
Mitsuhiro Tanda
292c985b76
Alerting: Support storing sensitive notifier settings securely/encrypted ( #25114 )
...
Support storing sensitive notification settings securely/encrypted.
Move slack notifier url and api token to secure settings.
Migrating slack notifier to store token and url encrypted is currently
a manual process by saving an existing slack alert notification channel.
saving an existing slack alert notification channel will reset the stored
non-secure url and token.
Closes #25113
Ref #25967
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-07-08 10:17:05 +02:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter ( #25903 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
annegies
a2737c0896
Remove break from ldap, get all groups from all the group base searches specified ( #25825 )
...
Signed-off-by: Annegies van 't Zand <ace.vtzand@gmail.com>
2020-07-06 12:02:39 +02:00
Carl Bergquist
26852ca788
Instrument dashboard versions and annotation count ( #26044 )
2020-07-03 15:47:46 +02:00
Dan Cech
b5ca2381bc
provide license token directly via plugin environment ( #25987 )
...
* provide license token directly via plugin environment
2020-07-01 13:02:53 -04:00
Carl Bergquist
db8d7ffbf6
Linting fixes for the provisioning package ( #25690 )
2020-06-30 22:46:41 +02:00
Maksim Nabokikh
810ec4c5f8
Provisioning: Use folders structure from the file system to create desired folders in dashboard provisioning. ( #23117 )
...
Fixes #12016
2020-06-30 15:33:26 +02:00
Arve Knudsen
3651a8e976
Chore: Disable scopelint for tests ( #25923 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-30 11:05:47 +02:00
Arve Knudsen
d1e6214a4a
Chore: Enable scopelint Go linter ( #25896 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 17:04:38 +02:00
Arve Knudsen
5070f7a75b
Chore: Start harmonizing linting with plugin SDK ( #25854 )
...
* Chore: Harmonize linting with plugin SDK
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 14:08:32 +02:00
Peter Holmberg
6465b2f0a3
Migration: Migrate New notification channel page ( #25265 )
...
* creating page
* add types select
* adding switches
* start with converting angular templates to json
* converting more alert channels to new format
* convert remaining channels
* typing the form
* add validation, update models
* fix default value in type select
* fix type
* fix issue with validation rule
* add missing settings
* fix type errors
* test notification
* add comments to structs
* fix selectable value and minor things on each channel
* More typings
* fix strictnull
* rename ModelValue -> PropertyName
* rename show -> showWhen
* add enums and adding comments
* fix comment
* break out channel options to component
* use try catch
* adding default case to OptionElement if element not supported
2020-06-29 13:39:12 +02:00
Mitsuhiro Tanda
9f82cd4713
Slack: Support use of chat.postMessage ( #25818 )
...
* set bearer token if token is provided
* update slack notification document
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-26 20:47:06 +02:00
Emil Tullstedt
5d7cd2e9fc
Teams: Add index for permission check ( #25736 )
...
* Teams: Add indices for permission check
* Teams: Remove user_id index
2020-06-26 15:13:53 +02:00
Arve Knudsen
084542a006
Chore: Consolidate on golangci-lint ( #25834 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-26 08:46:08 +02:00
Emil Tullstedt
112c28033d
Provisioning: Apply settings expanders ( #25692 )
...
* Provisioning: Apply settings expanders
Adds support for the variable expanders introduced to the configuration file in #25075 to provisioning.
* Update pkg/services/provisioning/values/values_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/provisioning/values/values.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Provisioning: Handle errors when expanding JSON maps
2020-06-25 12:04:42 +02:00
Agnès Toulet
b5b019dfcf
Notifications: fix reply-to option for emails ( #25748 )
2020-06-22 18:56:49 +02:00
Marcus Efraimsson
cc95754e0d
Provisioning: Adds support for enabling app plugins ( #25649 )
...
Adds support for enabling app plugins using provisioning.
Ref #11409
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-06-22 17:49:13 +02:00
Emil Tullstedt
e8b5f2330d
Settings: Expand variables in configuration ( #25075 )
2020-06-10 14:58:42 +02:00
Marcus Efraimsson
53175a41c9
Make tsdb dataframes response able to carry encoded/decoded frames ( #25454 )
...
Make tsdb dataframes response able to carry encoded and/or decoded frames
2020-06-09 13:13:06 +02:00
Alexander Zobnin
c4eca530ce
Fix active LDAP sync ( #25321 )
...
* LDAP: sync only users with 'ldap' module as a most recent auth module
* LDAP: tests for searching ldap users
2020-06-03 16:28:13 +03:00