Commit Graph

14730 Commits

Author SHA1 Message Date
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
Ieva
4f4b1cb5ea
Access control: hide team role picker if user doesn't have access to it (#45068)
* hide team role column

* hide or disable the role picker as needed

* add SWL filtering for role listing
2022-02-08 16:38:13 +00:00
Kristina
4e38ac9cf7
Remove return to panel button and related code (#45018) 2022-02-08 10:20:22 -06:00
Andrej Ocenas
a58e6ab622
TraceView: refactor UI components injection (#44289)
* Remove UIDivider

* Update TracePageSearchBar buttons

* Remove UIButton

* Remove UIInput

* Remove LoadingIndicator

* Remove UIIcon

* Remove UITooltip

* Remove UIDropdown

* Remove UIMenu
2022-02-08 17:14:33 +01:00
Konrad Lalik
1cf48618de
Alerting: Improve Contact Points error handling (#44888)
* Add 400 and 408 errors handling to display useful error message

* Add generic error handling

* Improve type guard
2022-02-08 17:08:27 +01:00
Dominik Prokop
ffea53f2f6
TimeSeries: Add support for negative Y and constant transform (#44774)
* add negative y config

* Handle negative y and constant transform in Timeseries panel

* Typechecks

* Add migration from old graph panel

* Docs update

* Revert "Add migration from old graph panel"

This reverts commit 33b5a90b66.

* Revert VizLegendItem changes

* Automatically separate positive and negative stacks within a group

* Update packages/grafana-ui/src/components/VizLegend/VizLegend.story.tsx

* Remove SeriesLabel component

* Update docs/sources/visualizations/time-series/_index.md

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

* Update docs/sources/visualizations/time-series/_index.md

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

* Leftover reverts

* Don't crate bands (for now0 for negative -y stack

* Add docs note about transform being only available as an override

* Fill negative bands in reversed direction

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-08 07:27:02 -08:00
Gábor Farkas
2c0030b1b4
logs-volume: remove custom timeout (#45041)
* logs-volume: remove custom timeout

* make error message a little better
2022-02-08 15:39:09 +01:00
Kristina
c5f0701707
Reduce spacing for Explore/Logs switches (#44935) 2022-02-08 08:21:34 -06:00
Eric Leijonmarck
79340c087f
Add number of tokens to the service accounts view (#44919)
* feat: add serviceaccountDTO

* WIP

* feat: listing number of tokens for a given service account

* nit: removed fmt

* Update pkg/services/serviceaccounts/database/database.go

* Update public/app/features/serviceaccounts/ServiceAccountsListPage.tsx

* fixes

* align DTOProfile data to the frontend

* reviewed myself fixes

* fix: tests fix
2022-02-08 14:31:34 +01:00
Sofia Papagiannaki
35fe58de37
API: Extract OpenAPI specification from source code using go-swagger (#40528)
* API: Using go-swagger for extracting OpenAPI specification from source code

* Merge Grafana Alerting spec

* Include enterprise endpoints (if enabled)

* Serve SwaggerUI under feature flag

* Fix building dev docker images

* Configure swaggerUI

* Add missing json tags

Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-08 13:38:43 +01:00
J Guerreiro
8c49e96439
ServiceAccounts: Add token view for Service Accounts (#45013)
* fix SA creation scope

* add writer action to SA fixed role

* ServiceAccounts: Add token table to SA detail page

* ServiceAccounts: Allow deletion of tokens from token table

* refactor service account page

* avoid using store for delete
2022-02-08 11:35:15 +00:00
Alex Khomenko
d21abdfe77
Feature Highlights: Refactor report nav highlight (#44765)
* Remove UpgradeBox from report nav

* Add children prop

* Update icon

* Update styles

* Update text

* Add pro badge to main nav

* Remove redundant span

* Update secondaryAction
2022-02-08 09:53:57 +02:00
Hugo Häggmark
9e1cb8c12a
LibraryPanels: Removes save errors for panels changed to library panels (#45033) 2022-02-08 06:55:00 +01:00
Josh Hunt
6baf38e84b
Variables: Fix crash when changing query variable datasource (#44957)
* Variables: refactor variable editor state to dispatch typed & atomic extended props

* Mock variable editor in tests

* Make dataSources mandatory in AdHocVariableEditorState

* nit
2022-02-07 23:52:07 +01:00
Josh Hunt
1c6eca09bb
Variables: Explicitly type variable editor extended state (#44749)
* Narrow Variable editor state using selector functions

 - Explicitly type "extended" editor state in editor/reducter.ts using a union
 - Create selectors to narrow the types, using unique properties from each extended state to discriminate the union
 - Update DataSourceVariableEditor to use new style of redux connector
 - Update variable editor components to use new selectors

* fix tests

* Make adhoc variable infoText optional, because it is!

* Add AdHocVariableEditor tests

* DataSourceVariableEditor tests

* comment

* reset

* Wrote tests for selectors \(that actually caught a bug, whodathunkit)

* fix stray types and lint issues

* Rename selector functions
2022-02-08 09:31:42 +11:00
Nathan Marrs
ed7b9905c2
BarChart: Fix Sticky Tooltip (#45017) 2022-02-07 23:26:27 +01:00
Agnès Toulet
bdac6576e4
Feature Highlights: add highlight to toolbar button and add upgrade modal (#44645)
* Feature Highlights: add highlight to toolbar button and add upgrade modal

* replace hideTitle attribute by making title optional

* update modal design

* remove unused updates
2022-02-07 16:04:15 +01:00
Ivana Huckova
2250c229d6
Prometheus: Add multi-word search and higlight to metric selector (#44906)
* Prometheus: Add multi-word search and higlight to metric selector

* Remove redundant test

* Remove redundant test id

* Update PromQueryBuilder test

* Match only words split with space
2022-02-07 15:18:17 +01:00
Eric Leijonmarck
334c29eebf
feat: creation of service account (#44913)
* feat: creation of service account

* added back button for the details page

* refactor: remove unused file, renamed fields

* oppps
2022-02-07 14:12:39 +01:00
Piotr Jamróz
bfe66a1780
Fix conflicts incorrectly resolved in 8fabe8b6a7 (#44975) 2022-02-07 13:36:16 +01:00
Torkel Ödegaard
f92ab9bc72
Prometheus: Adds missing options to the new query builder (#44915)
* Prometheus: Query builder legend format, first working state

* Added format option

* Working options section

* Wrapping stuff up removing old stuff

* Fixed ts issues

* Review fixes

* Added unit tests for preview toggle
2022-02-07 13:32:36 +01:00
Marcus Andersson
eb9d85a2bf
Deprecation: use locationService in favor of getLocationSrv (#44813)
* deprecated

* updating documentation.

* added deprecation notice.

* Replacing deprecated getLocationSrv.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* updating according to feedback.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.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-02-07 09:37:56 +01:00
Gábor Farkas
560c773905
loki: run some queries through the backend (#44729) 2022-02-07 08:43:48 +01:00
Nathan Marrs
3a2e3267ba
BarChart: Add support for data links (#44932) 2022-02-04 18:31:00 -08:00
Leon Sorokin
b07345e57e
StateTimeline: add spanNulls editor (#44811) 2022-02-04 16:57:11 -06:00
Piotr Jamróz
a40fa83893
Query History: Remove unused properties (#44904)
* Remove unused properties

* Fix unit tests

* Fix unit tests
2022-02-04 17:05:46 +01:00
Gilles De Mey
1680e284e5
Alerting: validate namespace and groupname for Grafana manages and Lotex alerts (#44872) 2022-02-04 15:04:11 +01:00
Karl Persson
3cf31451ec
Access control: Reduce number of API calls for role picker (#44905)
* Restucture state for TeamRolePicker and UserRolePicker

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-04 14:54:42 +01:00
Piotr Jamróz
6bb6b13379
Query History: Refactor persistence layer (#44545)
* Extract Rich History storage into two separate implementations

Implement getting all entries and adding a new entry

* Add deleting rich history items

* Add editing rich history

* Simplify RichHistoryStorage API

* Reorganize methods

* Rename variable

* Remove feature toggle

* Fix TS errors

* Fix tests

* Clean up

* Clean up only when adding new entry

* Fix showing a warning message

* Use enum instead of a string

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

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

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

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

* Improve readability

* Rename files and remove inferred return types

* Use const over a var

* Remove unsed files

* Remove redundant null check

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

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

* Fix linting issues

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-04 12:46:27 +01:00
Ashley Harrison
9e52361c1e
Accessibility: Fix text selection when using FocusScope (#44770)
* Add tabIndex={-1} to places using focusScope to allow for text highlighting

* use useDialog

* don't need explicit tabIndex anymore

* remove duplicate spreading of props
2022-02-04 11:20:18 +00:00
Ivana Huckova
e7a0e69153
Loki: Use explore query field unless new query builder feature toggle is enabled (#44858)
* Loki: Fix using of Explore editor in Explore

* Add test and remove Explore fields in module

* Update tests
2022-02-04 12:19:18 +01:00
Josh Hunt
f1b2e2b7ff
Chore: More variable e2e tests (#44803)
* Add Datasource variable e2e tests

* Update other tests

* Fix names/comments in tests

* Add Interval variable tests

* fix typo
2022-02-04 12:37:01 +11:00
Josh Hunt
de7a920967
Chore: Suppress messages and logs from tests (#44629)
* Suppress "not wrapped in act()" warning in UserPicker test

* Add menuShouldPortal to AmRoutesExpandedForm to suppress deprecation warning

* use forwardRef in alerting ActionIcon to suppress ref warning

* Add menuShouldPortal to alerting GroupBy to suppress deprecation warning
2022-02-04 12:36:44 +11:00