Commit Graph

14762 Commits

Author SHA1 Message Date
Ivana Huckova
9e2caa9ddc
Prometheus: Add hints to query builder (#45288)
* Add hints to query builder

* Move Query hints to own component

* Use replace 5m with  in rate queries

* Remove unused prop
2022-02-11 16:50:35 +01:00
Alex Khomenko
574f609550
Init node item (#45218) 2022-02-11 16:18:33 +01:00
Connor Lindsey
3da0434e64
Tempo: Update service graph linked queries to use rate_interval and group histogram (#45248) 2022-02-11 07:58:10 -07:00
Ashley Harrison
378ce15418
Stub console.warn (#45311) 2022-02-11 14:56:25 +00:00
kay delaney
10cc2fd6bc
Chore: Add types for OAuth settings in config (#45247) 2022-02-11 13:54:24 +00:00
Torkel Ödegaard
aa6cee1072
Prometheus: Specific code mode view that has no options, instead sharing options with builder (#45260)
* Prometheus: Adding a slimmed down code mode for new prometheus query ux

* Show Both option in Explore

* Prometheus: Adding query defaults handling

* More tweaks

* Fixing defaults and logic for when to show exemplars toggle

* Fixing tooltip text

* Set exemplars to false when setting query type instant

* Updated test
2022-02-11 14:43:52 +01:00
Gábor Farkas
59c5f14a59
loki: handle parsing infinity in loki response (#45097) 2022-02-11 14:28:11 +01:00
Marcus Efraimsson
0e8a5407d1
Postgres/MySQL/MSSQL: Remove usage of legacy timeSrv (#45241) 2022-02-11 13:36:11 +01:00
Torkel Ödegaard
089d6d7f7a
Alerting: Fixing minor styling issues (#45236) 2022-02-11 12:34:32 +01:00
matt abrams
8c47373d74
LibraryPanels: Prevent long descriptions and names from obscuring the delete button (#45190)
* fix library panel description wrapping

* make panel name wrap
2022-02-11 10:57:22 +00:00
Ieva
6fb3aac2e1
Access control: team UI improvements with FGAC (#45255)
* show teams page for user who can't list teams but can create teams

* Fixing buttons and routes

* Small refactor

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-02-11 09:58:37 +00:00
Victor Marin
a12f2e1d19
TablePanel: Do not prefix columns with frame name if multiple frames and override active (#45174)
* Fix bug where table panel shows column names prefixed with frame name

* simplify && fix tests

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-02-11 11:47:48 +02:00
Torkel Ödegaard
cc49537965
Alerting: Refactor ActionIcon to use our normal Button and LinkButton components (#45227)
* Alerting: Refactor ActionIcon to use our normal Button and LinkButton components

* Fixed test

* Fixed test
2022-02-11 10:12:26 +01:00
Leon Sorokin
9af6202a7f
Fetch: parse JSON off-main-thread (async) based on response Content-Type (#45188) 2022-02-10 11:45:41 -06:00
J Guerreiro
cb461d931f
ServiceAccounts: allow deleting from service account list (#45239)
* ServiceAccounts: allow deleting from service account list

* Make delete confirmation more explicit
2022-02-10 18:21:04 +01:00
Karl Persson
d2b9da9dde
Access control: Support uids for resource permissions (#45226)
* add middleware to solve uid -> id for requests
2022-02-10 17:47:48 +01:00
Andrej Ocenas
642f0a250d
Prometheus: Use single string expr as a state for the visual editor (#45232)
* Use just expr string as a state for whole editor

* Fix patterns

* Fix tests
2022-02-10 16:55:44 +01:00
Ashley Harrison
ec48b81388
Unescape regex string (#45137) 2022-02-10 14:45:39 +00:00
Will Browne
fd5e968bc1
test (#45240) 2022-02-10 15:23:08 +01:00
Jack Westbrook
979907e9dd
Chore: Set tsconfig target to ES6 (#44842)
* chore(tsconfig): update grafana/tsconfig to 1.2.0 for outputting es6

* rewrote the unsubscription part to use first().

* test: update failing tests to work with es6 output

* removed bug where we dispatch a promise instead of an array of ritch history.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-02-10 14:37:39 +01:00
Erik Sundell
57ecabf319
order subscriptions by name (#45228) 2022-02-10 14:27:12 +01:00
J Guerreiro
7b397184a0
ServiceAccounts: add role picker to service accounts list (#45127) 2022-02-10 14:04:07 +01:00
Piotr Jamróz
e7605ad974
Query History: Split data and view models (#44922)
* Remove unused properties

* Fix unit tests

* Fix unit tests

* Split data models

* Simplify updating items in rich history

* Update tests

* Fix starring an item and add a unit test

* Move the converter to a separate file and add unit tests

* Convert a private function to an inline function

* Add more docs and clean up the code

* Update public/app/core/history/localStorageConverter.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/core/utils/richHistory.test.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Use template literals over explicit casting

* Split updateRichHistory to three separate functions

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-10 13:59:43 +01:00
Torkel Ödegaard
374681b546
Popovers: Improve contrast by darkening shadow and changing border to medium (#45136)
* Popovers: Improve contrast by darkening shadow and changing border to medium

* Updated sass theme

* Revert back to weak border
2022-02-10 13:52:23 +01:00
Ivana Huckova
6bc527a211
Add prometheus operation ids (#45216) 2022-02-10 13:40:02 +01:00
Shahar Mor
3eac34f5f3
Kiosk: Reuse kiosk module (#44625)
* Reuse kiosk module, centralize kiosk query handling

* update kiosk tests to set correct kiosk value

* fix DashboardPage kiosk test

* remove unused UrlQueryValue, revert import change
2022-02-10 11:54:50 +00:00
Torkel Ödegaard
f2795981c6
Prometheus: Fix test warnings (#45206) 2022-02-10 12:23:56 +01:00
Torkel Ödegaard
68eb18c758
Prometheus: Support with aggregations without labels (#45160) 2022-02-10 11:48:48 +01:00
Shirley
5edcc2e795
Cloudwatch: Use generic null-insertion mechanism (#43507)
* Cloudwatch: Fix nil values for a period gap in metrics

* Use fields periods for intervals
2022-02-10 10:17:45 +01:00
Josh Hunt
c7a5d2c5c7
Chore: Remove our typeAsJestMock in favor of jest.mocked (#45114) 2022-02-09 23:50:59 +01:00
Joey Tawadrous
10232c7857
InfluxDB: backend migration (run query in explore) (#43352)
* InfluxDB backend migration

* Multiple queries and more

* Added types

* Updated preferredVisualisationType

* Updated model parser test to include limit,slimit,orderByTime

* Added test for building query with limit, slimit

* Added test for building query with limit, slimit, orderByTime and puts them in the correct order

* Add test: Influxdb response parser should parse two responses with different refIDs

* Moved methods to responds parser

* Add test to ensure ExecutedQueryString is populated

* Move functions out of response parser class

* Test for getSelectedParams

* Merge cases

* Change to const

* Test get table columns correctly

* Removed unecessary fields

* Test get table rows correctly

* Removed getSeries function

* Added test for preferredVisualisationType

* Added test for executedQueryString

* Modified response parser

* Removed test

* Improvements

* Tests

* Review changes

* Feature flag rename and code gen
2022-02-09 18:26:16 +00:00
Artur Wierzbicki
d60c2dff40
Chore: export closestIdx from StreamingDataFrame (#45162)
* #41993: export closestIdx function

* #41993: formatting

* #41993: formatting v2
2022-02-09 22:12:24 +04:00
Nathan Rodman
f019ee886a
Alerting: fix act warnings in alerting tests (#45113)
* fix act warnings in alerting tests

* remove unnecessary angular dep
2022-02-09 08:47:50 -08:00
Andrej Ocenas
071ff0b399
Prometheus: Query parsing for visual editor (#44824)
* Add parsing from string to visual query

* Add comments

* Parse expr when changing to builder

* Support template variables

* Report parsing errors

* More error handling

* Add ts-ignore for debug func

* Fix comments
2022-02-09 17:16:14 +01:00
Yuriy Vidineev
f016e19d1a
Email: change the year in templates (#45116)
* change the year in email templates

* Email: change the year in templates

* Email: change the year in templates
2022-02-09 15:53:36 +01:00
Connor Lindsey
e94b7f45a1
Tempo: Fix visual service graph bug by setting upper bound for failed arc (#45009)
* Fix visual service graph bug by setting upper bound for failed arc calculation
2022-02-09 07:25:39 -07:00
Alexander Zobnin
49790eac32
Access control: Fix role picker after roles update (#44978)
* Access control: Fix role picker after roles update

* Refactor, use useAsyncFn()

* Review suggestions
2022-02-09 16:42:46 +03:00
Hugo Häggmark
f67e02cb2f
Chore: Removes console.log in annotations_srv.test.ts (#45135) 2022-02-09 14:14:37 +01:00
Hugo Häggmark
c25031fa49
Chore: Remove console.log in fetch.test.ts (#45134) 2022-02-09 14:11:30 +01:00
Hugo Häggmark
e4534deab3
Chore: Reduce console output in NavBarItem.test.tsx (#45139)
* Chore: Reduce console ouput in NavBarItem.test.tsx

* Chore: remove async
2022-02-09 14:07:28 +01:00
kay delaney
b615d0558b
DashboardQueryEditor: Refactor and convert to functional component (#45002)
* DashboardQueryEditor: Refactor and convert to functional component
2022-02-09 11:07:36 +00:00
Alexander Zobnin
089a111858
Service accounts: Add token UI (#45081)
* Initial token creation dialog

* Use date picker for expiration date

* Reset state after closing modal

* Create token flow

* Move modal to separate component

* Minor refactor

* Apply suggestions from code review

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

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-02-09 11:38:46 +01:00
Agnès Toulet
ee6f8b6cd9
Feature Highlights: add RudderStack events (#45099)
* add RS events for PRO badge

* part 2

* fix team sync events

* clean up ProBadge
2022-02-09 11:18:27 +01:00
Artur Wierzbicki
a025109647
Dash previews: populate crawler queue from SQL query (#44083)
* add SQL migrations

* dashboard previews from sql: poc

* added todos

* refactor: use the same enums where possible

* use useEffect, always return json

* added todo

* refactor + delete files after use

* refactor + fix manual thumbnail upload

* refactor: move all interactions with sqlStore to thumbnail repo

* refactor: remove file operations in thumb crawler/service

* refactor: fix dashboard_thumbs sql store

* refactor: extracted thumbnail fetching/updating to a hook

* refactor: store thumbnails in redux store

* refactor: store thumbnails in redux store

* refactor: private'd repo methods

* removed redux storage, saving images as blobs

* allow for configurable rendering timeouts

* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale

* use sql-based queue in crawler

* ui for marking thumbnails as stale

* replaced `stale` boolean prop with `state` enum

* introduce rendering session

* compilation errors

* fix crawler stop button

* rename thumbnail state frozen to locked

* #44449: fix merge conflicts

* #44449: remove thumb methods from `Store` interface

* #44449: clean filepath, defer file closing

* #44449: fix rendering.Theme cyclic import

* #44449: linting

* #44449: linting

* #44449: mutex'd crawlerStatus access

* #44449: added integration tests for `sqlstore.dashboard_thumbs`

* #44449: added comments to explain the `ThumbnailState` enum

* #44449: use os.ReadFile rather then os.Open

* #44449: always enable dashboardPreviews feature during integration tests

* #44449: remove sleep time, adjust number of threads

* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`

* #44449: review fix: automatic parsing of thumbnailState

* #44449: lint fixes

* #44449: review fix: prefer `WithDbSession` over `WithTransactionalDbSession`

* #44449: review fix: add a comment explaining source of the filepath

* #44449: review fix: added filepath validation

* #44449: review fixes https://github.com/grafana/grafana/pull/45063/files @fzambia

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-09 13:23:32 +04:00
Torkel Ödegaard
069f772c6f
Theme: Update generated theme (#45118) 2022-02-09 08:38:37 +01:00
Leon Sorokin
b3b1f945b0
BarChart: fix excessive re-renders during mousemove and panel resize (#45027)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-02-08 16:32:23 -06:00
Torkel Ödegaard
7c0b453e19
Tooltips: Make tooltips non interactive by default (#45053)
* Tooltips: Make tooltips non interactive by default

* More updates and cleanup

* Update

* Make time range picker tooltip interactive

* Fix issue

* Trying to make Receivers test faster

* Make JSONCell tooltip interactive
2022-02-08 22:58:20 +01:00
Isabella Siu
16e001e762
CloudWatch: Use single timeout for log queries (#44848) 2022-02-08 15:43:37 -05:00
Roy C
3d0cff5410
Alerting: remove error banner when Prometheus ruler is not supported (#44571) 2022-02-08 21:03:14 +01:00
Artur Wierzbicki
424a79273f
Chore: Clean up logs and warnings from Edge unit tests (#45050)
* #45026: mock console log output in tests

* #45026: update yarn.lock file
2022-02-08 20:45:20 +04:00