Commit Graph

34902 Commits

Author SHA1 Message Date
Ryan McKinley
88eeb878a4
API: add stars HTTP endpoint (#48612)
Co-authored-by: Ying WANG <ying.wang@grafana.com>
2022-05-03 08:52:19 -07:00
Ashley Harrison
b231cbcf86
Fix lockfile... (#48643) 2022-05-03 15:57:24 +01:00
Josh Hunt
5dabb55b39
Navigation: Enable new navigation by default (#48447) 2022-05-03 16:28:40 +02:00
renovate[bot]
e1a15bab21
Update dependency @microsoft/api-extractor-model to v7.17.2 (#47917)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 15:21:21 +01:00
renovate[bot]
48964efdf6
Update dependency sass to v1.51.0 (#47453)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 15:20:46 +01:00
renovate[bot]
070d18c1c3
Update dependency @microsoft/api-extractor to v7.23.0 (#47090)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 15:20:21 +01:00
Ivana Huckova
769be876a5
Loki, Prometheus: Remember preferred editor (#48580)
* Loki: Remember default editor

* Loki: Add tests

* Prometheus: Set default editor type

* Fix and refactor tests

* Remove unused import
2022-05-03 14:50:13 +02:00
Ivana Huckova
4661c9ca47
Query history: Cleanup (#48303)
* Query history: Clean up stale history after 14 days

* Add unstarring sleanup

* Add wraapping

* Update sql for mysql database

* Update

* Remove fmt.Print

* Refactor and simplify solution

* Update pkg/services/queryhistory/database.go

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

* Adjust SQL to limit number of deleted queries

* Add limit enforcmenet to cleanup

* Change limit

* Update

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-05-03 14:49:58 +02:00
Ivana Huckova
cd462c5b21
Loki: add documentation for query builder (#48523) 2022-05-03 14:49:34 +02:00
Shirley
27821e0bc1
CloudWatch: Migrate alias to dynamic labels (#48555) 2022-05-03 13:41:51 +01:00
jcolladokuri
3ee99821bc
AzureMonitor: Updates allowed namespaces (#48468) 2022-05-03 14:41:05 +02:00
Ashley Harrison
806ea058ed
Chore: convert Slider tests to RTL (#48262)
* convert Slider tests to RTL

* slight update

* don't need to check they're in the document

* Update packages/grafana-ui/src/components/Slider/Slider.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* check below minimum value as well

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-05-03 13:33:30 +01:00
Andreas Christou
7f4b1b767e
Add new DynamoDB metrics & dimensions (#48551) 2022-05-03 13:32:09 +01:00
Jguer
6a303bb6b8
AccessControl: Rename builtin role roles to basic roles (#48519)
* AccessControl: Rename grafana:builtins roles to basic

* AccessControl: rename macro references to basic

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-05-03 13:59:16 +02:00
Dimitris Sotirakis
20f62e1841
CI: Split main tests pipeline (#48628)
* Split tests pipeline

* Rename dependencies
2022-05-03 13:54:47 +02:00
Erik Sundell
929d3134d1
Cloudwatch: Dynamic labels frontend migration (#48579)
* migrate metric queries

* restructure migrations

* self review

* cleanup tests

* ensure alias is not changed

* apply pr feedback
2022-05-03 13:52:17 +02:00
Kristina
bc58e2edab
Fix command palette casing (#48590) 2022-05-03 06:25:47 -05:00
Leon Sorokin
a927608cf5
Chore: uPlot 1.6.20 (#48596) 2022-05-03 05:22:14 -06:00
Andreas Gerstmayr
21034e31de
chore: remove executable permissions of source files and docs (#46303) 2022-05-03 12:08:14 +02:00
Gilles De Mey
2d9d12380c
Alerting: updated alerting creation order (#48548) 2022-05-03 11:27:34 +02:00
Ashley Harrison
d774deab99
convert test to RTL (#48291) 2022-05-03 08:45:50 +01:00
Karl Persson
7acf5bd7e8
Docs: Add api keys roles, actions and scopes documentation (#48448)
* Document fixed roles for api keys writer and reader

* Document permissions for api keys

* Fix annotation Actions

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-05-03 09:34:08 +02:00
Gábor Farkas
7d369a1dea
Loki: backend: use json-field (#48486)
* fixed strings

* loki: backend: use json-field
2022-05-03 08:03:25 +02:00
Sarah Zinger
a8354a0319
Azure Monitor: add search feature to resource picker. (#48234)
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-05-03 03:57:56 +02:00
Guilherme Caulada
2e9c38c951
Secrets: Add unified secrets table to reencryption (#48582)
* Add secrets table to reencryption

* Add updated column check for b64Secret reencryption

* Use field values for b64Secret to clarify booleans
2022-05-02 18:15:46 -03:00
achatterjee-grafana
815fc42da3
add alias to fix 404 error (#48599) 2022-05-02 15:58:35 -04:00
Isabella Siu
66cbf2c422
CloudWatch: remove references to json in template variable docs (#48593)
* CloudWatch: remove references to json in docs

* docs comments
2022-05-02 15:21:53 -04:00
Artur Wierzbicki
de75dd6aad
Search: remove dev-mode from the feature flag 2022-05-02 23:01:29 +04:00
Adam Simpson
9db95826a4
Variables: allow Regex tooltip links to be clickable (#48560)
Fixes #48558
2022-05-02 17:44:23 +00:00
Brendan O'Handley
4867a6b15f
Graphite Datasource: add responseType: 'text' to http options to return full list of functions (#47663)
* add response type text to graphite datasource http options to return full list of functions

* add comment for adding response type text to call to  graphite /functions endpoint

* Add tests for invalid and valid JSON mocking backendSrv fromFetch

* remove unnecessary code from tests

* remove extra logic for graphite /functions endpoint returning {} #46681

* add graphite functions list logic back in to see why alert test broke

* fix conflict message

* fix conflicts

* fix issues with rebase, add responseType text back in, remove extra graphite functions list logic checks

* add email for license/cla check
2022-05-02 13:05:31 -04:00
Ryan McKinley
a8f3b17262
SaveDashboard: remove feature flag for save drawer (#48462) 2022-05-02 09:29:22 -07:00
Ivana Huckova
da1d34e83d
Elasticsearch: Add deprecation notice for < 7.10 versions (#48506)
* Elasticsearch: Add deprecation notice for old versions

* Add option to remove notice

* Remove deprecation from editor

* Update

* Update public/app/plugins/datasource/elasticsearch/configuration/ConfigEditor.tsx

* Simplify

* Update documentation

* Update

* Update docs/sources/datasources/elasticsearch.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-02 17:08:47 +02:00
Ivana Huckova
656cd4c8dd
Logs: Fix pagination skipping entries (#48413)
* Logs: Add pagination range to prevent pagination from skipping entries

* Revert "Logs: Add pagination range to prevent pagination from skipping entries"

This reverts commit 2e7a6b3870.

* Refactor

* Update
2022-05-02 16:46:47 +02:00
Guilherme Caulada
2533f21015
DataSource: Fix secure json data reset on datasource update (#48557)
* Fix secure json data reset on datasource update

* Update fillWithSecureJSONData to use DecryptedValues

* Remove unecessary conversion

* Move fillWithSecureJsonData logic to datasource service

* Add sanity check for nil secure json data
2022-05-02 11:29:13 -03:00
Adam Simpson
c57924e332
A11y: Fix remaining focus issues with Switch (#48376)
* refactor: replace uses of checked prop for <Switch> with value prop

* fix: remove spaces from ids

The ID format is stated as follows([source][1]):

> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]),
hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Since `QueryHeaderSwitch` is used in two places I created a new variable that replaces spaces with a dash in the label.

[1]: https://www.w3.org/TR/html401/types.html#type-name

* fix: allow Switch in AlertingSettings to be focused by keyboard

* fix: allow Switch in PromSettings to be focused by keyboard

Fixes #46472

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-05-02 13:50:44 +00:00
Kristina
a98a872929
Command Palette - use same focus overlay as modals, override monaco keybinding for prometheus (#48391)
* Command Palette - use same focus overlay as modals, override whatever captures command K in monaco

* Pass the key event out of monaco
2022-05-02 08:22:33 -05:00
Ivana Huckova
f90622e0d0
Shortcuts: Add shortcut to show shortcuts to the list of shortcuts (#48395)
* Shortcuts: Add shortcut for shortcuts

* Update public/app/core/components/help/HelpModal.tsx

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-02 14:55:44 +02:00
Sergey Kostrukov
9047058c43
Auth Proxy: non-ASCII headers encoding tests (#47110) 2022-05-02 13:08:20 +02:00
Peter Holmberg
69ee917c89
SSE: Add constant for data source name (#48443)
* add property for expressions datasource name

* remove console log
2022-05-02 11:42:20 +02:00
ying-jeanne
bde368be55
Chore : Replace dashboardid with dashboardUID in annotation API (#48481)
* replace dashboardid with dashboardUID in annotation API

* add some tests

* modify some docs and add uid into get endpoint

* rebase with main

* add map for avoiding too much retrieve on dashboards
2022-05-02 11:35:36 +02:00
L-M-K-B
b8460051a6
Chore: transfer TimeSyncButton.test to testing-library (#48404) 2022-05-02 11:20:12 +02:00
Jean-Philippe Quéméner
0a87ef06af
Alerting: add safeguard for migrations that might cause dataloss (#48526)
* Alerting: add safeguard for migrations that might cause dataloss

* add test for panic

* add documentation
2022-05-02 10:38:42 +02:00
Erik Sundell
a5c570a5f6
Cloudwatch: Refactor metrics query editor (#48537)
* refactor metrics query editor to return a function component

* add tests for metrics query editor

* add simple render tests for panel query editor

* remove obsolete test

* pr feedback
2022-05-02 10:09:24 +02:00
Jack Westbrook
39ee365b82
Swagger: Add integrity attributes (#48396) 2022-05-02 09:49:49 +02:00
Karl Persson
de50f39c12
Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202)
* Refactor Scope resolver to support resolving into several scopes

* Change permission evaluator to match at least one of passed scopes
2022-05-02 09:29:30 +02:00
Karl Persson
9622e7457e
Fix permission query for postgres (#48543) 2022-05-02 09:25:23 +02:00
Isabella Siu
74c2c2ccf0
CloudWatch: add generic filter component to variable editor (#47907)
* CloudWatch: add generic filter component to variable editor

* remove multi-text-select object

* remove hidden

* andres comments

* migration between 8.5 and this

* add waitFors to tests

* more await tweaks

* actually fix tests

* use popoverContent tooltip

* fix template variable handling

* prettier fix

* fix prettier 2

* feat: make tooltip links in query variable editor clickable

* fix template stuff

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-04-29 16:42:59 -04:00
Alexander Weaver
a96510d03c
Alerting: Fix test intermittency caused by port conflicts (#48552)
* Get golang to find an open port for us

* Update pkg/tests/api/alerting/api_notification_channel_test.go

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Fix merge

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-04-29 12:07:19 -05:00
Yuriy Tseretyan
54acec69a3
provision alertmanager and manage prom alerts (#48475) 2022-04-29 12:53:14 -04:00
Andreas Christou
d7c16e06d2
AzureMonitor: Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. (#48077)
* Allow dimension operator selection

- Add dimension operators and function to update the operator in the query
- Add logic to ensure the same dimension cannot be selected multiple times (Azure restriction)
- Add selection component

* Update backend logic to default operation and filter to eq '*'

- This must be done as the ne and sw operators do not work with the wildcard filter

* Add tests on dimension operators

* Correct placement of 'and' when building query

* Add comment and simplify filtering logic

* Allow multiSelect for eq and ne operators

- Pass PanelData to DimensionFields component
- Add logic to retrieve labels from PanelData
- Add MultiSelect component for relevant operators
- Update frontend types to allow filter to be an array of strings
- Update backend types to allow filter to be an array of strings
- Update filter string building

* Improve setting of labels

* Update go tests

* Update frontend tests

- Add panelData mock (to be expanded later)
- Update null check in DimensionFields

* Allow custom value and set default

* Add frontend test and fix lint issues

* Improved handling of options for sw operator

* Remove changes related to multiselect

* Add check on refId to ensure dimension labels are correct for query

* Extract custom hook for setting dimension labels

* Add documentation around Azure Monitor metrics dimensions

* Update MetricQueryEditor tests

- Add missing data prop

* Correctly set field values

* Add additional expect for onQueryChange

* Correctly set operators

- Simplify onFilterInputChange

* Ensure no duplicate filters appear

* Ensure that filters are displayed correctly for saved queries

* Update dimension filter test

* Include additional test around changing dimension labels

* Pass panel data through new metrics query editor
2022-04-29 17:01:13 +01:00