Commit Graph

5603 Commits

Author SHA1 Message Date
Joan López de la Franca Beltran
68efedfa88
App Plugins: Add backend support (#28272)
* Add backend support for app plugins

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-21 09:10:54 +02:00
jgulick48
5bc6c447e3
Alerting: Return proper status code when trying to create alert notification channel with duplicate name or uid (#28043)
* Alerting: Return proper status code when trying to create an Alert Notification where the name or UID already exists.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-20 13:53:48 +02:00
Alexander Zobnin
d13c6b4c5a
OAuth: Able to skip auto login (#28357)
* OAuth: able to skip auto login

* OAuth: tests for internal login param

* OAuth: rename internal -> disableAutoLogin

* OAuth: update log message

* OAuth: fix tests
2020-10-20 14:51:06 +03:00
Arve Knudsen
af17f9fd9b
CloudWatch: Fix custom metrics (#28391)
* CloudWatch: Fix querying for custom metrics

Co-authored by Mitch McKenzie <mitch.mckenzie@outlook.com>

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-20 13:33:38 +02:00
Carl Bergquist
edbaa9d681
Instrumentation: Add histogram for request duration (#28364)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-10-20 09:44:38 +02:00
Carl Bergquist
b036112444
remove status label from histogram (#28387)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-10-20 09:25:22 +02:00
Alexander Zobnin
8032b43838
OAuth: configurable user name attribute (#28286)
* OAuth: more user-frienly logging

* OAuth: custom user name attribute

* OAuth: remove deprecated nameAttributeName option

* OAuth: nameAttributePath tests

* OAuth: add name_attribute_path config option

* OAuth: docs for name_attribute_path option

* move docs to the separate branch
2020-10-20 09:56:48 +03:00
Carl Bergquist
74d1d3c6a8
Instrumentation: Add counters and histograms for database queries (#28236)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-19 20:06:12 +02:00
Marcus Efraimsson
0e17a15fbd
CloudWatch: Adding support for additional Amazon CloudFront metrics (#28378)
Follow up to #28069 where some metrics was missed.

Ref #28069
2020-10-19 18:14:27 +02:00
Arve Knudsen
89d10c706a
Plugins: Compose filesystem paths with filepath.Join (#28375)
* plugins: Fix filesystem path composition

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

* plugins: Use filepath.Join to join filesystem paths

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-19 17:35:31 +02:00
Carl Bergquist
89ebb97fca
Instrumentation: Adds environment_info metric (#28355)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-19 16:58:16 +02:00
Kyle Brandt
44a795cb17
AlertingNG: remove warn/crit from eval prototype (#28334)
and misc cleanup
2020-10-16 12:33:57 -04:00
Sofia Papagiannaki
4937f0daab
SQLStore: Run tests as integration tests (#28265)
* sqlstore: Run tests as integration tests

* Truncate database instead of re-creating it on each test

* Fix test description

See https://github.com/grafana/grafana/pull/12129

* Fix lint issues

* Fix postgres dialect after review suggestion

* Rename and document functions after review suggestion

* Add periods

* Fix auto-increment value for mysql dialect

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-10-16 10:46:14 +03:00
Arve Knudsen
a2c7c5b912
API: Fix short URLs (#28300)
* API: Fix short URLs

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-16 09:22:24 +02:00
The Rock Guy
c9cc82ea55
CloudWatch: Add EC2CapacityReservations Namespace (#28309) 2020-10-16 09:08:50 +02:00
Pete Davids
65940c7726
Dashboard: Allow shortlink generation (#27409)
* intial frontend resolution/redirection logic

* backend scaffolding

* enough of the frontend to actually test end to end

* bugfixes

* add tests

* cleanup

* explore too hard for now

* fix build

* Docs: add docs

* FE test

* redirect directly from backend

* validate incoming uids

* add last_seen_at

* format documentation

* more documentation feedback

* very shaky migration of get route to middleware

* persist unix timestamps

* add id, orgId to table

* fixes for orgId scoping

* whoops forgot the middleware

* only redirect to absolute URLs under the AppUrl domain

* move lookup route to /goto/:uid, stop manually setting 404 response code

* renaming things according to PR feedback

* tricky deletion

* sneaky readd

* fix test

* more BE renaming

* FE updates -- no more @ts-ignore hacking :) and accounting for subpath

* Simplify code

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

* Short URLs: Drop usage of bus

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

* ShortURLService: Make injectable

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

* Rename file

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

* Add handling of url parsing and creating of full shortURL to backend

* Update test, remove unused imports

* Update pkg/api/short_urls.go

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

* Add correct import

* Pass context to short url service

* Remove not needed error log

* Rename dto and field to denote URL rather than path

* Update api docs based on feedback/suggestion

* Rename files to singular

* Revert to send relative path to backend

* Fixes after review

* Return dto when creating short URL that includes the full url

Use full url to provide shorten URL to the user

* Fix after review

* Fix relative url path when creating new short url

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-10-14 12:48:48 +02:00
Karine Valença
e1e05cad7d
Database: Adds new indices to alert_notification_state and alert_rule_tag tables (#28166)
Add non-unique indices to alert_notification_state and alert_rule_tag tables for 
column alert_id.

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Fixes #22890
2020-10-13 13:51:54 +02:00
Will Browne
a189cd1832
Users: Expire old user invites (#27361)
* expire with existng cleanup service

* expire with new temp user service

* make Drone happy :)

* add expiry status

* remove other approach

* cleanup

* add test for idempotency

* add migration from datetime to unix ts

* update cmd names

* change lifetime config to duration

* remove unnecessart formatting

* add comment

* update docs

* remove max bound and introduce min error

* simplify sql

* remove comment

* allow any outstanding to exist for at least 24 hours

* revert created ts change

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* add extra state check to cleanup step

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-10-13 12:30:09 +02:00
Will Browne
ef22ff7315
Snapshots: Store dashboard data encrypted in the database (#28129)
* end 2 end

* fix import

* refactor

* introduce securedata

* check err

* use testify instead of convey

* cleanup test

* cleanup test

* blob time

* rename funcs
2020-10-13 10:19:42 +02:00
Sofia Papagiannaki
4ab90f9397
Fix linting: remove commented code (#28208) 2020-10-13 08:35:41 +02:00
Sofia Papagiannaki
4acbcd7053
AlertingNG: POC of evaluator under feature flag. (#27922)
* New feature toggle for enabling alerting NG

* Initial commit

* Modify evaluate alert API request

* Check for unique labels in alert execution result dataframes

* Remove print statement

* Additional minor fixes/comments

* Fix lint issues

* Add API endpoint for evaluating panel queries

* Push missing renaming

* add refId for condition to API

* add refId for condition to API

* switch dashboard based eval to get method

* add from/to params to dashboard based eval

* add from/to params to  eval endpoint

Co-authored-by: kyle <kyle@grafana.com>
2020-10-12 21:51:39 +03:00
Arve Knudsen
957c88eaca
CloudWatch: Re-implement authentication (#25548)
* CloudWatch: Revisit authentication

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

* CloudWatch: Simplify auth code

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

* Use ARN

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

* Add Drone configuration

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

* Remove unused code

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

* Remove .drone.yml

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

* Fix external ID usage

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

* CloudWatch: Fix issues after merge

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

* Remove stale code

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

* Remove stale code

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

* Use auth type enum

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

* Fix test snapshot

* Coordinate frontend and backend option names

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

* Remove old comments

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

* Fix front-end tests

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

* Introduce session cache

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

* Use constants

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

* Fix field alignment

* CloudWatch: Fix log message

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

* Tidy go.mod

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

* CloudWatch: Handle arn auth type

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

* CloudWatch: Fix role assumption duration

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

* Fix test

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

* CloudWatch: Inline unnecessary constants

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

* CloudWatch: Use serial comma in UI

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

* CloudWatch: Inline unnecessary constants

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

* CloudWatch: Fail if missing region

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

* CloudWatch: Handle unconfigured region

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

* CloudWatch: Log when using cached session

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

* CloudWatch: Include region in cache key

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

* Add UI warnings for lecagy support

* Do not clear ARN fields whenging change authentication provider

* Graph NG: annotations display (#27972)

* Annotations support POC

* Fix markers memoization

* dev dashboard update

* Update public/app/plugins/panel/graph3/plugins/AnnotationsPlugin.tsx

* CloudWatch: Remove errors.BadRequest

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

* CloudWatch: Undo unintentional change

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

* Remove log line

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

* Fix cache key computation

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

* Add region to cache key

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

* Improve log messages

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

* CloudWatch: Add documentation

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

* Improve tooltip

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

* Improve docs

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

* Improve docs

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

* Improve docs

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

* Improve tooltip

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

* Add role assumption provisioning example

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

* Add upgrade notes

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

* Improve docs

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

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* backend: use latest sdk (#28147)

fixes #27713 via https://github.com/grafana/grafana-plugin-sdk-go/pull/227

* Docs: Update Permissions documentation (#28144)

* removed overview.md

* content updates

* Update datasource_permissions.md

* update content

* content updates

* Update organization_roles.md

* Update docs/sources/enterprise/saml.md

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

* Update dashboard_folder_permissions.md

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

* area/grafana/toolkit: ci-package needs to use synchronous writes (#28148)

* ci needs to use synchronous writes or the file ends up with zero length

* <Enterprise Docs> Add instructions to upload license via UI (#28067)

* Add UI license upload option, reformat Enterprise license activation section

Added the option to upload a license file through the Server Admin UI, and did a little reformatting to make license activation look more like a process.

* Headers not bold, hyphens not asterisks

* Github: run metrics collector workflow every 10min (#28153)

* GithubActions: Updated cron schedule

* Updated

* Docs: Update explore docs: remove dot at the end of line (#28151)

HI - Removed Dot(.) at the end of line to make it consistent with other 2 points.

Thanks,
Ashish

* Fix frontend tests

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

* Fix frontend tests

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

* Docs: Update upgrade notes

Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Brian Gann <briangann@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: ashishagarwal06 <34888589+ashishagarwal06@users.noreply.github.com>
2020-10-12 17:58:58 +02:00
Marcus Efraimsson
519ec93c7d
Datasource: Prefix SigV4 json data keys with sigV4 (#28195)
Prefixes SigV4 json data and secure json data keys with sigV4 to make 
sure they don't collide with any other settings. Also minor fixes to UI.

Ref #27552
2020-10-12 17:52:17 +02:00
Kyle Hinton
92c2a6c239
Fix: Add additional settings for dataproxy to help with network proxy timeouts (#27841)
* adding additional settings for datasource cache transport

* added documentation for the new changes

* fixing small typo in defaults.ini comment

* fixing small typo in configuration.md comment

* Update conf/defaults.ini keepalive comment per review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update conf/defaults.ini idle conn comment per review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update conf/defaults.ini anon user comment per review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/administration/configuration.md idle conn comment per review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* adding suggestions from papagian

* fixing configuration.md

* fixing configuration.md typo

* Apply suggestions from code review aknuds1

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

* updating sample.ini

* Apply suggestions for docs from code review papagian

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

* Update docs/sources/administration/configuration.md fix typo

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

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-10-12 11:36:47 +03:00
Kyle Brandt
e16637793d
Alerting: Add labels to name when converting data frame to series (#28085)
* also move conversion func to alerting package since it is not used in other places

Fixes #28068
2020-10-09 08:21:16 -04:00
Kyle Brandt
c9a5d1ad4b
AzureMonitor: pass through null values instead of 0 (#28126)
fixes #28001
2020-10-09 08:15:19 -04:00
Ryan McKinley
2567e5202a
Live: remove admin pages, add alpha panel (#28101) 2020-10-08 08:42:15 -07:00
Alexander Zobnin
b55a51e270
SAML Single Logout (#27995)
* SAML: single logout WIP

* SAML: sign SAML requests

* SAML: remove unnecessary logs

* fix go mod file

* Docs: Single Logout

* SAML: use api endpoint for single logout

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* SAML: save context for single logout

* Chore: add SAML dependencies

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-10-08 17:42:55 +03:00
Will Browne
7d63b2c473
Auth: Add Sigv4 auth option to datasources (#27552)
* create transport chain

* add frontend

* remove log

* inline field updates

* allow ARN, Credentials + Keys auth in frontend

* configure credentials

* add tests and refactor

* update frontend json field names

* fix tests

* fix comment

* add app config flag

* refactor tests

* add return field for tests

* add flag for UI display

* update comment

* move logic

* fix config

* pass config through props

* update docs

* pr feedback and add docs coverage

* shorten settings filename

* fix imports

* revert docs changes

* remove log line

* wrap up next as round tripper

* only propagate required config

* remove unused import

* remove ARN option and replace with default chain

* make ARN role assume as supplemental

* update docs

* refactor flow

* sign body when necessary

* remove unnecessary wrapper

* remove newline

* Apply suggestions from code review

* PR fixes

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-08 10:03:20 +02:00
Darryl
21fc3e702b
Cloudwatch: Adding support for additional Amazon CloudFront. (#27891) (#28069)
* Cloudwatch: Adding support for additional Amazon CloudFront metrics.
2020-10-07 19:03:05 +02:00
garanews
61749dee23
Fix typos (#28074)
Parsed all repo with a regexp of common misspelled words and fixed.
2020-10-07 11:29:30 +01:00
jgulick48
9cd3ab0340
Cloudwatch: Adding support for Amazon ElastiCache Redis metrics. (#28040)
* Cloudwatch: Adding support for Amazon ElastiCache Redis metrics.
2020-10-06 19:52:02 +02:00
Spencer Taylor
3606e282ba
CloudWatch: Add missing TransitGateway dimension (#28061)
Adding missing TransitGatewayAttachment dimension to the AWS/TransitGateway namespace.
2020-10-06 19:22:03 +02:00
Arve Knudsen
0a2ef086b3
Chore: Convert CloudWatch metrics to data frames (#27449)
* CloudWatch: Convert metrics results to data frames

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

Co-authored-by: kay delaney <kay@grafana.com>
2020-10-06 13:45:58 +02:00
jgulick48
7c2999709c
Cloudwatch: Add support for AWS DirectConnect virtual interface metrics and add missing dimensions (#28008)
* Cloudwatch: Add support for AWS DirectConnect virtual interface metrics.

* Cloudwatch: Adding dimentions to the AWS/DX namespace for virtual network interface based DirectConnect.
2020-10-05 19:19:40 +03:00
Amos Law
3a498e80ff
Registry: Fix service shutdown mode trigger location (#28025) 2020-10-05 13:30:46 +02:00
Arve Knudsen
531c579341
Plugins: Let descendant plugins inherit their root's signature (#27970)
* plugins: Let descendant plugins inherit their root's signature

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-05 13:28:18 +02:00
Ryan McKinley
726bb4477b
Live: cleanup and simple changes (#28028) 2020-10-04 23:53:52 -07:00
Matheus Alcantara
7d7e727f22
Cloudwatch: Convert go convey tests to standard test library (#28003)
* Cloudwatch: Convert go convey tests to standard test library

* Fix tests

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-02 19:40:15 +02:00
Arve Knudsen
a078e40238
Settings: Rename constants/variables to follow Go naming standards (#28002)
* settings: Rename constants/variables to follow Go naming standards
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-02 15:45:45 +02:00
Matheus Alcantara
b4b3f6a088
Test: Create unit test to SplitEmails (#27985) 2020-10-02 08:42:10 +02:00
Carl Bergquist
a28a2fba51
healthchecks should work regardless domain (#27981) 2020-10-02 07:14:26 +02:00
Ryan McKinley
8a5fc00330
Live: broadcast events when dashboard is saved (#27583)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2020-10-01 10:46:14 -07:00
Marcus Efraimsson
747513d444
Plugins: Fix loading of backend plugins (#27951)
Ref #27921
2020-10-01 10:39:42 +02:00
Carl Bergquist
7b891d10ee
Instrumentation: Removes invalid chars from label names (#27921) 2020-09-30 20:12:57 +02:00
Joan López de la Franca Beltran
e03da3760e
Add index at user_auth_token.user_id column (#27908) 2020-09-30 01:20:29 +02:00
Will Browne
c764e3c37b
remove org deprecation logs (#27788) 2020-09-25 16:51:12 +02:00
Bill Oley
334cb41a99
Move error log in social.go inside err != nil (#27804) 2020-09-25 15:24:16 +02:00
Torkel Ödegaard
adc1b965f3
PanelData: Adds annotations and QueryResultMeta dataTopic (#27757)
* topics round two

* more props

* remove Data from enum

* PanelData: Simplify ideas a bit to only focus on the addition of annotations in panel data

* Test data scenario

* Old graph panel showing annotations from PanelData

* Fixed comment

* Fixed issues trying to remove use of event.source

* Added unit test

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-09-24 21:01:31 +02:00
Sofia Papagiannaki
42476811a4
Cloudwatch: Fix loading custom credentials profile (#27684)
* Store credentials profile in JSON

* Update docs example

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-24 19:21:17 +03:00
Harald Kubota
81bf9fc278
LINE Notify to have Alerts and OK notifications (#27639)
* Get Alerts AND OKs for LINE Notify

* Get Alerts AND OKs for LINE Notify

* Get Alerts AND OKs for LINE Notify
2020-09-24 15:45:53 +02:00
Ryan McKinley
93a01eb1d9
Live: improved channel state (#27672) 2020-09-23 08:02:01 -07:00
Giordano Ricci
4c7131425b
Revert "Elasticsearch: add frozen indices search support (#27472)" (#27726)
This reverts commit 61a3160c34.
2020-09-23 12:24:46 +01:00
Jorge Vallecillo
9e3def4214
Fix typos (#27711) 2020-09-22 11:00:59 -07:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues (#27704)
* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
Arve Knudsen
ffc11cb63c
Server: Don't clutter trace.Stop by exiting (#27700)
* Server: Don't clutter trace.Stop by exiting

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 15:28:54 +02:00
Giordano Ricci
61a3160c34
Elasticsearch: add frozen indices search support (#27472)
* Elasticsearch: Add frozen indices support for alerting
2020-09-18 18:27:25 +01:00
Domas
564d7ecea7
DataProxy: Ignore empty URL's in plugin routes (#27653)
This adds a check to see if plugin route URL is empty, and in such case 
does not modify request schema and host of the request to be proxied.
This behavior is now the same as in the plugin proxy.
2020-09-18 13:22:07 +02:00
Carl Bergquist
6dc73a6712
add /healthz endpoint (#27536)
kuberentes (and Im sure other orchastrators does as well) support two
kind of checks. readiness checks and liveness checks. Grafanas current
`/api/health` endpoint requires database access which might not
always be required for the instance to be considered active.
2020-09-18 13:03:18 +02:00
Alvaro Olmedo Rodriguez
20292bdb0e
Alerting: Ensuring notifications displayed correctly in mobile device with Google Chat (#27578)
* Added previewText to Google Chat notifier
2020-09-18 09:41:34 +03:00
Kyle Brandt
50c680f3d7
BackendPlugins: Point to request Headers in the wrapper (#27599)
In particular, so plugins can see the FromAlert header
2020-09-16 10:12:39 -04:00
Wouter Smeenk
39eba5065b
Dashboard: Support configuring default timezone via config file (#27404)
Add a default timezone that the administrator can set in the settings. 
This setting is be used as default for the users timezone preference.
Can be used when creating Grafana instances without administrator 
intervention, in order to give user the correct default timezone.

Fixes #25654
2020-09-15 15:20:53 +02:00
Dan Cech
53153c82fc
add method to get usage report (#27555) 2020-09-15 09:01:15 -04:00
Ryan McKinley
aa40320b45
Live: check logged-in-user for grafana live (#27436) 2020-09-15 00:01:14 -07:00
Hansuuuuuuuuuu
8d971ab2f2
Auth: Replace maximum inactive/lifetime settings of days to duration (#27150)
Allows login_maximum_inactive_lifetime_duration and 
login_maximum_lifetime_duration to be configured using 
time.Duration-compatible values while retaining backward compatibility.

Fixes #17554

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-09-14 15:57:38 +02:00
Sofia Papagiannaki
f529223455
Fix instrumentation panic if there is no response (#27567) 2020-09-14 14:05:47 +03:00
Agnès Toulet
eb970a4985
Org API: enrich add user to org endpoints with user ID in the response (#27551) 2020-09-14 08:58:23 +02:00
Agnès Toulet
0c4b7d3f5d
Alerting API: send 404 not found error and enrich delete with UID endpoint response with alert notification ID (#27550)
* Alerting API: Send back 404 not found error for update and delete endpoints

* Alerting API: send back alert notification id for delete with uid endpoint
2020-09-11 18:04:43 +02:00
Bill Oley
19caa100dc
OAuth: Fix token refresh failure when custom SSL settings are configured for OAuth provider (#27523)
OAuth token refresh fails when custom SSL settings are configured for 
oauth provider. These changes makes sure that custom SSL settings 
are applied for HTTP client before refreshing token.

Fixes #27514
2020-09-11 17:25:03 +02:00
Marcus Efraimsson
1983de962c
BootData: Fix nav tree sort regression (#27533)
#26395 introduced a regression regarding sort order of nav tree
items set in Grafana boot data and used for rendering the sidemenu.
This fixes so that sort happens after RunIndexDataHooks is called
in case the hook make changes to the nav tree.
2020-09-11 15:17:41 +02:00
Sofia Papagiannaki
924224eefb
Revert "Alerting: New feature toggle for enabling standalone alerts (#25984)" (#27531)
This reverts commit 20b603ee1a.
2020-09-11 13:57:46 +03:00
Maksim Nabokikh
6e3e0dead8
Provisioning: Remove provisioned dashboards without parental reader (#26143) 2020-09-11 09:19:44 +02:00
Marcus Efraimsson
e85b266f2e
Azure/Insights: Fix handling of none dimension values (#27513)
Properly handle legacy dimension values in the backend.

Fixes #27512
2020-09-10 18:21:56 +02:00
Marcus Efraimsson
91a8937e6c
Alerting: Fix integration key so it's stored encrypted for Pagerduty notifier (#27484)
Fixes an issue introduced by migration in #25980 which 
removed storing the Pagerduty integrating key encrypted.
2020-09-10 17:43:49 +02:00
Peter Holmberg
400aafa3b3
Migration: Edit notification channel (#25980)
* implement edit page

* connectWithCleanup

* remove angular related code

* use loadingindicator

* use the correct loading component

* handle secureFields

* fixed implementation of secure fields

* Keep secureFields after rerendering the form

* CollapsableSection and Page refactor

* use checkbox instead of switch

* fix comment

* add cursor to section

* Fixed issues after PR review

* Fix issue with some settings being undefined

* new reducer and start with test

* algorithm to migrate secure fields

* UX: Minor UI Tweaks

* Added field around checkboxes, and missing required field

* fixed test

* tests for util

* minor tweaks and changes

* define as records

* fix typ error

* forward invalid to textarea and inputcontrol

* merge formdata and redux data in test

* fix issue with creating channel

* do not figure out securefields in migration

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-09-09 12:46:19 +02:00
kay delaney
22d6cfc358
DataSource/CloudWatch: Adds metadata to grouped CW Logs dataframe (#27454) 2020-09-09 08:38:53 +01:00
Ryan McKinley
6b0f56b726
InfluxDB: Alerting issue, reasonable defaults for interval and maxDataPoints (#27463) 2020-09-09 09:34:17 +02:00
Carl Bergquist
f9752f0e7a
Instrumentation: Adds instrumentation for outgoing datasource requests (#27427) 2020-09-09 07:47:05 +02:00
Kyle Brandt
9bab551d8b
AzureMonitor: change filterDimensions property to match what is stored (#27459)
Changes the dimensionsFilters property to dimensionsFilter in the Azure Monitor Datasource's AzureMonitor service to make what is sent to match the saved model.

Before this, the property that the backend was expecting was not available in the case of alerting, where the stored model is fetched.

This also fixes a panic when there is a dimension alias but no dimension
2020-09-08 15:12:08 -04:00
Arve Knudsen
581d2eaaf4
Revert "Convert CloudWatch to use dataframes (#26702)" (#27448)
This reverts commit 7762839853.
2020-09-08 15:06:58 +02:00
Arve Knudsen
7762839853
Convert CloudWatch to use dataframes (#26702)
* CloudWatch: Convert metrics queries to return data frames

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-08 13:35:17 +02:00
Ato Araki
561920f18b
Cloud monitoring: fix missing title and text from cloud monitoring annotations (#27187)
* cloudmonitoring: fix empty title and text annotation

* cloudmonitoring: use metricQuery value
2020-09-08 13:18:41 +03:00
Torkel Ödegaard
5c31f07904
Settings: Remove unnessary error handling code (#27420)
* Settings: Remove unnecessary error handling code

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-08 11:33:04 +02:00
Emil Tullstedt
10141c5e6c
Stats: Use more efficient SQL and add timeouts (#27390) 2020-09-08 09:52:08 +02:00
robert lestak
d0e980c2fa
Alerting: Change Panel Edit link to Panel View link (#27378)
Enables alerts to be sent to users who do not have edit permissions.

Addresses Issue: https://github.com/grafana/grafana/issues/26014
2020-09-08 07:01:48 +02:00
Arve Knudsen
4b1eb6e5c7
Chore: Enable gocyclo linter (#26395)
* Chore: Enable gocyclo linter

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

* API: Fix linting issue

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

* API: Refactor to reduce complexity

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

* Fix type assertion

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-07 22:10:06 +02:00
Marcos Mendez
4e94c0959a
Image Store: Add support for using signed URLs when uploading images to GCS (#26840)
Enables creating signed URLs when uploading images to Google Cloud Storage. 
By using signed urls, not only is the public URL expiration configurable but the 
images in the bucket are not publicly accessible.

Fixes #26773

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-09-07 19:10:14 +02:00
Andrei Lavrov
8253b9ddb3
Alerting: override PagerDuty 'dedup_key' via tags (#27356)
* Alerting: override PagerDuty 'dedup_key' via tags

Added ability to override PagerDuty 'dedup_key' via Alert tags

Updated unit tests

* Updated documentation

* add comma

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* add space

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-09-07 18:42:06 +02:00
Kamal Galrani
f6c31c2e10
Fixes signup workflow and UI (#26263)
* fixes signup flow

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update ForgottenPassword.tsx

* fixes build failure

* fixes build failure

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2020-09-07 18:24:46 +03:00
Agnès Toulet
6dd109b927
API: return resource ID for auth key creation, folder permissions update and user invite complete endpoints (#27419)
* API: add ID to auth key and folder endpoints

* API: add test for folder permissions update

* API: add created user id for /invite/complete endpoint
2020-09-07 17:06:11 +02:00
Torkel Ödegaard
61bd33c241
System: Date formating options (#27216)
* Add support for local time formats in graph panel

* Enfore 24h format for backward compatibility

* Use existing Intl.DateTimeFormatOptions

* Pre-generate time scale, add tests

* Move localTimeFormat, add local format to units

* updated default fallback

* #25602, use navigator.languages to enforce locale in formatting

* Making options

* Worked new system settings

* things are working

* Local browser time formats working

* Support parsing dates in different formats

* settings updated

* Settings starting to work

* Fixed graph issue

* Logs fix

* refactored settings a bit

* Updated and name change

* Progress

* Changed config names

* Updated

* Updated

* Updated test

* Synced description

* fixed ts issue

* Added version notice

* Ts fix

* Updated heatmap and test

* Updated snapshot

* Updated

* fixed ts issue

* Fixes

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2020-09-07 16:19:33 +02:00
Bill Oley
b70fefe642
OAuth2: Handle DEFLATE compressed JWT payloads for generic OAuth (#26969) 2020-09-07 11:42:11 +02:00
Agnès Toulet
a9daaadd50
API: send Login actions (#27249)
* API: first version to send events about login actions

* API: improve login actions events

* Login: update auth test with new behavior

* Login: update auth test for auth module

* Login OAuth: improve functions structure

* API: make struct public to use for saml

* API: add send login log tests for grafana and ldap login

* API: remove log from tests

* Login API: fix test linting

* Update pkg/api/login_oauth.go

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

* Login API: refactor using defer

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-09-04 14:54:59 +02:00
Ryan McKinley
ae385983f4
InfluxDB: support flux editor for template queries (#27370) 2020-09-03 14:11:39 -07:00
Szymon Szypulski
a8db544e85
Cloudwatch: Update list of AmazonMQ metrics and dimensions (#27332)
Update list of AmazonMQ metrics and Dimensions based on the current list
from the official AWS documentation.

Also, change InflightCount to InFlightCount.
2020-09-02 21:32:43 +02:00
Carl Bergquist
20747015f6
Annotation: Add clean up job for old annotations (#26156)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-02 08:07:31 +02:00
Ryan McKinley
0bc67b032a
InfluxDB: return a table rather than an error when timeseries is missing time (#27320) 2020-09-01 15:06:38 -07:00
Carl Bergquist
8faaa1a520
OAuth: Increase state cookie max age (#27258)
60s can be too short if the oauth provider is slow
for some reason and its defintly too slow if the
OAuth provider requires 2FA.

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-09-01 10:57:43 +02:00
Kyle Brandt
06323b8e52
AzureMonitor: select plugin route from cloudname (#27273)
* AzureMonitor: select plugin route from cloudname
fixes #27243
2020-08-31 11:10:31 -04:00
Joan López de la Franca Beltran
57b2d08755
Core: Add go-grpc-middleware dependency (#27231) 2020-08-28 15:33:21 +02:00