Commit Graph

33520 Commits

Author SHA1 Message Date
Armand Grillet
a943bf9963
Improve prettier:check output (#44816) 2022-02-03 15:13:14 +01:00
Giordano Ricci
6415b9a54d
Explore: avoid locking timepicker when range is inverted (#44790)
* Explore: avoid locking timepicker when range is inverted

* Explore: prevent time picker to lock if from & to search parameters are present
2022-02-03 13:45:29 +00:00
Konrad Lalik
bb88cf683c
Alerting: Fix alert notification template (#44761)
* Wrap the inner template into div to prevent premailer from breaking the HTML structure

* Remove test row

* Add wrapper explanation

* Remove redundant code

* Add empty line
2022-02-03 14:17:05 +01:00
Todd Treece
c8bb4c733e
Prometheus: Set interval on time field (#44802) 2022-02-03 08:15:55 -05:00
Gilles De Mey
29b97361f7
Alerting: load correct unified alerting tab (#44794) 2022-02-03 13:35:56 +01:00
Serge Zaitsev
43b15b92ad
Chore: Remove bus from the alerting service (#44496)
* propagate notificationservice down to the notifiers

* replace dispatch in result handler

* remove dispatch from the rule reader

* remove dispatch from eval context

* remove dispatch from alerting usage

* remove dispatch from alerting usage

* remove dispatch from notifier

* attempt to fix tests in alerting

* hello linter, my old friend; also disable some tests for now

* use mocks to fix the tests

* resolving wire providers

* make linter happy

* remove yet another bus.dispatch

* fix tests using store mock
2022-02-03 13:26:05 +01:00
Alex Khomenko
a79c048344
Feature Highlights: move setting to a feature toggle (#44780)
* Add toggle

* Use the toggle

* Cleanup
2022-02-03 13:53:23 +02:00
Ivana Huckova
c23bc1e7b7
Prometheus: Show variable options in query builder (#44784)
* Prometheus: Show variable options

* Remove lint error

* Fix test for CodeQL

* Update public/app/plugins/datasource/prometheus/datasource.ts

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

* Update public/app/plugins/datasource/loki/datasource.ts

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2022-02-03 11:40:19 +01:00
Kat Yang
f582e6c86a
Chore: Remove bus from password (#44482)
* Chore: Remove bus from password

* Refactor: Remove bus from password.go and adjust tests

* remove sqlstore dependency from notifications

* Chore: Remove bus from password

* Refactor: Remove bus from password.go and adjust tests

* remove sqlstore dependency (again)

* remove fmt printf

* fix dependencies in http server

* fix renamed method in tests

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2022-02-03 10:33:46 +01:00
Gábor Farkas
f36ed878e9
Loki: add helper function to handle instant/range queries (#44785)
* loki: add helper function to handle range/instant queries

* improved comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-03 10:25:37 +01:00
Peter Holmberg
3314178a0a
grafana/ui: Fix RelativeTimeRange supported formats (#44535)
* remove link to docs site

* extract tooltip to component

* text and formatting

* use div instead of p
2022-02-03 10:13:19 +01:00
Vardan Torosyan
f38f10416a
Revert fixed roles and service accounts (#44778)
* Revert fixed roles and service accounts

* Leave the fixed role for service accounts
2022-02-03 09:59:26 +01:00
Armand Grillet
8c6a5f043a
[docs] Clarify legacy alerting deprecation (#44759)
* Clarify legacy alerting deprecation

* Lint Markdown
2022-02-03 09:59:02 +01:00
idafurjes
1b286e6bb5
Remove bus from quota, preferences, plugins, user_token (#44762)
* Remove bus from quota, preferences, plugins, user_token

* Bind sqlstore.Store to *sqlstore.SQLStore

* Fix test

* Fix sqlstore wire injection, dependency
2022-02-03 09:20:20 +01:00
Joan López de la Franca Beltran
b2655750e8
Encryption: Add support for data keys re-encryption (#43548)
* Encryption: Add support for data keys re-encryption

* Add tests for data keys re-encryption

* Update code after refactorings

Co-authored-by: Leonard Gram <leo@xlson.com>
2022-02-03 09:15:38 +01:00
JM
16f0c6617a
Update docs library element http api (#44493) 2022-02-03 08:46:03 +01:00
Joan López de la Franca Beltran
f8105efff3
Encryption: CLI rollback command (#43935)
* Encryption: CLI rollback command

* Update flag reference to 'featuremgmt' pkg

* Update feature toggles usage

* Clean up data keys table after envelope encryption rollback
2022-02-03 07:19:18 +01:00
Josh Hunt
ce4d8646fd
Chore: E2E tests for various variables types (#44747)
* Pass data-testid into VariableTextEditorField

* Add e2e tests for custom variables

* Rename query variable specs to match others

* Add e2e tests for Text Box variables

* manually remove id: null

* Add tests for constant variables
2022-02-03 09:58:56 +11:00
Yuriy Tseretyan
984c95de63
Do not store EvaluationString in Evaluation. (#44606)
* do not store evaluation string in Evaluation.
* reduce number of buckets to store for a single state
2022-02-02 19:18:20 +01:00
Marcus Efraimsson
0092d10764
Instrumentation: Fix HTTP request instrumentation of authentication failures (#44234)
Moves the request tracing middleware earlier in the chain, just after the tracing middleware 
and before the log middleware. With these changes we'll be able to track 
authentication/authorization status failures that currently exits early and don't execute the 
request tracing middleware. In addition, there might be some other routes now being tracked 
with this that we didn't do before.

Fixes #39590
2022-02-02 18:48:46 +01:00
Leon Sorokin
3504844ad7
DataFrame: insert null values along interval (#44622) 2022-02-02 10:25:49 -06:00
Andres Martinez Gotor
0ab7097abc
Chore: Update what's new link (#44782) 2022-02-02 16:43:37 +01:00
Eric Leijonmarck
1dd2579528
fix: remove migrated, and /org endpoint (#44788)
* fix: remove migrated, and /org endpoint

* Update pkg/api/index.go
2022-02-02 16:32:37 +01:00
kay delaney
9e6b9215ab
SectionHeader: Fix "Go to Folder" link not working (#44593) 2022-02-02 16:27:55 +01:00
Ieva
9247848a7b
increment fixed role version (#44779) 2022-02-02 15:24:16 +00:00
Kyle Brandt
040ce40113
SSE: Mode to drop NaN/Inf/Null in Reduction operations (#43583)
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-02-02 14:50:44 +01:00
Ashley Harrison
0cb3037b55
Panel: Embed URL is now correctly generated for a panel in the home dashboard (#44706)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* test tidyup

* Add comment for route

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Muaaz Saleem <muaazsaleem@Muaazs-MacBook-Pro.local>
2022-02-02 13:38:23 +00:00
George Robinson
924deda589
Fix Discord Webhook URL for invalid template (#44763)
This commit fixes an issue where an invalid template for Discord would change the Webhook URL to "" and cause "unsupported protocol scheme" errors.
2022-02-02 14:28:41 +01:00
Julien Pivotto
b78082f426
doc: snapshots: fix JSON response (#44758) 2022-02-02 14:03:14 +01:00
Tania B
84ea13bf6c
Docs: Refactor encryption docs (#44718)
* Docs: Refactor encryption docs

* Rename enterprise encr

* Remove envelope encr page

* combine database encryption sections

* fix reference

* Fix link

Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
2022-02-02 15:02:57 +02:00
Tania B
07d207a3f0
Docs: Add documentation for the new encryption providers (#44604)
* Add docs for Google Cloud KMS provider

* Minor changes to Google KMS provider

* Add docs for Hashicorp Vault provider

* Review suggestion

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Commit suggested change

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Remove confusing instruction

* Add example of key file path

* Add links to new providers

* Add path description

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2022-02-02 14:24:56 +02:00
renovate[bot]
d87cd6f26c
Update dependency prettier to v2.5.1 (#43473)
* Update dependency prettier to v2.5.1

* prettier fixes

* chore(toolkit): bump prettier to 2.5.1

* style(eslint): bump grafana config to 2.5.2 in core and toolkit

* style(mssql-datasource): fix no-inferrable-types eslint errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-02-02 12:02:32 +00:00
Joan López de la Franca Beltran
3b4e812449
Encryption: Keep legacy default provider id on providers map (#44721)
* Encryption: Keep legacy default provider id on providers map

* Minor fixes

* Refactor
2022-02-02 12:10:46 +01:00
Dimitris Sotirakis
7bb5a5b318
CI: Make e2e tests depend on binary builds (#44647)
* Make e2e test depend on binary builds

* Search for binary in the correct folders

* Remove package file var

* Add ARCH var
2022-02-02 12:40:22 +02:00
Oscar Kilhed
78ed5a99e6
TimeSeries/Barchart: Only show default label for y axis (#44713)
* TimeSeries/Barchart: only show default label for x axis

* Update docs

* Update packages/grafana-ui/src/options/builder/axis.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-02-02 11:05:48 +01:00
Konrad Lalik
69e4796504
Alerting: Split legacy and unified routing configuration (#44641)
* Disable add alert menu entry for legacy alerting

* Split legacy and unified routing configuration

* Fix fallback routes configuration
2022-02-02 10:57:43 +01:00
Giordano Ricci
cff7336510
Logs Panel: fix timestamp parsing for string dates without timezone (#44664) 2022-02-02 09:54:33 +00:00
Artur Wierzbicki
46a34451d5
Analytics: add more properties to dashboard list viewed event (#44739) 2022-02-02 13:41:10 +04:00
JM
925333bfa4
Library Elements API GET by name returns array (#44743)
* Library Elements API GET by name returns array

Making a GET request to the Library Elements HTTP API `api/library-elements/name/:name` will return an **array** of Library Element objects, but the documentation says it will return a Library Element object.

Example cURL POST request:
`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXXXXX" -d @request.json "https://my.grafana.net/api/library-elements/"`

request.json
```json
{
  "model": {},
  "kind": 1,
  "name": "testing description3",
  "uid": "basic3",
  "id": 12345,
  "version": 2
}
```

Example cURL GET request:
`curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXX" -d @request "https://my/api/library-elements/name/testing description3"`

Example response:
```json
{
    "result": [
        {
            . . .
        }
    ]
}
```

* Library Elements API fix bracket spacing
2022-02-02 09:50:27 +01:00
Ryan McKinley
ac90c8d68d
Geomap: initialization fixes (#44745) 2022-02-01 22:08:07 -08:00
Ryan McKinley
d8df08ce5d
Geomap: clear features when no-data is returned (#44748) 2022-02-01 22:02:43 -08:00
Sarah Zinger
58a71c7e91
Cloudwatch: Add syntax highlighting and autocomplete for "Metric Search" (#43985)
* Create a "monarch" folder with everything you need to do syntax highlighting and autocompletion.

* Use this new monarch folder with existing cloudwatch sql.

* Add metric math syntax highlighting and autocomplete.

* Make autocomplete "smarter":
- search always inserts a string as first arg
- strings can't contain predefined functions
- operators follow the last closing )

* Add some tests for Metric Math's CompletionItemProvider.

* Fixes After CR:
- refactor CompletionItemProvider, so that it only requires args that are dynamic or outside of it's responsibility
- Update and add tests with mocked monaco
- Add more autocomplete suggestions for SEARCH expression functions
- sort keywords and give different priority from function to make more visually distinctive.

* Change QueryEditor to auto-resize and look more like the one in Prometheus.

* Add autocomplete for time periods for the third arg of Search.

* More CR fixes:
- fix missing break
- add unit tests for statementPosition
- fix broken time period
- sort time periods

* Bug fix
2022-02-01 22:53:32 -05:00
Nathan Marrs
b2b584f611
Geomap: Improve tooltip UX and fix data links (#44740) 2022-02-01 18:17:39 -08:00
Santiago
04d93751b8
Alerting: send alerts to external, internal, or both alertmanagers (#40341)
* (WIP) send alerts to external, internal, or both alertmanagers

* Modify admin configuration endpoint, update swagger docs

* Integration test for admin config updated

* Code review changes

* Fix alertmanagers choice not changing bug, add unit test

* Add AlertmanagersChoice as enum in swagger, code review changes

* Fix API and tests errors

* Change enum from int to string, use 'SendAlertsTo' instead of 'AlertmanagerChoice' where necessary

* Fix tests to reflect last changes

* Keep senders running when alerts are handled just internally

* Check if any external AM has been discovered before sending alerts, update tests

* remove duplicate data from logs

* update comment

* represent alertmanagers choice as an int instead of a string

* default alertmanagers choice to all alertmanagers, test cases

* update definitions and generate spec
2022-02-01 20:36:55 -03:00
Atif Shoukat Ali
21796c61ba
Geomap: fix casing for panel options (#44688)
* fix casing for panel options

* remove hardcoded label values
2022-02-01 15:09:19 -08:00
Cat Perry
a86d7a5a90
Tempo: Show error if transformTrace() is passed bad data to parse to JSON (#44684)
* Surface errors if transformTrace() is passed bad data to parse
2022-02-01 14:39:09 -08:00
Sergej Zagursky
1f4fdf31df
Fix one more typo in data rate unit names (#44675) 2022-02-01 19:49:21 +01:00
Ryan McKinley
7ee38af95a
FeatureToggls: remove IsFeatureToggleEnabled from SettingsProvider (#44574) 2022-02-01 10:24:59 -08:00
Connor Lindsey
de04f19c47
Tempo: Add request histogram to service graph datalink (#44671) 2022-02-01 10:41:14 -07:00
Gabriel MABILLE
f81b9c8150
AccessControl: Read team permissions from db (#44727) 2022-02-01 18:35:31 +01:00