Commit Graph

15481 Commits

Author SHA1 Message Date
Leon Sorokin
6de77283c6
Prometheus: make parsing of Infinity variants case-insensitive (#48660) 2022-05-05 12:38:26 -05:00
Josh Hunt
1a633812a7
DashboardSettings: Update active tab to use new brand gradient (#48755)
* DashboardSettings: Update active tab to use new brand gradient

* Remove colons from gradients
2022-05-05 17:10:06 +01:00
sam boyer
ea96c42545
schemas: Update to cuetsy v0.0.1 (#48753)
* Add explicit cuetsy annotations to all models.cue

* Update to first cuetsy release

* Clean up cuetsify a bit; remove unification

* Update changes to news codegen output
2022-05-05 11:56:53 -04:00
Torkel Ödegaard
fca52a1c83
CommandPalette: Make dashboard nav work when under grafana is under sub path (#48744) 2022-05-05 17:15:59 +02:00
Ivana Huckova
250b72cc1b
Elasticsearch: Remove support for versions after their end of the life (<7.10.0) (#48715)
* Elasticsearch: Remove support for versions after their EOL

* Update docs

* Remove old versions from config

* Update pkg/tsdb/elasticsearch/elasticsearch.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Fix tests

* Fix typecheck errors

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-05 16:16:34 +02:00
Josh Hunt
b04fb8522d
QueryEditor: Set data source type in mixed query data source ref (#48734) 2022-05-05 15:09:00 +01:00
L-M-K-B
a98fae32fc
Laura/chore/refactor test of secondary actions (#48745)
* Chore: transfer three tests to testing-library

* Chore: transfer last test to testing-library

* chore: add suggestion from code review

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-05 15:55:59 +02:00
Josh Hunt
32a26d87a4
Chore: Generate JSON theme files (#48762) 2022-05-05 15:35:08 +02:00
Josh Hunt
af57804513
Tooltip: Make tooltip use secondary background color for legible links (#48748) 2022-05-05 14:28:45 +01:00
Connor Lindsey
08bee1e682
Trace to logs: Only show loki and splunk datasources in settings (#48723) 2022-05-05 06:28:28 -06:00
Sofia Papagiannaki
610247d52a
Alerting: modify ruler endpoints for proxying using the datasource UID (#48046)
* Modify ruler endpoints to expect the data source UID

* Update frontend

* Apply suggestion from code review
2022-05-05 14:58:32 +03:00
Konrad Lalik
65d7d466d7
Alerting: Improved RBAC for Alert managers (#48344)
* Initial support for grafana or cloud only alert managers

* Handle missing alert manager

* Refactor code, fix tests

* Fix redirect url

* Bring back the test

* Improve missing alert manager warning, add useAlertManagerSourceName tests

* Fix lint errors

* Rename alert manager hook

* Refactor alert manager label creation

* Improve warnings' messages

* Fix linter

* Fix warning condition in RuleEditor
2022-05-05 13:34:58 +02:00
Gábor Farkas
da74dba7c8
Loki: backend: use streaming JSON parser, try2 (#48752)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

* fixed converter/prom tests

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 13:09:01 +02:00
Jguer
8ed3fb1f2d
AccessControl: don't pull builtin role assignments when refactor is enabled (#48675) 2022-05-05 13:02:34 +02:00
Gábor Farkas
3cade2f669
Revert "Loki: backend: use streaming JSON parser (#47656)" (#48747)
This reverts commit 46b40b6e82.
2022-05-05 12:02:53 +02:00
Giordano Ricci
143810bb95
Explore: simplify support for multiple query editors (#48701)
* Explore: simplify support for multiple query editors

* CloudWatch: remove usage of deprecated plugin methods

* Apply suggestions from code review

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* run prettier

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-05 10:36:50 +01:00
Josh Hunt
1cd9175075
PanelEdit: Add gap between variables, like in Dashboard view (#48718) 2022-05-05 09:42:39 +01:00
ying-jeanne
0d14c27eb9
Chore: add Folderuid into panel-library API (#48577)
* add folderuid into interface

* panellibrary id/uid things

* modify doc

* update doc

* correct some comments
2022-05-05 10:04:54 +02:00
Gábor Farkas
60cabaea0a
loki: use metadataRequest in testDatasource (#48431) 2022-05-05 09:43:36 +02:00
Gábor Farkas
46b40b6e82
Loki: backend: use streaming JSON parser (#47656)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 08:47:40 +02:00
L-M-K-B
83a5ca95c7
Chore: transfer LiveLogs.test to testing-library (#48678)
* Chore: transfer LiveLogs.test to testing-library

* Chore: improve readability and third test

* Chore: improve test and component after code review
2022-05-05 08:40:21 +02:00
Ryan McKinley
2d574f352c
Search: add actions row header to new search layout (#48735) 2022-05-05 01:25:27 +02:00
Adela Almasan
5df91bdcf1
Canvas: Inline edit (#48222)
Canvas inline edit panel

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-04 14:15:07 -05:00
Maria Alexandra
6e530d45bc
grafana/ui: Add default type="button" to <Button> (#48183) 2022-05-04 18:36:14 +02:00
Josh Hunt
2f1d404949
Switch PanelEditor to v2 theme (#48717) 2022-05-04 16:55:49 +01:00
Adela Almasan
efe09d6a8b
Geomap: Legend and scale overlapping (#47594)
Updated legend bottom left custom style when scale is shown
2022-05-04 10:14:19 -05:00
Ashley Harrison
06d3c27bc1
Select: Portal menu by default (#48176)
* Remove menuShouldPortal from all <Select /> components

* fix unit tests

* leave menuShouldPortal as an escape hatch

* Fix import order
2022-05-04 15:12:59 +01:00
renovate[bot]
00dbea91ea
Update dependency lru-cache to v7.9.0 (#47480)
* Update dependency lru-cache to v7.9.0

* update snapshot

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-04 15:07:27 +01:00
Adam Simpson
b2644de6c8
AzureMonitor: add feature toggle azureMonitorExperimentalUI for migrating to experimental UI (#48658)
* feat: add feature toggle azureMonitorExperimentalUI

Add QueryHeader which adds an experimental header to AzureMonitor. This work is documented in #44432.
2022-05-04 13:54:09 +00:00
Joao Silva
2e5f797666
Variables: Fixes issue with null variables breaking the dropdown (#48644) 2022-05-04 14:27:22 +01:00
Ashley Harrison
8fcae1ef3c
Navigation: change Search Dashboards back to sentence case (Search dashboards) (#48272)
* revert search dashboards to sentence case

* Saved Items -> Saved items
2022-05-04 14:24:10 +01:00
Alexander Kubyshkin
f00ffb190c
Escape backslashes in regexps in Loki label browser (#45809, #47039). (#47412)
* Escape backslashes in regexps in Loki label browser (#45809, #47039).

* Escape values in Loki Query Builder.

* Escape more values in Loki Query Builder.
2022-05-04 12:49:04 +02:00
Torkel Ödegaard
b71aa912c6
TimeRange: Fixes updating time range from url and browser history (#48657) 2022-05-04 11:36:15 +02:00
Gilles De Mey
e04d8fca7b
Alerting: correctly show all alerts in a folder (#48684) 2022-05-04 11:35:08 +02:00
kay delaney
bb7e556efc
Templating: Prefix variable picker element IDs (#48405) 2022-05-04 11:04:15 +02:00
kay delaney
713e624790
DashboardModel: Tidy up some of the older code (#48355) 2022-05-04 09:39:41 +01:00
Krzysztof Dąbrowski
c41397a6e7
LDAP: validate organization role during parsing (#37188)
* LDAP: validate organization role during parsing

* Trigger a new build

* Check if grafana_admin is present
2022-05-04 09:35:10 +02:00
Nathan Marrs
ff38f24044
Canvas: Refactor group to frame (#48671) 2022-05-03 22:58:00 -07:00
Erik Sundell
0d60b1ce0a
CloudWatch: Display dynamic label field in case feature is enabled (#48614)
* move metrics editor related files to a separate folder

* cleanup

* add tests

* remove snapshot test

* nit

* remove unsued import

* remove snapshot
2022-05-04 07:36:18 +02:00
Nathan Marrs
66d7105b34
Canvas: Group constraint support (#48563) 2022-05-03 19:51:01 -07:00
Adela Almasan
0b5ffcfcf0
Geomap: Legend style update (#48641)
Legend style update
2022-05-03 15:03:41 -05:00
Joey Tawadrous
09634b518c
Traces Panel: Add new Traces Panel visualization (#47534)
* Panel

* Support tempo dash variables

* Support tempo explore variables

* Only show span links for explore

* Cleanup

* Added tests

* apply variables to search

* Tests for search variables

* Handling no data

* Interpolation and tests

* TracesPanel tests

* More tests

* Fix for backend test

* Manager integration test fix

* Traces doc and updated visualizations index doc

* Logs for this span

* Search, scrollToTop, other improvements

* Refactor to extract common code

* Removed TopOfViewRefType optional

* Remove topOfViewRef optional

* Removed another optional and fixed tests

* Test

* Only show search bar if trace

* Support traces panel in add to dashboard

* Self review

* Update betterer

* Linter fixes

* Updated traces doc

* Ahh, moved the for more info too

* Updated betterer.results

* Added new icon

* Updated expectedListResp.json
2022-05-03 17:42:36 +01:00
Will Browne
4ecd57f49c
Plugins: Introduce HTTP 207 Multi Status response to api/ds/query (#48550)
* feature toggles

* return HTTP 207 from ds/query

* add ft check

* add API test

* add 207 check for qr

* change to OR

* revert check

* add explicit toggle check for cloudwatch

* remove unused import

* remove from defaults.ini

* add status codes to md and update swagger

* new fangled http api tests pattern

* update swagger

* Update docs/sources/http_api/data_source.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* add missing word and reformat

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-03 18:02:20 +02:00
Josh Hunt
5dabb55b39
Navigation: Enable new navigation by default (#48447) 2022-05-03 16:28:40 +02: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
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
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
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
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
ying-jeanne
1667a7c0da
Chore: Modify patch and update of preference to take homedashboarduid than h… (#48281)
* modify patch and update of preference to take homedashboarduid than homedashboardid

* to be tested

* use getdashboard

* update doc
2022-04-29 14:37:33 +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
Kevin Yu
1be45d1ed9
Azure Monitor: reset resource uri when resource changes (#48235) 2022-04-26 07:36:37 -07:00
Konrad Lalik
5f594addbf
Alerting: Fix folder permissions (#48189)
* Use the folder view permission in alerting

* Add tests
2022-04-26 15:57:00 +02:00
kay delaney
3b4d237ade
Notifications: Hide display of trace ID behind feature flag (#48057)
* Notifications: Hide display of trace ID behind feature flag
2022-04-26 14:31:27 +01:00
Connor Lindsey
4e6c3be7ab
Tracing: Add string unit to trace search results to prevent Infinity bug (#48206) 2022-04-26 07:09:40 -06:00
Kristina
090afc9ae0
Bind command palette specific overrides and reset when no longer relevant (#48217)
* Bind command palette specific overrides and reset when no longer relevant

* Use original global escape instead of resetting the whole keybinding profile
2022-04-26 06:31:13 -05:00
Gábor Farkas
c73b9d1818
Loki: do not use the old labels-api (#48185)
* loki: do not use old labels-api

* adjust allowed-url-list

* fixed tests
2022-04-26 11:51:26 +02:00
Ivana Huckova
c0ee94a04d
Update grafana/experimental and fix Cloudwatch components (#48132)
* Update grafana/experimental and fix components

* Simplify
2022-04-26 11:28:34 +02:00
Ryan McKinley
e0aeb83786
Export: introduce export plumbing (behind dev feature flag) (#48091) 2022-04-25 16:59:18 -07:00
Adam Simpson
6c0a5b121e
CloudWatch: prevent log groups from being removed on query change. (#47994)
* CloudWatch: prevent log groups from being removed on query change.

Previously when a query was changed the existing log groups for that query were "dropped". The fix is to combine the
new query with the existing query object in memory to preserve the log groups.

fixes #33626

* CloudWatch: fix typos in runWithRetry documentation

* chore: fix eslint issue
2022-04-25 17:59:52 +00:00
Joao Silva
ebe34ddcba
Navigation: Remove the 'active' indicator from the Home icon when collapsed (#48192) 2022-04-25 17:12:58 +01:00
gotjosh
25c07ff85e
Alerting: Wrap legacy alerting metrics with legacy_ (#48190)
* Alerting: Wrap legacy alerting metrics with `legacy_`
2022-04-25 17:19:36 +02:00
Isabella Siu
801a2a240a
Cloudwatch: fix template variables in variable queries (#48140) 2022-04-25 10:33:49 -04:00
Kristina
b30d9f2732
Explore: Fix height on horizontal drawer and query inspector (#47832)
* Move tab height and horizontal drawer height to themable variables so they can be referred to. Add a default height to tabbed container so it can set an explicit height. Add overflow: scroll to inspector content

* Use height variable that changes on resize

* Use css to set height
2022-04-25 07:48:55 -05:00
Gábor Farkas
d8a754c4a0
loki: send metadata requests through backend (#48063) 2022-04-25 13:16:14 +02:00
Andres Martinez Gotor
7cfab77650
AzureMonitor: Remove workaround in Logs editor (#48104) 2022-04-25 12:34:12 +02:00
Erik Sundell
cb2c6fe6bc
AzureMonitor: Remove unused angular code (#48110)
* remove unsued code

* fix import
2022-04-25 12:30:33 +02:00
Artur Wierzbicki
2e599643f6
Previews: refactor (#47728)
* #44449: return standard thumb service even if auth setup fails

* #44449: remove dashboardPreviewsScheduler feature flag

* #44449: externalize dashboardPreviews config

* #44449: disable previews by default

* #44449: rename logger

* #44449: dashboardPreviewsAdmin feature requires dev mode

* #44449: retrigger CII
2022-04-25 01:55:10 +04:00
Nathan Marrs
2b2f275a08
Canvas: Support scale + center constraints (#48085) 2022-04-22 14:02:36 -07:00
Ashley Harrison
a7f02094b1
Navigation: Add scroll indicators (#48115)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* add scrollbar to navbar

* Make clickable area of grafana logo full size

* hide vertical track as well

* initial attempt at a scroll overlay

* fix indentation

* Extract into a separate component

* Add arrows

* fix unit tests

* Fix imports in new component

* add comment
2022-04-22 17:21:52 +01:00
Ashley Harrison
277a83215c
Use jest.fakeTimers instead of mocking Date.now (#48121) 2022-04-22 16:00:37 +01:00
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Gilles De Mey
2713de2bd1
Alerting: fix alert creation interval layout bug (#48112) 2022-04-22 14:29:36 +02:00
Ashley Harrison
5f83fc3c61
Navigation: Use correct component for custom branding (#48101)
* Use correct component for whitelabelling

* extract logic into reusable function
2022-04-22 11:04:23 +01:00
Ashley Harrison
a34da3e248
Navigation: Implement scrolling navbar + fix clickable area of grafana logo (#48045)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* add scrollbar to navbar

* Make clickable area of grafana logo full size

* hide vertical track as well

* prettier...
2022-04-22 11:04:04 +01:00
kay delaney
3606527359
Templating: Expose more informative action names for keyed actions (#48076) 2022-04-22 10:57:02 +01:00
Ashley Harrison
11bc5e1a06
Navigation: Prevent chevron overlaying navbar menus (#47988)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* Make sure hover menus size correctly

* refactor into separate component

* Fix focus behaviour

* fix test again...
2022-04-22 10:38:47 +01:00
Ivana Huckova
28665a869b
Prometheus: Add report interaction for editor modes (#47940)
* Prometheus: Add report interaction for editor modes

* Add new query

* Fix test

* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryEditorSelector.tsx

* Add app to feature tracking

* Update
2022-04-22 10:46:16 +02:00
Giordano Ricci
6899f23a22
Explore: prevent direct access to explore if disabled via feature toggle (#47714)
* Explore: prevent explore route to be registered if explore is disabled

* add feature toggle page
2022-04-22 09:03:24 +01:00
Gábor Farkas
f2814046d1
loki: logrowcontext: explicitly name fields (#48043) 2022-04-22 08:43:33 +02:00
Kristina
3e7db088ac
Command Palette Scaffolding + Explore (#47445)
* Add feature flag and scaffodling

* start adding actions

* WIP

* move action files

* Start adding styles

* Fix implementation based on feedback

* Add more hackathon code back to command palette

* Cleanup

* Cleanup unused service files for simple MVP pass

* Move type def to library

* WIP

* Move provider to proper place to pick up other routes’ actions

* Build actions off navbar, add explore actions

* Work around undefined typescript stuff

* Fix based on feedback

* close palette on ESC

* Fix based on PR feedback pt 1

* Move styles to classes

* Move another inline style to a class

* Enable command palette by default

* change around async hook structure

* Add simple feature tracking

* Code cleanup, and be sure the command is accurate

* Change to only render if there are actions, and only add actions once past login
2022-04-21 16:50:34 -05:00
Alexander Kubyshkin
4fbc481d1f
Fix Date picker content when pane is splitted (#46900). Show narrow(m… (#47206)
* Fix Date picker content when pane is splitted (#46900). Show narrow(mobile) content version.

* Change from boolean to value override and use it in calendar styles. Change calendar modal to be in center of screen.

* Be sure width division only happens on split view

Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-04-21 12:49:52 -05:00
Ashley Harrison
9595b56f0d
Chore: fix flakey frontend test (#48071)
* remove unnecessary rerender

* removed unused act import
2022-04-21 17:44:06 +01:00
Joao Silva
94d2155f44
Annotations: Fixes data source showing as a uid in annotation settings (#48073) 2022-04-21 17:08:11 +01:00
owensmallwood
9a4bd1f2d4
Usage insights query caching (#47893)
* Updates queryResponse tests to include new cachedResponse bool

* Adds cachedResponse bool to QueryResponse

* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests

* Adds totalQueries and cachedQueries counts to the data-request events

* Adds new metrics and their descriptions to docs

* uses more descriptive variable name

* changes naming

* removes hyphen in docs

* extracts calculations to own lines prior to assignment
2022-04-21 09:16:13 -06:00
idafurjes
d99d095ac6
Add endpoint with UID for dashboard permissions (#47753)
* Replace sequential IDs with UID for dashboard permossion

* Add back endpoint with id

* Rename parameter from dashboarUid->uid and add swagger definitions for endpoints

* Generate swagger json

* Add deprecated to swagger and docs

* Add deprecated comment in the api.go

* Add model for POST body

* Fix model post body for endpoint

* Generate spec with enterprise
2022-04-21 16:24:03 +02:00
Joao Silva
15ea6d559a
Text Panel: Fixes issue with hash anchor links (#47980) 2022-04-21 14:06:58 +01:00
renovate[bot]
03cf38e659
Update dependency @testing-library/user-event to v14.1.1 (#47008)
* Update dependency @testing-library/user-event to v14.1.1

* make this test more consistent

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-21 13:44:36 +01:00
Vardan Torosyan
a0553de8dd
Rename FGAC to RBAC in the codebase (#48051) 2022-04-21 14:31:02 +02:00
Ivana Huckova
ce6aed21a7
Loki: Show raw query and patterns only in query builder (#48049) 2022-04-21 14:23:03 +02:00
Ashley Harrison
d832bde270
Upgrade @testing-library/user-event to v14 (#47898)
* Update dependency @testing-library/user-event to v14

* everything is async...

* everything is async pt.2

* Fix cascader tests

* hack the yarn.lock file to remove the old version of @testing-library/dom

* some more fixes!

* MOAR FIXES

* more fixes

* remove a bunch of places where we're wrapping in act()

* down to 7 failing tests...

* Fix arrow tests

* Fix rest of NavBarItem tests

* Fix last tests

* Use {Enter} instead of {enter}

* Revert "Use {Enter} instead of {enter}"

This reverts commit e72453bb52.

* remove some unused act imports

* Fix LibraryPanelsSearch tests

* more stable test

* More consistent test...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 13:15:21 +01:00
Ashley Harrison
b727c324b8
Hide navbar behind ready check to prevent flicker of navbar on login (#47968) 2022-04-21 13:07:10 +01:00
Ivana Huckova
52768d87c4
Update button name to make it more clear (#48042) 2022-04-21 12:24:11 +02:00
Joao Silva
34d4b571e6
Navigation: Fixes issue with menu closing when hovering back to the trigger (#47992) 2022-04-21 10:12:37 +01:00
Andrej Ocenas
ff5aef194c
Prometheus: Highlight operations added in the query builder (#47961)
* Highlight newly added operations

* Better diff for the operations change

* Changed the highlight style
2022-04-21 10:26:27 +02:00
Ryan McKinley
72b5af8d9b
Testdata: add basic tank simulation (#47990) 2022-04-20 12:01:09 -07:00
Alex Khomenko
6c1994cb86
Use trialExpiry for determining if a user is on trial (#47975) 2022-04-20 21:37:54 +03:00
Nathan Marrs
d442608eb9
Canvas: Implement new constraint system (#47911)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-20 09:59:49 -07:00
kay delaney
e19e934178
UserListAdminPage: Reset page when changing filters (#47958) 2022-04-20 16:02:33 +01:00
Andreas Christou
d0b41f882e
Transformations: Support escaped characters in key-value pair parsing (#47901)
* Additional logic to handle quoted values

* Simple test with quoted values that include spaces

* Update test description

* Updating logic to account for nested quotes

- Adding additional test for nested quotes

* Strip out line breaks and carriage returns pre-processing

* Fix typo in test result

* Update key-value logic to avoid regexp

- Minor changes to account for null values

* Correct escaping on test

* Additional tests

- Test for null values
- Test for nested separator characters
- Update quoting
2022-04-20 15:46:54 +01:00
Gilles De Mey
459c64fd44
Alerting: adds variable replacement to panel filters (#47962) 2022-04-20 16:29:55 +02:00
Joe Blubaugh
3d91047e6e
Alerting: Notification URL points to alert view page instead of alert edit page (#47752)
Before this change, notifications generated by the Grafana Alertmanager
pointed to '/alerting/:ruleID/edit'. This change instead points them to
the view path '/alerting/grafana/:ruleID/view'. The view page has a
better UX, including timeseries display. It's also where many alert
state improvements will land in the next few versions of Grafana.

Fixes #45301

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-20 21:43:55 +08:00
Sofia Papagiannaki
54962c2f0c
Alerting: Rename Recipient path parameter to DatasourceID (#47949) 2022-04-20 16:20:17 +03:00
kay delaney
db8d85e2f2
Folders: Fix flaky test (#47953) 2022-04-20 15:03:33 +02:00
Alex Khomenko
9c0aa09a85
Feature Highlights: update upgrade components UI (#47885)
* Highlights: add action prop

* Highlight team sync for trial users

* Add badges for trial highlights

* Move events to UpgradeBox

* Fix undefined license settings

* Update snapshot

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update copy and event handling

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-04-20 15:08:49 +03:00
Torkel Ödegaard
68aac0bd90
Prometheus/Loki: Fixes the query type option when multiple queries present (#47846) 2022-04-20 14:01:01 +02:00
Kevin Yu
01c22ee366
Azure Monitor: Migrate metrics queries to use a resource URI (#47696)
* migrate old query to new query

* remove new prefixed data fetchers

* fix lint

* add test cases for v7 and v8 query versions

* add mock ids in test

* add clarifying comment

* add types for azure monitor api data fetchers

* add additional comment to explain the types
2022-04-20 05:00:39 -07:00
Gábor Farkas
79c06fdddc
Loki: add backend-forward mode to queries, update log-row-context (#47726)
* loki: add helper function to sort dataframe by time

* loki: add direction-attribute to queries

* loki: make log-row-context code backward-compatible

* better comment

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

* fixed test

* simplified code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-04-20 13:52:15 +02:00
Ivana Huckova
5c4459a723
Prometheus: Remove running of query on raw query toggle (#47938) 2022-04-20 13:33:59 +02:00
kay delaney
8ae5dd74e6
Dashboards: Defer loading of plugin exports until panel is visible (#47361) 2022-04-20 11:56:19 +02:00
kay delaney
c48d8d1d48
Frontend: Add notification persistence behind feature flag (#47871) 2022-04-20 10:42:32 +01:00
Gilles De Mey
be3f52abb1
Alerting: grafana managed group names (#47785) 2022-04-20 11:41:33 +02:00
Giordano Ricci
c1490a464a
Explore: minor copy changes (#47922)
* Explore: minor copy changes

* fix tests
2022-04-20 10:37:26 +01:00
kay delaney
f9f4a4cbf6
Export: Explicitly include default datasources in exported dashboard json (#47244)
* Export: Explicitly include default datasources in exported dashboard json
2022-04-20 10:02:26 +01:00
Vardan Torosyan
cbd2d09d70
Update API Keys UI to adjust based on users permissions (#47802)
* Update API Keys UI to adjust based on users permissions

Since API Keys support now RBAC we need to ensure that UI
is adjusted based on the user permissions.

* Applying PR suggestions
2022-04-20 09:45:45 +02:00
Peter Holmberg
39d3c8afd7
Alerting: Fix issue with Slack contact point validation (#47559)
* secureFields and secureSettings

* revert channelIndex

* readd lost code

* use specific return

* register secure fields and use not hard coded index

* fix for determineReadOnly

* fix lint error

* fix test suite

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-20 09:40:57 +02:00
Sofia Papagiannaki
e58a015baf
Swagger: annotate RoleType as enumeration (#47902) 2022-04-20 10:27:25 +03:00
Leon Sorokin
aa98123e72
TimeSeries: always try to detect & fix reverse-sorted time field (#47906) 2022-04-19 23:20:09 -05:00
Ryan McKinley
89fa35a53f
Testdata: introduce basic simulation framework (#47863) 2022-04-20 02:42:29 +02:00
Ryan McKinley
f4e285b8b4
Timeseries: add zoom to data button (#47862) 2022-04-19 17:24:54 -07:00
Konrad Lalik
785145c045
Alerting: FGAC bug bash fixes (#47873)
* Improve new alert and new silence buttons permission handling

* Prevent loading alert rules when no sufficient permissions provided

* Improve add and edit rule permissions

* Add new rule CTA button for non-editors

* Update mock

* Fix imports
2022-04-19 18:43:33 +02:00
Ivana Huckova
677327ea07
Show error when operations, but no stream selector (#47890) 2022-04-19 16:54:08 +02:00
Isabella Siu
992c0604f9
CloudWatch: add dimensions component to variable editor (#47596) 2022-04-19 10:50:18 -04:00
Andres Martinez Gotor
2d8d9bc137
AzureMonitor: Fix Microsoft.ClassicCompute/domainNames namespace (#47877) 2022-04-19 16:23:52 +02:00
Gilles De Mey
69eb6efd6e
Alerting: add confirmation modal for deleting notification policies (#47819) 2022-04-19 15:55:54 +02:00
Ivana Huckova
a068712ac2
Loki: Updates to raw query and run query button (#47874)
* Loki: Create toggle-able raw query

* Update name
2022-04-19 15:29:40 +02:00
Ivana Huckova
2aa6f4d17b
Loki: Fix showing of default visual query only if no expression (#47764)
* AutoSizeInput: Fix updating of value

* Update

* Revert "Update"

This reverts commit a3b527e0c6.

* Revert "AutoSizeInput: Fix updating of value"

This reverts commit d4b4ae0a10.

* Fix showing of default visual query only if no expression

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderContainer.tsx

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderContainer.tsx

* Update

* Update
2022-04-19 15:29:27 +02:00
Peter Holmberg
4570615afc
Alerting: Display alert instances instead of alert rules when creating silence (#47396)
* modify matchers util for instances

* filter alerts

* change label to include instances

* re add empty case
2022-04-19 15:08:19 +02:00
Ashley Harrison
bb5f77703c
prevent horizontal scrollbar on firefox during expand animation (#47758) 2022-04-19 10:31:59 +01:00
Joe Blubaugh
7d5cb170c6
Alerting: Sort StateHistoryItem after fetch instead of on render. (#47842)
PR #47674 attempted to sort a read-only managed async array. This change
moves the sort logic to the fetch code so sort happens once on fetch, to
a mutable array, rather than trying on each render for an immutable
array.

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-19 16:05:28 +08:00
Shirley
4f26129aa4
CloudWatch: Run query on blur in logs query field (#47454)
* Cloudwatch: add test to ensure RunQuery is fired onBlur of LogQuery

Also remove the `onBlur` prop for the `QueryField` in `LogsQueryField` since `QueryField` is configured to re-run
queries `onBlur` by default.

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-04-18 18:05:10 +00:00
Adela Almasan
858a1bd24e
Geomap: Add color scale in legend (#47803)
Added color scale in geomap legend
2022-04-18 09:19:20 -05:00
Joe Blubaugh
516c8b60ee
Unified Alerting: Stable order for state history annotations (#47674)
This change sorts the State History list returned by the backend by the
id in addition to the timeEnd and time fields by which it is
already sorted. This results in a stable view of the State History
table.

Fixes #45873

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-18 10:42:45 +08:00
Florian Cassayre
d4f7ea9f01
Chore: Fix typos (#47816) 2022-04-15 14:10:34 +02:00
Josh Hunt
720c6aac62
Dashboard: Add vertical spacing between variables when they wrap (#47762) 2022-04-15 11:05:53 +00:00
ying-jeanne
24468fdd67
Swagger: update swagger for datasource proxy api (#47690)
* update the swagger for datasource proxy api

* add enterprise spec changes
2022-04-15 10:31:54 +03:00
Eric Leijonmarck
b43e9b50b4
Service accounts: RBAC the service account UI (#47788)
* WIP

* fix: bug for saving name did not remove edit

* refactor: better error msg

* Display the column Roles even when user can't see the role picker

* Remove spaces when building the search query request

* Disable Edit button and fix token addition and deletion

* Fix the error message text

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-04-14 23:06:08 +01:00
Torkel Ödegaard
a126c07e54
DashboardPage: Remember scroll position when coming back panel edit / view panel (#47639)
* DashboardPage: Remember scroll position when coming back panel edit / view panel

* Use scollElement callback

* Fixed ts issue
2022-04-14 19:58:08 +02:00
Kristina
ab4c7f14aa
Explore: Follow up NoData work (#47745)
* Use theme styles and add basic test for rendering

* Use util function for response
2022-04-14 10:22:09 -05:00
Torkel Ödegaard
057ff5bcf5
Prometheus: Query builder UX tweaks and feedback link (#47655)
* Prometheus: Query builder UX tweaks and feedback link

* Remove .

* Fixed link

* added option to hide feedback links

* feedback link setting name change

* move config check

* fixed ts issue
2022-04-14 15:18:03 +02:00
Nathan Rodman
c63086822d
Alerting: Add FGAC to alerts tab in panel editor (#47732)
* add FGAC for alert panel tab

* add test for panel tabs

* Refactor condition

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-04-14 14:19:15 +02:00
Ieva
e50bd5cac8
Access control: expose SA frontend to users with the right permissions (#47727)
* expose frontend to users with permissions

* cover the ui endpoints

* fix permissions
2022-04-14 12:40:15 +01:00
Torkel Ödegaard
6f31a69bfd
QueryEditorRow: Show query errors next to query in a consistent way across Grafana (#47613)
* Show query errors under each query row

* Testing a more plain error box

* Font size

* Make it green

* Nit UI

* Slight simplification of condition

* New design

* Update

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-04-14 12:57:56 +02:00
Ivana Huckova
5df05e31bb
Loki: Use single string expr as a state for the visual editor (#47566)
* Loki: Use expr as state for visual editor

* Loki: Use query with line filter as default for visual editor

* Refactor based on feedback

* fix background for query text row

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-04-14 10:59:39 +02:00
Torkel Ödegaard
e3590e1a9b
Panels: Use the No value option when showing the no data message (#47675)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring

* NoData: Use field config No value option as text when display no data message

* Use PanelDataErrorView in TabelPanel

* Add PanelDataErrorView to PieChart

* Updated
2022-04-14 10:10:03 +02:00
Ryan McKinley
17e44c306c
Heatmap: hover legend regardless of tooltip state (#47600) 2022-04-13 20:45:30 -07:00
Ieva
a245531f0c
Access control: service account role check (#47710)
* forbid setting role higher than user's role

* change response code

* can assign API key permissions to non-admin users

* add: assign viewer role directly upon creation

* refactor: add AddSATcommand infavor of AddAPIkey

* refactor: frontend fixes for ServiceAccountToken

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
2022-04-13 18:11:03 +02:00
Leon Sorokin
dfdfe3f428
TimeSeries & BarChart: refactor stacking (#47373)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-13 10:29:03 -05:00
Konrad Lalik
a30ab51550
Alerting: FGAC for alert rule view and edit page (#47441)
* Add permission check to the find route, add query not accessible warning for the view page

* Hide grafana or mimir rule buttons depending on user's permissions

* Add grafana and cloud read rules checking on the alert rules list view

* Improve missing data source handling, refactor edit and remove permissions handling

* Add tests for rule edit permissions

* PR feedback
2022-04-13 17:19:54 +02:00
Connor Lindsey
939a778111
NodeGraph: Detect dataframes more accurately based on fields (#47213)
* NodeGraph: Detect dataframes more accurately based on fields

* Make get fields case insensitive

* Update node graph docs
2022-04-13 17:18:40 +02:00
Alex
6db470c11e
Explore: no data returned (#46987)
* Explore: no data message

display no data text when query executed succesfully but no data was
returned

* Explore: 'no-data' display logic and styling fix

* pipeline trigger

* Revert "pipeline trigger"

This reverts commit f08d246ba767e66344ad252577523f391832ec18.

* Add more parameters for when to show no data

* Change check to use frame length

Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-04-13 10:17:07 -05:00
Andres Martinez Gotor
a57716f868
AzureMonitor: Include macros and template variables as suggestions (#47689) 2022-04-13 15:56:32 +02:00
kay delaney
38809d73c2
Nav: Icon clickable area fills all available space (#47334)
Closes #47255
2022-04-13 14:41:48 +01:00
Konrad Lalik
d7516f11b3
Add permission checking to alert rules in the folders view (#47686) 2022-04-13 14:05:29 +02:00