Commit Graph

14267 Commits

Author SHA1 Message Date
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
jcolladokuri
3ee99821bc
AzureMonitor: Updates allowed namespaces (#48468) 2022-05-03 14:41:05 +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
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
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
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
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
L-M-K-B
b8460051a6
Chore: transfer TimeSyncButton.test to testing-library (#48404) 2022-05-02 11:20:12 +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
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
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
Karl Persson
6c6137f45a
Access control: Pass access control metadata for api keys (#48445)
* Move ApiKeyDTO to dtos package

* Add access control filter to api keys

* pass user in GetApiKeysQuery

* Add api key metadata to DTO

* Remove scope all requirement from get api keys endpoint

* Handle api key access control metadata in frondend
2022-04-29 15:30:24 +02:00
Joey Tawadrous
412dbc21e3
Traces: Filter by service/span name and operation in Tempo and Jaeger (#48209)
* Filter search options in Tempo

* Tests for filtering search options in Tempo

* Filter search options in Jaeger

* Tests for filtering search options in Jaeger

* Self review

* Fuzzy search
2022-04-29 09:52:11 +01:00
Andrej Ocenas
bd9cec8827
Prometheus: Fix disappearing multi values in metric label values (#48127) 2022-04-29 10:22:49 +02:00
Sofia Papagiannaki
3e752a0db1
Alerting: modify alertmanager endpoints for proxying using the datasource UID (#47978)
* Alerting: enable proxying alertmanager calls using the datasource UID

* Remove use of datasource ID from the API

* Update frontend
2022-04-29 10:25:22 +03:00
Torkel Ödegaard
5a9aad3e86
QueryGroup: More efficient way to scroll to bottom when adding new queries (#48399) 2022-04-28 20:07:36 +02:00
Ryan McKinley
fee291c3c8
Save Drawer: reduce the number of diff elements we show (#48309) 2022-04-28 07:02:33 -07:00
Piotr Jamróz
f0f3134cb1
Explore: Fix legend toggling (#47823) 2022-04-28 15:55:16 +02:00
Gábor Farkas
ae926c2144
loki: better resource-call urls (#48250) 2022-04-28 14:28:57 +02:00
Torkel Ödegaard
4fef50272f
Select: Improve usability slightly (#47796)
* Select: Improve usability slightly

* Latest change

* Fixed test

* Updated test
2022-04-28 12:25:51 +02:00
Joao Silva
cc114e24ca
Navigation: Fixes closing submenus on scrolling (#48207) 2022-04-28 10:19:10 +01:00
L-M-K-B
ab144bf05e
Chore: Refactor run button and remove component incl. test (#48348) 2022-04-28 11:07:49 +02:00
Andres Martinez Gotor
6edefe5147
AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
Torkel Ödegaard
07bd261cff
Graph: Deprecate Graph (old) and make it no longer a visualization option for new panels (#48034)
* Graph: Make old graph deprecated, no longer selectable

* Fixing snapshot
2022-04-28 08:20:51 +00:00
Nathan Marrs
86971b1b30
Fix layer action / constraint change adhering to inline editing state (#48390) 2022-04-27 21:09:27 -07:00
Nathan Marrs
b990d3c9e3
Canvas: Fix selecto breaking on enter / exit panel edit mode (#48387) 2022-04-27 20:51:02 -07:00
Sarah Zinger
3ae90efda2
Azure Monitor: refactor resource picker (#48312)
* Refactor Resource Picker to split up data logic from view logic.
2022-04-27 20:06:21 -04:00
Nathan Marrs
fb25cf11e7
Address crash by properly updating currentLayer and refreshing selection to force update instance state (#48373) 2022-04-27 13:33:07 -07:00
An
900d9bf9a1
FileStorage: Add upload form (#46749)
* move upload to http

* use storage from grafanads

* rever gomod changes

* fix test

* wip

* add upload func

* update upload func

* writing to uploads

* edit response from service

* use dropzone for UI

* modify response struct in service

* better read file

* set content type for svg

* restrict file types upload

* add test and clean up errors

* pass test

* fix backend lint errors

* limit type of files on FE

* add TODO for after merge

* rebase with storage changes

* comment out unused function

* update UI to not have 2 uploads

* only call upload on select

* use utils function to find * in path

* show preview on drag over

* not allowing upload of svg

* add preview to upload tab

* no console.log

* resolve conflicts

* refactor log line

* fix failing BE test

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-04-27 15:12:48 -04:00
Sarah Zinger
ebfb70dc12
Azure Monitor: Scroll on resource picker fix and general clean up (#48311)
* Fix bug where resource picker doesn't open automatically to a previously selected resource.
2022-04-27 12:57:18 -04:00
Ivana Huckova
a60c32275e
LabelFilter: Use EditorField instead of Field (#48339) 2022-04-27 15:13:11 +02:00
Piotr Jamróz
361cc18b45
Query History: Move filtering to service layer (#48008)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Fix betterer conflicts

* Fix imports

* Fix imports

* Simplify test setup

* Simplify assertion

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests
2022-04-27 15:07:44 +02:00
Kristina
a320e942a6
Explore Split Logs - use unique IDs and save state vals to unique place (#48300)
* Explore Split Logs - use unique IDs and save state vals to unique place

* Remove exploreID from store
2022-04-27 07:47:33 -05:00
Marcus Efraimsson
199cacc7b6
Plugins Catalog: Fix styling of hyperlinks (#48196)
Adds some styling (default hyperlink color and underline on hover) to 
plugin header and body hyperlinks.

Fixes #48078
2022-04-27 14:34:47 +02:00
Erik Sundell
f58a2d879e
Cloudwatch: Use new annotation API (#48102)
* use new annotation api

* fix bad merge
2022-04-27 12:41:48 +02:00
Torkel Ödegaard
8764040fe3
Plugins: Fix double page paddings on plugin admin pages (#48315) 2022-04-27 09:56:44 +02:00
Ryan McKinley
5294a2af48
Testdata: show settings for current simulation (#48017)
Co-authored-by: An Le <an.le@grafana.com>
2022-04-26 13:45:42 -07:00
Connor Lindsey
0da50294fe
Service Graph: Display alert if no metrics found (#48214) 2022-04-26 11:43:18 -06:00
Gilles De Mey
9b95d77be9
Alerting: use a single move operation for alert rules (#48125) 2022-04-26 16:38:29 +02:00