Commit Graph

18075 Commits

Author SHA1 Message Date
Andrej Ocenas
c7a1216cf6
TraceView: Add key and url escaping of json tag values (#64331) 2023-03-08 11:20:08 +01:00
renovate[bot]
523f675dd8
Update Monthly patch updates (#64323)
* Update Monthly patch updates

* don't update dangerously-set-html-content

* run prettier

* fix types

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-08 09:38:06 +00:00
Brendan O'Handley
9b6e531549
Prometheus: Metric encyclopedia (#63423)
* add metric encyclopedia feature toggle and component

* remove unused button

* move file, add test file

* add tests

* add pagination and tests

* test with 10,000,000 metrics

* remove unused import

* add filter by type

* search alphabetically and add switch to exclude metrics with no metadata

* add suggested functions and filter for functions

* allow user to select variables in encyclopedia

* fix style and tests

* add fuzzy search by either metric name or all metadata

* if missing metadata, remove metadata fuzzy search option, exclude metadata, and filter by type

* add encyclopedia feature tracking

* indicate that metrics are filtered by labels

* handle metric singular or plural

* add tooltips and fix language

* add filtering tests

* change 'search' to 'browse'

* remove functions filter and tests as not part of work flow

* add m.e. button and selected metric is a tag

* fix hanging search and update styles, padding, labels, and groupings

* small performance improvements

* fix tests

* add backend metrics query option

* add loading spinner for start load and backend search

* autofocus search input

* Update docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md

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

* run prettier

* run prettier

* fix text for feature toggle

* for license check since https://cla-assistant.io/check/grafana/grafana?pullRequest=<PR#> is not working

* fixing tests

* fix feature toggle docs

* fix feature toggle

* fix feature toggle

* add owner to feature toggle

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-03-07 13:41:05 -05:00
Ieva
1b6b5dd7e9
AuthN: use the default login icon if no icon is specified (#64327)
use the default login icon if empty string passed in
2023-03-07 10:14:36 -05:00
Timur Olzhabayev
20b79b41eb
Feat: Changing link destination for get more plugins (#63517)
* Changing link destination for get more plugins

* Changing codeowners to plugins platform frontend

* Remove unused variable
2023-03-07 15:16:27 +01:00
Piotr Jamróz
a7238ba933
Explore: Support mixed data sources for supplementary query (#63036)
* Consolidate logs volume logic (full range and limited)

* Fix showing limited histogram message

* Test passing meta data to logs volume provider

* Improve readability

* Clean up types

* Add basic support for multiple log volumes

* Move the comment back to the right place

* Improve readability

* Clean up the logic to support Logs Samples

* Update docs

* Sort log volumes

* Provide title to logs volume panel

* Move logs volume cache to the provider factory

* Add helper functions

* Reuse only if queries are the same

* Fix alphabetical sorting

* Move caching out of the provider

* Support errors and loading state

* Remove unused code

* Consolidate supplementary query utils

* Add tests for supplementaryQueries

* Update tests

* Simplify logs volume extra info

* Update tests

* Remove comment

* Update tests

* Fix hiding the histogram for hidden queries

* Simplify loading message

* Update tests

* Wait for full fallback histogram to load before showing it

* Fix a typo

* Add feedback comments

* Move feedback comments to github

* Do not filter out hidden queries as they may be used as references in other queries

* Group log volume by refId

* Support showing fallback histograms per query to avoid duplicates

* Improve type-checking

* Fix supplementaryQueries.test.ts

* Fix logsModel.test.ts

* Fix loading fallback results

* Fix unit tests

* WIP

* Update deprecated styles

* Simplify test

* Simplify rendering zoom info

* Update deprecated styles

* Simplify getLogsVolumeDataSourceInfo

* Simplify isLogsVolumeLimited()

* Simplify rendering zoom info
2023-03-07 15:00:11 +01:00
juanicabanas
498d7ae914
PublicDashboards: Email validation on submit (#64238) 2023-03-07 10:14:31 -03:00
Matias Chomicki
ede3e9e5c4
Range Splitting: Process instant queries as an independent query group (#64049)
* Query splitting: enable instant queries

* Range splitting: send instant queries as another request group

* Range splitting: increase grouped splitted requests stability

We were defaulting to the `0` index as the first group for the next request batch, but there was no guarantee that the group `0` had a `.partition` entry for `requestN-1`. Now we find the first defined and use that index as the next starting group.

* Range splitting: update unit test
2023-03-07 07:44:13 -05:00
Alex Khomenko
8999de4313
Cloudwatch: Use generated TS types (#63166)
* Add veneer

* Fix queries

* Remove redundant type

* Fix todos

* Sync and fix some todos

* Revert unrelated changes

* Revert unrelated changes[2]

* Revert unrelated changes[3]
2023-03-07 14:39:52 +02:00
Matias Chomicki
69d3ae8ec1
Range Splitting: ignore empty queries from splitting and fix result resetting (#64053)
Range splitting: ignore empty queries from splitting
2023-03-07 13:09:55 +01:00
Matias Chomicki
accef84ca5
Range splitting: Call subscriber.next only when there are new results to report (#64171) 2023-03-07 13:05:40 +01:00
Ashley Harrison
5b8c2f494d
Chore: convert VariableOptions to use emotion instead of scss (#64135)
convert VariableOptions to use emotion instead of scss
2023-03-07 11:13:57 +00:00
renovate[bot]
f579a63f8e
Update dependency msw to v1 (#64281)
* Update dependency msw to v1

* Fix breaking change

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-03-07 11:17:38 +01:00
Ivana Huckova
7b01668729
Logs sample: Fix scrolling for unwrapped log lines (#64163)
Fix scrolling for logs sample
2023-03-07 11:08:50 +01:00
juanicabanas
bceb1bb96d
PublicDashboards: Change disabled label in Audit Table (#64260) 2023-03-06 19:06:34 -03:00
Isabella Siu
4f3d64e8b7
CloudWatch: Make deeplinks work for us-gov and china regions (#64080) 2023-03-06 16:00:59 -05:00
juanicabanas
10476043ea
PublicDashboards: Reshare public dashboard to recipient API call (#64178) 2023-03-06 16:09:19 -03:00
Andre Pereira
3ebc604bb7
Trace View: Sticky trace view header (#64236)
* Sticky trace view header. Remove title from trace view container.

* Set background color of header as primary

* Remove search bar from trace view in dashboards when toggle is enabled
2023-03-06 19:04:51 +00:00
Galen Kistler
b9ebd5757a
TimeSeries: Fix overflowing exemplar modals causing content shifts (#64037)
*  fix overflowing exemplar modals causing content shifts
2023-03-06 11:34:37 -06:00
Andre Pereira
fd37ff29b5
Tempo: New Search UI using TraceQL (#63808)
* WIP of creating new components to support the Search tab using TraceQL

* Search fields now require an ID. Added duration fields to new Search UI

* Distinguish static from dynamic fields. Added dynamic tags input

* Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query.

* Hold search state in TempoQuery to leverage state in URL. Moved types to schema file

* Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section

* Support multiple values using the regex operator and multi input

* Delete dynamic filters

* Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected

* Added tests for SearchField component

* Added tests for the TraceQLSearch component

* Added tests for function that generates the query

* Fix merge conflicts

* Update test

* Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~

* Disable clear button for values

* Changed delete and add buttons to AccessoryButton. Added descriptions to operators

* Remove duplicate test

* Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query.

* Fix support for custom values when isMulti is enabled in Select

* Use toOption function
2023-03-06 16:31:08 +00:00
Sven Grossmann
5db0d14606
LokiContextUi: Add loading indicator (#64167)
add loading indicator to LokiContextUi
2023-03-06 17:25:04 +01:00
Joey
b6eb324139
Tempo: Config and doc updates (#64017)
* Config and doc upgrades

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update tags text

* Use service graph as a proper noun

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Yarn prettier

---------

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2023-03-06 16:03:29 +00:00
Gilles De Mey
282d021c53
Revert "Alerting: Fix alert form broken coming from panel (#64148)" (#64240) 2023-03-06 16:31:03 +01:00
Gilles De Mey
4e81aab60a
Alerting: Fix queries not being previewed in detail view (#64198) 2023-03-06 15:46:55 +01:00
Gilles De Mey
f36c431442
Alerting: Disable "Declare Incident" button for open-source editions (#64204) 2023-03-06 15:46:40 +01:00
Jack Westbrook
f82c57f281
Fix: Prevent freezing dashboard time range (#64212)
fix(extensions): create new object to prevent freezing dashboard time range
2023-03-06 13:43:03 +01:00
Giordano Ricci
24a4a24a89
Explore: Avoid changing queries twice when importing a query in mixed mode (#63804)
* Explore: avoid changing queries twice when importing a query in mixed mode

* move logic to thunk

* add tests

* improve tests
2023-03-06 10:40:39 +00:00
Torkel Ödegaard
95bd79ef4b
Scene: Set maxDataPoints for dashboard scene query runners (#63772) 2023-03-06 11:00:47 +01:00
Torkel Ödegaard
4bf23b7f5f
PanelData: move preProcessPanelData to @grafana/data (#63743) 2023-03-06 10:59:47 +01:00
Eric Leijonmarck
15fb7e99d9
Login: Fix sanitize input for signin url (#64203)
fix: sanitize input for signin
2023-03-06 09:54:30 +00:00
Victor Marin
211a999a2a
Fix scenario where tooltip shows wrong value (#64025)
* Fix scenario where tooltip shows wrong value

* refactor
2023-03-06 10:20:44 +02:00
Sonia Aguilar
a669b72641
Alerting: Fix alert form broken coming from panel (#64148)
Fix alert form broken coming from panel
2023-03-06 09:06:24 +01:00
Drew Slobodnjak
1aadafe7d8
Geomap: Fix route layer zoom behavior (#63409)
* Geomap: Fix Zoom Bug

* Add handling for case where no segments created

* Simplify segment checks and pull logic into utils

* Rename pixel variables

* Roll back change to raw data response json
2023-03-03 16:06:14 -08:00
Ryan McKinley
b7d8589588
FieldType: Add enum type and include it in testdata scenarios (#64059) 2023-03-03 13:37:56 -08:00
Brendan O'Handley
aed020d9b5
Influxdb: Fix missing columns with raw query (#64058)
* add selected columns to table when select object is not in query model because of rawQuery

* handle * and SHOW raw queries

* handle metricFindQuery

* Update public/app/plugins/datasource/influxdb/response_parser.ts

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* Update public/app/plugins/datasource/influxdb/response_parser.ts

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* Update public/app/plugins/datasource/influxdb/response_parser.ts

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-03-03 13:28:58 -05:00
Eric Leijonmarck
ad4b053231
API keys: Remove state hideAPIkeys and refactor interface to IsDisabled (#64018)
* remove state and refactor interface to IsDisabled

* update docs and span

* Update pkg/services/apikey/apikey.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-03-03 16:12:34 +00:00
Sven Grossmann
2076282064
Logs: Log samples not being ordered correctly (#64097)
* fix log samples being unsorted and multiple results when chunking

* use `SortDirection` enum

* changed to `sortDataFrame` to support other datasources than loki

* update tests

* change capitalization
2023-03-03 16:02:14 +01:00
Ashley Harrison
d61bcdf4ca
Chore: Pass signed user_hash to Intercom via Rudderstack (#63921)
* move analytics identifiers to backend

* implement hash function

* grab secret from env

* expose and retrieve intercom secret from config

* concat email with appUrl to ensure uniqueness

* revert to just using email

* Revert "revert to just using email"

This reverts commit 8f10f9b1bc.

* add docstring
2023-03-03 14:39:53 +00:00
Isabella Siu
59ac0a03fe
CloudWatch: Add account support to variable queries (#63822)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2023-03-03 09:26:14 -05:00
Virginia Cepeda
33f66e6350
Alerting: Show paused status in rules group accordion (#64068)
* Show paused status in group accordion

* Fix linting

* display number of paused alerts within normal label
2023-03-03 11:13:55 -03:00
Gilles De Mey
3468804ff5
Alerting: Allow downloading alert rules from subpath (#64136) 2023-03-03 14:34:06 +01:00
juanicabanas
c59682fad6
PublicDashboards: Paused or deleted public dashboard screen (#63970) 2023-03-03 10:12:29 -03:00
Sonia Aguilar
9765c98b3d
Alerting: Fix UI crashing when selecting custom grouping in alert panel (#64124)
Fix UI crashing when selecting custom grouping in alert panel
2023-03-03 06:59:36 -05:00
jcolladokuri
c840f6fb9d
adds link for credit on ARG dashboard (#63352)
* adds link for credit on ARG dashboard

* Update public/app/plugins/datasource/azuremonitor/dashboards/arg.json

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-03-03 11:07:30 +00:00
Gábor Farkas
192308aac7
loki: query splitting: better stats (#64105) 2023-03-03 04:58:28 -05:00
Matias Chomicki
b731540939
Log Components: Optimize style computing and re-renders in Row, Details, and Context (#63728)
* Log Details: grab parsed styles from parent

* Log Details Row: better memoization of style parsing

* Log Context: less re-renders

* Log Row Styles: memoize

* Log Row: use class method instead of anonymous function
2023-03-03 10:19:48 +01:00
李国忠
9521b0d2d2
Explore: Fix vector(5) syntax error in loki log explore (#63994)
* [fix] loki log explore : fix vector(5) err

* changelog

* changelog fmt

* rollback change log

* fix test and pretty fmt

* Update package.json

update lezer-logql depedency to 0.1.2

* Update package.json

fix conflict

➤ YN0000: │  "@grafana/monaco-logql@npm:^0.0.6":
➤ YN0000: │ @@ -21988,9 +21987,9 @@
➤ YN0000: │      "@grafana/experimental": 1.1.0
➤ YN0000: │      "@grafana/faro-core": 1.0.0-beta2
➤ YN0000: │      "@grafana/faro-web-sdk": 1.0.0-beta2
➤ YN0000: │      "@grafana/google-sdk": 0.0.4
➤ YN0028: │ -    "@grafana/lezer-logql": 0.1.1
➤ YN0028: │ +    "@grafana/lezer-logql": 0.1.2
➤ YN0000: │      "@grafana/monaco-logql": ^0.0.6
➤ YN0000: │      "@grafana/runtime": "workspace:*"
➤ YN0000: │      "@grafana/scenes": ^0.0.14
➤ YN0000: │      "@grafana/schema": "workspace:*"

* Upgrade lezer-logql

* fix logql test

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-03-03 10:09:34 +01:00
Gábor Farkas
fdc4973b77
loki: query chunking: consider refId when merging frames (#64103) 2023-03-03 10:06:25 +01:00
Jan-Otto Kröpke
c323a7cb13
Login: Allow custom name and icon for social providers (#63297) 2023-03-03 09:17:43 +01:00
juanicabanas
528dc28657
PublicDashboards: Add recipient uid to recipient list (#64076)
uid added for recipients
2023-03-02 17:15:56 -05:00
Adam Simpson
3498785184
AzureMonitor: Fix query variable migration (#63991)
* AzureMonitor: Fix query variable migration

Somehow the query object becomes "unwriteable" post 9.4. To workaround
this I clone the query object before doing any migrations which removes
the immutability and allows the migrations to function as they did.

Fixes #63943

* refactor deepClone out to keep object the same
2023-03-02 16:27:27 +00:00
Timur Olzhabayev
0b2dfaa710
Feat: Linking to plugin details page rather than externally for new datasources (#63499)
Changed links to help enterprise users install plugins directly via internal grafana catalog instead of linking out to grafana.com
2023-03-02 17:08:40 +01:00
Sonia Aguilar
9e1ea8c990
Alerting: Avoid printing [object][Object] in error message (#64023)
Avoid printing [object][Object] in error message
2023-03-02 10:48:44 -05:00
Jack Westbrook
8c8f584b41
Plugins: Extend panel menu with links from plugins (#63089)
* feat(plugins): introduce dashboard panel menu placement for adding menu items

* test: add test for getPanelMenu()

* added an unique identifier for each extension.

* added context to getPluginExtensions.

* wip

* Wip

* wiwip

* Wip

* feat: WWWIIIIPPPP 🧨

* Wip

* Renamed some of the types to align a bit better.

* added limit to how many extensions a plugin can register per placement.

* decreased number of items to 2

* will trim the lenght of titles to max 25 chars.

* wrapping configure function with error handling.

* added error handling for all scenarios.

* moved extension menu items to the bottom of the more sub menu.

* added tests for configuring the title.

* minor refactorings.

* changed so you need to specify the full path in package.json.

* wip

* removed unused type.

* big refactor to make things simpler and to centralize all configure error/validation handling.

* added missing import.

* fixed failing tests.

* fixed tests.

* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs

* removed the compose that didn't work for some reason.

* added tests just to verify that validation and error handling is tied together in configuration function.

* adding some more values to the context.

* draft validation.

* added missing tests for getPanelMenu.

* added more tests.

* refactor(extensions): move logic for validating extension link config to function

* Fixed ts errors.

* Update packages/grafana-data/src/types/app.ts

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

* Update packages/grafana-runtime/src/services/pluginExtensions/extensions.test.ts

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

* refactor(extensions): rename limiter -> pluginPlacementCount

* refactor(getpanelmenu): remove redundant continue statement

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2023-03-02 15:42:00 +01:00
Ludovic Viaud
5bd2fac9c8
InfluxDB: Update InfluxQL querybuilder to qualify identifiers (#62230) 2023-03-02 15:05:24 +01:00
Gilles De Mey
5412f8d414
Alerting: New notification policies view (#61952) 2023-03-02 13:49:38 +01:00
Torkel Ödegaard
27070c252d
ErrorHandling: Fixes issues with bad error messages (#63775) 2023-03-02 13:09:58 +01:00
Andres Martinez Gotor
c84cfd2b3f
Plugin query API: Handle multiple errors (#63553) 2023-03-02 11:25:50 +01:00
Joey
adcebcaf8c
Flame graph: Add context menu (#62705)
* Context menu

* Flame graph context menu improvements

* Move context menu state into flame graph

* Simplify logic

* Add test and rename to ContextMenuData
2023-03-02 09:47:56 +00:00
Matias Chomicki
40ac0fa14b
Query Splitting: Add support for multiple queries (#63663)
* Range splitting: group metric and logs queries

* Range splitting: intercalate logs and metric queries when > 1 queries

* Range splitting: fix possibly undefined error and remove console log

* Range splitting: update test imports

* Range splitting: add unit tests for multiple queries

* Query splitting: use lodash partition function

* Chore: rename variable

* Chore: attempt to improve readability
2023-03-02 10:32:45 +01:00
Andres Martinez Gotor
dc6d0a2bdb
Nav: Handle app plugin installation/uninstallation (#63706) 2023-03-02 09:50:01 +01:00
Ryan McKinley
a4fc8b9fca
Transformations: Support time format when converting time to strings (#63826) 2023-03-01 20:00:53 -08:00
Leon Sorokin
9314fe1056
BarChart: Only apply radius to topmost bar segment when stacking (#63906) 2023-03-01 17:17:55 -06:00
Ryan McKinley
fcffedbbf9
Search: Include panel_type in query (#63229) 2023-03-01 11:13:09 -08:00
Kristin Laemmert
157c270ad3
chore: remove export service POC from main (#63945)
* chore: remove export service POC from main

This is a POC and we'll see it, or something like it, again!

* remove frontend changes

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-03-01 12:42:53 -05:00
Ashley Harrison
4f01d55a3c
Profile: Fix session table overflowing page layout in mobile (#63858)
handle table overflowing in mobile layout
2023-03-01 17:08:04 +00:00
Ashley Harrison
a534119c44
Command Palette: Sign out link now works correctly (#63742)
* pass target to command palette urls so sign out link works correctly

* improve types
2023-03-01 15:59:32 +00:00
Victor Marin
a91e0a49c9
Migrate table to cue model (#61852)
* WIP table cue model

* WIP table types migration

* refactor

* WIP table cue

* docs

* veneer fix, docs

* docs
2023-03-01 17:48:36 +02:00
Victor Marin
e1bc3fad83
Heatmap: Migrate to CUE (#62173)
* IP migrate heatmap to cue

* WIP

* refactor

* change usages and refactor panelcfg

* CR modifications and docs

* refactor, enable heatmap cue generation, overwrite enum values in types.ts

* small refactor

* refactor types.ts

* cr modifications

* docs
2023-03-01 17:47:21 +02:00
Eric Leijonmarck
9d6ab92e39
Service accounts: Remove Add API keys buttons and remove one state of migrating for API keys tab (#63411)
* add: hide apikeys tab on start

* make use of store method

* added hiding of apikeys tab for new org creation

* missing err check

* removed unused files

* implemennted fake to make tests run

* move check for globalHideApikeys from org to admin

* refactor to remove the fake

* removed unused method calls for interface

* Update pkg/services/serviceaccounts/manager/service.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update pkg/services/serviceaccounts/manager/service.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* remove the checkglobal method

* removed duplicate global set const

* add count of apikeys for performance

* remove apikeys adding in UI

* added back deleted file

* added comment on component

* changed wording and copy for hiding and migrating service accounts

* refactor: remove migrationstatus in front/backend

This removes the migrationstatus state from the UI in favor of only
looking at the number of API keys to determine what to show to the user.
This simplifies the logic and makes less calls to the backend with each
page load. This was called both on the API keys page and the Service
accounts page.

- removes the state of migrationstatus from the UI
- removes the backend call
- removes the backend endpoint for migrationstatus

* Update pkg/services/apikey/apikeyimpl/xorm_store.go

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* changes the contet to also be primary

* change id of version for footer component

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-03-01 15:34:53 +00:00
Ashley Harrison
8e9ccfc66e
Navigation: Fix broken layout at 544px (#63793)
* ensure media queries transition properly

* fix unit tests
2023-03-01 15:31:32 +00:00
Andrej Ocenas
78b39bb282
NodeGraph: Support icons for nodes (#60989) 2023-03-01 16:02:33 +01:00
Sonia Aguilar
fa35ed8141
Fix wrong texts in titles when cloning templates (#63930) 2023-03-01 09:37:00 -05:00
Joey
fbd049a094
Profiling: Enable flame graph & Phlare/Parca data sources for all users (#63488)
* Remove flame graph toggle

* Remove beta badge from panel

* Update expectedListResp.json

* Update flame graph container to only show if there is data
2023-03-01 11:32:39 +00:00
Oscar Kilhed
dc1600ff14
DataSourcePicker: Add new style of data source picker. (#63736)
* MVP of a new datasource picker

* Add datasource select history, naming DatasourceSelect -> DataSourceDrawer

* refactor cards

* Cleanup and fixing sort order for recents

* add feature flag

* fix feature flag name and use it

* Highlight selected

* Move new ds picker to core

* Restore original datasource picker

* Remove unused property

* update yarn.lock

* Rename folder, update codeowners

* add test for util functions

* Remove es-lint exception

* Change feature toggle description

* remove unnecessary if

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Make test a bit more clear

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Clean up api, filter once and before maps, minor code cleanup

* Fix prettier issue

---------

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2023-03-01 11:26:19 +01:00
Ashley Harrison
27635e6f7b
Command Palette: Display dashboard location (#63807)
* show folder for dashboard, adjust how ancestors are displayed, clamp to single line

* fix keys

* better responsiveness

* use subtitle consistently

* use span instead of div
2023-03-01 09:46:46 +00:00
mikkancso
913cb17eac
Connections: Fix minor issues around Your connections/Data sources page (#63801)
* Connections: redirects to data sources

If Data sources page is the only child of Your connections, then the
NavLandingPage doesn't really make sense.

* DataSourcesList: do not show add button twice

If there are no data sources configured, then the DataSourcesList page
shows a large CTA to add a data source. Therefore, the add new data
source button in the header is redundant, let's remove it from there
in this case.

* DataSources: redirect to Connections after delete

The primary place of the DataSourceList page is under Connections,
provided that the `dataConnectionsConsole` feature is turned on.
Therefore, let's redirect there after deleting a data source.
2023-03-01 08:23:08 +01:00
Selene
e1350a905f
Chore: Update thema and cuesty v0.1.6 (#63629)
* Update thema and cuesty

* Update thema version

* Update thema again

* update thema

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2023-03-01 00:23:57 -05:00
Ryan McKinley
bc2f68dc56
FieldNamePicker: support the isClearable option (#63828) 2023-02-28 11:15:30 -08:00
Joey
82bcfb4928
TraceView: Reworked header (#63105)
* Reworked header

* Remove toggle from merge

* Update test

* Update how span is retrived

* Tests

* Update tests

* Move new trace page header into its own component

* Remove tests already covered in TracePageHeader.test.tsx

* Update findHeaderTags

* Tooltip updates
2023-02-28 15:41:40 +00:00
Brendan O'Handley
16503a719b
Prometheus: Handle jsonnet strings in variables.ts and fix types (#63875)
handle jsonnet strings in variables.ts and fix types
2023-02-28 10:28:37 -05:00
Leon Sorokin
b2c0175777
TimeSeries: Fix legend and tooltip colors changing after data refreshes (#63823) 2023-02-28 08:16:27 -06:00
Uladzimir Dzmitračkoŭ
429d693a4a
Navigation: reserve horizontal space for img in SectionNavItem to avoid layout shift (#63722) 2023-02-28 15:04:17 +01:00
juanicabanas
4e74768530
PublicDashboards: Email sharing (#63762)
Feature for sharing a public dashboard by email
2023-02-28 09:02:23 -03:00
Sonia Aguilar
89ad81b15a
Alerting: Fix width in alerts table columns on EditGroupModal (#63845)
Fix width in alerts table columns on EditGroupModal
2023-02-28 12:50:58 +01:00
Cyril Tovena
dde9b22113
Phlare: Switch to the new Pprof endpoint (#61505)
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-28 11:28:45 +01:00
Sonia Aguilar
526cac60e5
Alerting: Fix AlertLabelDropdown to be case sensitive (#63787)
Fix AlertLabelDropdown to be case sensitive
2023-02-28 09:53:33 +01:00
Sonia Aguilar
a41e9b2dc7
Alerting: Create alert link from dashboard alerting panel (#63648)
* WIP

* feat: update CSS for long names

also adds broken href, to fix later

* Create correct link using CombinedRules

* Use link instead of button for alert link

* Updates from PR review

* Handle loading,haveResults and dispatched state for both promRules and rulerRules

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-02-27 15:24:58 +01:00
Hamas Shafiq
eca0a9f487
Chore: Remove the beta badge for Node Graph and Traces (#62566)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-27 15:16:01 +01:00
Konrad Lalik
5f35995cd4
Alerting: Fix available labels in the alert panel groupby dropdown (#63573) 2023-02-27 14:48:05 +01:00
Brendan O'Handley
2372b7c626
Prometheus: Improve prometheus query variable editor (#63529)
* add prom query var editor with tests and migrations

* fix migration, now query not expr

* fix label_values migration

* remove comments

* fix label_values() variables order

* update UI and use more clear language

* fix tests

* use null coalescing operators

* allow users to query label values with label and metric if they have not set there flavor and version

* use enums instead of numbers for readability

* fix label&metrics switch

* update type in qv editor

* reuse datasource function to get all label names, getLabelNames(), prev named getTagKeys()

* use getLabelNames in the query var editor

* make label_values() variables label and metric more readable in the migration

* fix tooltip for label_values to remove API reference

* clean up tooltips and allow newlines in query_result function

* change function wording and exprType to query type/qryType for readability

* update prometheus query variable docs

* Update public/app/plugins/datasource/prometheus/components/VariableQueryEditor.tsx

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

* handle jsonnet grafana as code variables

---------

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2023-02-27 08:38:05 -05:00
Brendan O'Handley
79c9ab1952
Dataplane: Support timeSeriesLong without transform (#62732)
* support timeSeriesLong without transform

* move timeserieslong transform to the right spot

* add review suggestions for using types and moving options inline

* handle frames with different field names

* remove extra options
2023-02-27 08:37:19 -05:00
Virginia Cepeda
2eba37b95b
Alerting: Prevent resetting the form on evaluation group interval change (#63763)
Prevent resetting the form on evaluateEvery change
2023-02-27 09:54:34 -03:00
Alex Khomenko
5ad074ff2c
Logs Panel: Generate types from schema (#63716) 2023-02-27 13:56:35 +02:00
Matias Chomicki
d56896cf72
Range splitting: Omit instant queries from splitting (#63705)
Range splitting: omit instant queries from splitting
2023-02-27 11:09:46 +01:00
Laura Benz
c83e02ce02
Laura/refactor/move tests for handling datasource states (#63638)
refactor: move tests to a new file and clean up original file
2023-02-27 09:29:46 +01:00
Andreas Christou
823aaaeb7c
AzureMonitor: Fix template variables in ARG subscription field (#63731)
Add support for template variables in sub field
2023-02-24 16:37:09 +00:00
juanicabanas
9df4a39195
PublicDashboards: Configuration modal redesign (#63211)
Configuration modal redesign

---------

Co-authored-by: kay delaney <kay@grafana.com>
2023-02-24 12:36:29 -03:00
Giuseppe Guerra
966bcd3545
Plugins: Fix plugins CDN not working when plugins are not in domain's root path (#63202)
* Plugins CDN: Add support for different CDN root path

* Plugins CDN: Make frontendsettings return the correct CDN base path

* Update comments

* Fix version detection

* Undo frontend changes

* Fix system.js asset path construction

* fix(plugins): translate all plugin css asset paths loaded via cdn

* refactor(plugins): rename extractPluginNameVersionFromUrl and add comments

* Fix typo in comment

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

* Hardcode CDN URL structure

/{id}/{version}/public/plugins/{id}/{assetPath} is not required anymore in the cdn url template config

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2023-02-24 14:28:13 +01:00
Sven Grossmann
b3c0e7e977
TestData: Fix bug when selecting "Log" streaming (#63190)
* fix wrong fields getting populated

* fix bug not being able to select another streaming type

* add correct arg type

* remove unused import
2023-02-24 14:13:56 +01:00
Sonia Aguilar
b42f973a7a
Alerting: Fix changing datasource and creating new query not using defaults. (#63092)
* Set default query when changing data source or adding new alert query

* Set default query when creating new alert rule

* Set fefault query for cloud and recording rules

* Create hook for getting defaults in AlertRuleForm

* fixing tests

* Use conditionals with 'if' for more clarity and rename lazy to async

* Add loading indicator for default queries

* Fix tests

* Make newModel a sync method and fix tests error

* Use useAsync instead of useEffect for an async call
2023-02-24 13:43:54 +01:00
Gilles De Mey
09fdbb69ec
Alerting: Adds visual component for feature toggles (#63621) 2023-02-24 13:29:30 +01:00
Josh Hunt
91d2df59fc
CommandPalette: Remove topnav command palette feature flag (#63620)
* CommandPalette: Remove topnav command palette feature flag

* Restore search shortcuts if topnav isnt enabled

* fix unused imports
2023-02-24 07:14:53 -05:00
Giordano Ricci
c136ad1f16
Datasource Onboarding: Prevent flickering of onboarding page after first load (#63360)
* Datasource Onboarding: Prevent flickering of onboarding page after first load

* add loading state to loadDatasources & refactor

* fix test

* avoid loading state when loading datasources on add

* fix test

* add explainer on why fetching datasources is needed
2023-02-24 11:48:30 +00:00
Ashley Harrison
19d1a46f30
A11y: remove onClick from collapsed text (#62495)
remove onClick from collapsedText
2023-02-24 10:36:04 +00:00
Torkel Ödegaard
d5b4a1288a
Scenes: Updates to variables demo (#63511)
* Scenes: Updates to variables demo to include a collapsable scene to test scenario of part of scene containing a query runnner being inactive while a variable changes value

* Table: Fixes logic for when adhoc filters are shown

* Scene: Variables minor style fix

* rever unrelated change

* Update version

* Update
2023-02-24 09:30:15 +01:00
Ivan Ortega Alba
14e29451cf
Loki ds: Interpolation breaks in Loki queries when no scoped vars (#63694) 2023-02-24 00:18:08 -08:00
Gábor Farkas
6cee0cdbad
elastic: remove most of xpack (#63460)
elasticsearch: do not show the xpack toggle in datasource config
2023-02-24 07:24:31 +00:00
kay delaney
36e474d109
PanelHeaderMenu: Use UI/Menu component (#63040) 2023-02-24 04:23:56 +00:00
Ivan Ortega Alba
ca4cd85504
InfluxDB ds: Query variable breaks trying to interpolate __interval (#63682) 2023-02-23 20:30:20 +01:00
ismail simsek
ffed779879
InfluxDB: Fix getting empty response when querying fields with retention policy (#63669)
Revert "InfluxDB: Send retention policy with InfluxQL queries if its been specified. (#62149)"

This reverts commit a5a85e0398.
2023-02-23 12:20:20 -05:00
Isabella Siu
22537bec2e
CloudWatch Logs: Fix query editor freezing (#63661) 2023-02-23 11:50:48 -05:00
Torkel Ödegaard
2023203045
SectionNav: Simplify section toggle styling (#63653) 2023-02-23 17:03:00 +01:00
Josh Hunt
0c36b247af
Chore: Refactor Search/Folder view types into DashboardViewItem (#63162)
* Chore: Refactor Search/Folder view types into DashboardViewItem

* uid is not optional in api

* rename queryResultToNestedFolderItem function

* Fix error from locationInfo being empty

* change queryResultToViewItem to take view instead

* Fix sortMeta fields not showing on search cards

* Show correct parent for panel search results
2023-02-23 15:52:54 +00:00
Ashley Harrison
a48793b542
Accessibility: Make row actions keyboard accessible (#63367)
make row actions keyboard accessible
2023-02-23 15:20:59 +00:00
Torkel Ödegaard
85c81ae080
Scenes: Variables minor style fix for spacing & margin (#63643)
* Table: Fixes logic for when adhoc filters are shown

* Scene: Variables minor style fix

* rever unrelated change
2023-02-23 06:41:43 -08:00
Paul Dee
f3714099e7
spell fix (#63588) 2023-02-23 12:36:27 +01:00
Laura Benz
df6572b53f
Laura/refactor/move tests for running queries (#63581)
* refactor: move tests to a new file and clean up original file

* refactor: restructure test

* refactor: remove linting error

* refactor: change wording in test description
2023-02-23 11:51:51 +01:00
Josh Hunt
54aaaf169f
Internationalization: Mark up more of Dashboard Variables and Browse/Search Dashboards (#63518)
* Extract dirty translations from main

* Translate some variable phrases

* Translate nav bar

* Translate search/browse

* Fix header returning null

* Translate search results type

* fix test
2023-02-23 10:46:07 +00:00
Ashley Harrison
4a2695349d
Chore: more ts test fixes (#63438)
* replace anys in tests

* more test fixes

* clean up any's in tests
2023-02-23 10:07:44 +00:00
Jev Forsberg
f94b957333
Stat panel: Update out-of-date README (#63160)
* baldm0mma/chore/updateREADME/ update the readme for the statpanel

* baldm0mma/chore/updateREADME/ annos

* baldm0mma/chore/updateREADME/ update info with copy from docs

* baldm0mma/chore/updateREADME/ update caps

* baldm0mma/chore/updateREADME/ rem letter

* baldm0mma/chore/updateREADME/ update language

* baldm0mma/chore/updateREADME/ update spelling
2023-02-22 14:12:00 -07:00
Adela Almasan
05a9946b18
Geomap: Improve tooltip url for photos layer (#63487) 2023-02-22 20:00:06 +02:00
Abdul
5ec8e370f7
Expressions: Add tests for the QueryEditorRows and QueryGroup components (#63394)
* add QueryGroup onAddQueryClick and onExpressionClick tests

* add test's for the query group component

- new query/expression should be expanded
- adds query/expression onclick

* add open data source help modal test

* add disabled expression test

* add query editor rows test

* rm unused attributes, rm renderScenario required override
2023-02-22 17:26:41 +02:00
Ivana Huckova
a1c0feab7d
Loki: Remove comment (#63565)
Remove comment
2023-02-22 14:57:18 +01:00
ismail simsek
3d75dbc31e
Prometheus: Handle annotation query with empty fields (#63560)
Handle annotation query with empty fields
2023-02-22 14:47:50 +01:00
Gábor Farkas
f925a989d3
elasticsearch: metrics rate and top_metrics do not need xpack (#63457) 2023-02-22 14:36:15 +01:00
Kristina
06dfe2156f
Explore: Add transformations to correlation data links (#61799)
* bring in source from database

* bring in transformations from database

* add regex transformations to scopevar

* Consolidate types, add better example, cleanup

* Add var only if match

* Change ScopedVar to not require text, do not leak transformation-made variables between links

* Add mappings and start implementing logfmt

* Add mappings and start implementing logfmt

* Remove mappings, turn off global regex

* Add example yaml and omit transformations if empty

* Fix the yaml

* Add logfmt transformation

* Cleanup transformations and yaml

* add transformation field to FE types and use it, safeStringify logfmt values

* Add tests, only safe stringify if non-string, fix bug with safe stringify where it would return empty string with false value

* Add test for transformation field

* Do not add null transformations object

* Break out transformation logic, add tests to backend code

* Fix lint errors I understand 😅

* Fix the backend lint error

* Remove unnecessary code and mark new Transformations object as internal

* Add support for named capture groups

* Remove type assertion

* Remove variable name from transformation

* Add test for overriding regexes

* Add back variable name field, but change to mapValue

* fix go api test

* Change transformation types to enum, add better provisioning checks for bad type name and format

* Check for expression with regex transformations
2023-02-22 06:53:03 -06:00
Torkel Ödegaard
f64b7fe8a7
Page: Remove footer from new page layout (#63455)
* Page: Option to hide footer, enabled by default for PluginPage

* Remove footer from new page layout
2023-02-22 13:30:57 +01:00
Konrad Lalik
0a73ac36ad
Alerting: Add dashboard and panel links to rule and instance annotations (#63243)
* Add dashboard and panel links in rule and instance annotations

* Use clean annotations in RuleViewer
2023-02-22 13:17:13 +01:00
Gareth Dawson
c5ed9391b6
Loki: Display error with label filter conflicts (#63109)
* feat: add logic to check for conflicting operator

* feat: display error if there is a conflict

* feat: check if label filter conflicts with other filters

* fix: remove capitalisation from "no data"

* test: add tests for isConflictingFilter function

* feat(labels): add validation for label matchers

* test(labels): add tests for isConflictingSelector

* refactor(labels): add suggestions from code review

* test(labels): add case for labels without op

* refactor(operations): add suggestions from code review

* feat(operations): display tooltip when you have conflicts

* fix: remove unused props from test

* fix: remove old test

* fix(labels): error message now displays in the correct location

* fix(operations): operations can be dragged, even with error

* fix: remove unused vars

* fix: failing tests

* fix(operations): hide error message whilst dragging

* refactor: use more appropriate variable naming

* refactor: add suggestions from code review

* perf: use array.some instead of array.find
2023-02-22 09:56:20 +00:00
Shirley
3a57304ef0
CloudWatch: Remove error for multi-value variable in logs runner (#63522)
Remove error for multi template variable in CW logs runner
2023-02-22 10:35:39 +01:00
Gábor Farkas
b069fd81b2
loki: query splitting: more robust check (#63542) 2023-02-22 09:16:05 +01:00
Adela Almasan
3949706182
Geomap: Release night / day layer (#63435) 2023-02-22 07:39:39 +02:00
Adela Almasan
2240484935
Geomap: Fix default opacity for layers (#63426) 2023-02-21 20:55:07 +02:00
Andreas Christou
20591cc42b
CloudMonitor: Fix query migration (#63491)
* Update query and set required fields for explore queries

* Update test case

- Validate onChange is called with the new query
2023-02-21 11:21:20 -05:00
Torkel Ödegaard
6fd547881a
Page: Remove page shadow and replace with panel border (#63453) 2023-02-21 15:42:37 +01:00
ismail simsek
80292d3d1e
Prometheus: Fix missing abs operation to query builder (#63139)
Add abs operator to prometheus query builder
2023-02-20 15:49:59 +01:00
Gábor Farkas
8f7b980c95
Loki: query splitting: handle stats (#63436)
* loki: query splitting: handle stats

* update tests
2023-02-20 13:55:56 +00:00
Gilles De Mey
c30f3a617b
Alerting: adds tests for expression utils (#63421) 2023-02-20 08:53:06 +01:00
Konrad Lalik
69b2aade1b
Alerting: Make the folder field read-only on the eval group modal (#62935)
* Make the folder field read-only on the eval group modal

* Code cleanup

* Use useCombinedRuleNamespace to simplify groups fetching

* Fix groups filtering and label

* Revert go test changes, add folder button title

* Revert go changes

* Remove folder link when no url provided, fix messages

* Fix tests

* Fix lint
2023-02-20 08:47:50 +01:00
Gábor Farkas
7a8f1ab566
loki: query splitting: stricter types (#63387) 2023-02-17 19:43:08 +01:00
Matias Chomicki
a0bea04a02
Range splitting: Read errors from the received response and report them (#63368) 2023-02-16 12:39:26 -05:00
Matias Chomicki
0240f4eb45
Loki Range Splitting: Create a new instance for the initial frame (#63361)
* Range splitting: create a new instance of the initial frame

* Chore: rename variable
2023-02-16 12:55:31 +01:00
Ashley Harrison
f8d89eff56
Chore: fix type errors in tests (#63270)
* fix any's in tests

* fix more any's in tests

* more test type fixes

* fixing any's in tests part 3

* more test type fixes

* fixing test any's p5

* some tidy up

* fix template_srv
2023-02-14 16:46:42 +01:00
Gábor Farkas
0ee9d11a91
loki: query splitting: better canceling (#63315)
loki: query splitting: better cancelling
2023-02-13 17:52:30 +01:00
Matias Chomicki
84fdb7f908
Loki Range Splitting: Calculate dynamic maxLines per target based on the current response state (#63248)
* Range splitting: update maxLines for logs queries

* Range splitting: add unit tests for dynamic limit requesting
2023-02-13 07:59:20 +01:00
Ryan McKinley
985c61d700
Dashboard: remove unused submenuEnabled property (#63289)
remove submenu property
2023-02-12 18:10:29 +01:00
Ieva
229f8b6e6d
Support bundles: small UX improvements (#63277)
support bundle ux improvements
2023-02-11 08:31:03 +00:00
Ezequiel Victorero
8520a8614c
PublicDashboards: add recipients to the public dashboards retrieval (#63149) 2023-02-10 15:01:26 -03:00
Brendan O'Handley
879f980084
Revert "Prometheus Datasource: Improve Prom query variable editor" (#63278)
Revert "Prometheus Datasource: Improve Prom query variable editor (#58292)"

This reverts commit eedcd7d5b1.
2023-02-10 12:31:16 -05:00
Matias Chomicki
8cd3d1bfda
Loki Range splitting: Ignore hidden queries (#63250)
Range splitting: ignore hidden queries
2023-02-10 18:19:17 +01:00
Sven Grossmann
3f144924d1
Loki: Do not chunk when refid contains do-not-chunk (#63276)
add ref-id to not chunk requests
2023-02-10 18:00:49 +01:00
Sven Grossmann
0bd326d846
LogsVolume: Make log volume work with chunking (#63181)
* aggregate logs volume on streaming

* enable log volume queries to be split

* add streaming indicator

* added tests

* also chunk logs queries

* change extraInfo back to undefined
2023-02-10 14:43:41 +01:00
Sven Grossmann
00edc1c6b1
Loki Context UI: Do not disable last label (#62866)
* improved text

* prevent all labels removed

* use `structuredClone` instead of lodash

* update test

* get `structuredClone` in test?

* fix using structuredClone
2023-02-10 14:23:17 +01:00
Gábor Farkas
27d70819cc
loki: query splitting: split logs queries (#63091)
* loki: calculate logs-chunk-boundaries

* renamed function
2023-02-10 12:01:33 +01:00
Konrad Lalik
53a8998c85
Alerting: a11y improvements (#63072) 2023-02-10 10:23:40 +01:00
Jo
c70571c536
SupportBundles: Replace feature toggle with enabled (#63241)
replace feature toggle with enabled
2023-02-10 10:12:04 +01:00
Brendan O'Handley
eedcd7d5b1
Prometheus Datasource: Improve Prom query variable editor (#58292)
* add prom query var editor with tests and migrations

* fix migration, now query not expr

* fix label_values migration

* remove comments

* fix label_values() variables order

* update UI and use more clear language

* fix tests

* use null coalescing operators

* allow users to query label values with label and metric if they have not set there flavor and version

* use enums instead of numbers for readability

* fix label&metrics switch

* update type in qv editor

* reuse datasource function to get all label names, getLabelNames(), prev named getTagKeys()

* use getLabelNames in the query var editor

* make label_values() variables label and metric more readable in the migration

* fix tooltip for label_values to remove API reference

* clean up tooltips and allow newlines in query_result function

* change function wording and exprType to query type/qryType for readability

* update prometheus query variable docs

* Update public/app/plugins/datasource/prometheus/components/VariableQueryEditor.tsx

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

---------

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2023-02-09 15:35:36 -05:00
Ryan McKinley
0018c8e9c1
K8S: cleanup and consolidate feature toggles (#63212) 2023-02-09 09:54:00 -08:00
Matias Chomicki
94241f6676
Loki Query Splitting: Split queries into sub-queries with smaller time interval (#62767)
* Range splitting: range splitting function

* Range splitting: experiment with 1 hour splits

* Range splitting: reorganize code

* Range splitting: improve code readability and meaning

* Range splitting: add partition limit to prevent infinite loops

* Range splitting: add error handling

* Range splitting: disable for logs queries

* Range splitting: support any arbitrary time splitting + respect original from/to in the partition

* Chore: remove console logs

* Chore: delete unused import

* Range splitting: actually send requests in sequence

* Range splitting: do not split when > 1 query

* Range splitting: combine frames

* Chore: rename function

* split in reverse

* polished reversing

* keep reference to the right frame in the result

* Range splitting: change request state to Streaming

* Range splitting: fix moving only 1 unit of time instead of the provided one

* Chore: change default parameter to timeShift = 1

* Range splitting: do not split for range queqries

* Range splitting: add initial support for log queries

* Range splitting: do not use MutableDataFrame

It has bad performance and it's not required

* Chore: remove unused export

* Query Splitting: move to module

* loki: split: fix off-by-one error (#62966)

loki: split: fix off-by-one loop

* Range splitting: disable for logs volume queries

* Range splitting: combine any number of fields, not just hardcoded 2

* Range splitting: optimize frame-combining function

* Range splitting: further optimize

* Range splitting: combine frame length

* Range splitting: combine stats

* Range splitting: combine stats without assuming the same order

* Query splitting: catch and raise errors

* Range splitting: create feature flag

* Range splitting: implement feature flag

* Range splitting: add unit test for datasource query

* Range splitting: add basic test for runPartitionedQuery

* Range splitting: add unit test for resultLimitReached

* Range splitting: test frame merging

* Chore: fix unit test

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-02-09 12:27:02 -05:00
Joey Tawadrous
1bc43f5faa
TraceView: Remove unnecessary code from header (#63114)
* Remove unecessary code

* Update tests

* Remove import

* Remove unused import
2023-02-09 16:57:57 +00:00
Shirley
32b96a586f
CloudWatch: Add deprecation tooltip to Alias field (#63115)
* CloudWatch: Add deprecation tooltip to Alias field

* Add target blank

* Add noopener noreferrer
2023-02-09 17:50:29 +01:00
Ashley Harrison
36c090416a
Command palette: Enable folder searching (#62663)
search folders as well as dashboards in the command palette
2023-02-09 16:31:05 +00:00
Ashutosh Kumar Shaw
90f8959d3c
CloudWatch Logs: Update default timeout to 30m (#63155) 2023-02-09 10:52:32 -05:00
Oscar Kilhed
8048a66e90
Dashboard: Add a feature that creates a table panel when a spreadsheet file is dropped on the dashboard. (#62688)
* drag files to dashboard

* use file name as panel title

* add file size limitation, file type limitation and error handling

* Refactor file parsing for code sharing

move accepted types and max size to file-import constants
show which file types are allowed in file type error

* update codeowners

* Adjust max size to 1mb
2023-02-09 15:16:17 +01:00
Alex Khomenko
d660e3acb9
Geomap: Update to panelcfg (#63169)
* Geomap: Update to panelcfg

* Generate geomappanelcfg docs

---------

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2023-02-09 14:38:06 +02:00
Josh Hunt
58f3f00bd5
Dashboards: Star dashboards by UID (#63134)
* Dashboards: Star dashboards by UID

* undo async
2023-02-09 10:24:46 +00:00
Ashley Harrison
2a34293689
Chore: more type fixes (#62952)
* fix some more any/type assertions

* more any/type assertion fixes

* implement review comments
2023-02-09 09:03:13 +00:00
Eric Leijonmarck
91b5337600
Auth: Refactoring of frontend skipOrgRoleSync logic to backend (#62921)
* WIP

* refactor: add function in login for externSynced

* refactor: make function to make ExternalSyncedInfo

- adds tests
- refactors strings into consts

* remove: console.log

* remove: unnessecary comment

* added exhaustive tests

* refactor: labelname

* removed unused code

* missspelling

* refactor: based on review comments

* add: comment to functions about authinfo behavior

* Update pkg/services/login/authinfo.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Update pkg/services/login/authinfo.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* fix: tests

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-02-08 20:11:46 +00:00
Ashley Harrison
fc2f7f90f8
Navigation: add a link to starred dashboards in the megamenu (#62685)
add a link to starred dashboards in the megamenu
2023-02-08 15:18:13 +00:00
Ashley Harrison
4181acec72
A11y: ignore rule since there's a button handling keyboard interaction (#62856)
ignore a11y rule since there's a button handling keyboard interaction
2023-02-08 14:29:30 +00:00
Ashley Harrison
6a720f96f7
A11y: ignore rule since keyboard interaction is already handled (#62850)
* Revert "Accessibility: Remove unnecessary onClick from title element (#59696)"

This reverts commit f19b07c0bc.

* ignore eslint rule
2023-02-08 14:17:15 +00:00
Josh Hunt
504eabbe80
Navigation: Ensure command palette is correctly translated (#61103)
* Navigation: Translate nav tree in store

* Remove usage of getNavTitle

* properly translate children

* add pubdash translation

* remove extraneous calls to translation in PageHeader

* empty commit

* correctly allow subtitle to be overrwitten (thank you tests!)

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-08 13:15:37 +00:00
linoman
bc67edbff8
Fix RolePicker component offset when it has too many roles (#62857)
Fix role picker offset with too many roles
2023-02-08 12:09:27 +01:00
Marcus Andersson
f46f8bdd3a
Plugins: Renamed parts of the UI extension APIs (#63070)
* Renamed target -> id and href -> path after feedback.

* fixed type issues in test page.

* chore(pluginschemajson): update extensions props target -> id

* this is the final.

* fixed typings...again...

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-02-08 05:33:28 -05:00
Galen Kistler
79b750a4b2
Prometheus: Table format throwing error on empty result (#63053)
* fix bug in prometheus table view which is throwing error when a query returns no results
2023-02-07 14:58:08 -06:00
Josh Hunt
09637caade
Chore: Remove search_srv (#62964)
* Chore: Remove Search Service

* use getSortOptions from grafana searcher

* wip

* fix library panels search tests
2023-02-07 15:28:07 -05:00
Marcus Andersson
1cfd3f81fb
Plugins: Support for link extensions (#61663)
* added extensions to plugin.json and exposing it via frontend settings.

* added extensions to the plugin.json schema.

* changing the extensions in frontend settings to a map instead of an array.

* wip

* feat(pluginregistry): begin wiring up registry

* feat(pluginextensions): prevent duplicate links and clean up

* added test case for link extensions.

* added tests and implemented the getPluginLink function.

* wip

* feat(pluginextensions): expose plugin extension registry

* fix(pluginextensions): appease the typescript gods post rename

* renamed file and will throw error if trying to call setExtensionsRegistry if trying to call it twice.

* added reafactorings.

* fixed failing test.

* minor refactorings to make sure we only include extensions if the app is enabled.

* fixed some nits.

* Update public/app/features/plugins/extensions/registry.test.ts

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

* Update packages/grafana-runtime/src/services/pluginExtensions/registry.ts

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

* Update packages/grafana-runtime/src/services/pluginExtensions/registry.ts

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

* Update public/app/features/plugins/extensions/registry.test.ts

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

* Moved types for extensions from data to runtime.

* added a small example on how you could consume link extensions.

* renamed after feedback from levi.

* updated the plugindef.cue.

* using the generated plugin def.

* added tests for apps and extensions.

* fixed linting issues.

* wip

* wip

* wip

* wip

* test(extensions): fix up failing tests

* feat(extensions): freeze registry extension arrays, include type in registry items

* added restrictions in the pugindef cue schema.

* wip

* added required fields.

* added key to uniquely identify each item.

* test(pluginextensions): align tests with implementation

* chore(schema): refresh reference.md

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-02-07 17:20:05 +01:00
Gareth Dawson
8a94688114
Logs: Rename dedup to deduplication (#62944)
* fix: rename dedup with deduplication

* docs: update documentation

* fix: update names
2023-02-07 16:17:10 +00:00
Josh Hunt
5564b93e2f
CommandPalette: Move quick add actions to top level (#62900)
* Move quick actions to top level

* Change quick action verb to "Create"

* create to 'new'

* fix comment

* update translations

* undo changing alerting
2023-02-07 16:10:43 +00:00
Piotr Jamróz
999c836753
Explore: Consolidate logs volume logic (full range and limited) (#61995)
* Consolidate logs volume logic (full range and limited)

* Fix showing limited histogram message

* Test passing meta data to logs volume provider

* Improve readability

* Clean up types

* Move the comment back to the right place

* Improve readability
2023-02-07 14:32:06 +01:00
Josh Hunt
c9773e55b2
Search: Switch to list view when filtering by tags (#63004)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-07 12:05:00 +00:00
Joey Tawadrous
121260e0dd
Parca: Use data query schema (#62840)
* Parca data query schema

* Remove groupBy
2023-02-07 09:56:21 +00:00
Torkel Ödegaard
39537043ec
AppChrome: Reduce re-renders for identical pageNavs (#62483)
* AppChrome: Reduce re-renders for identical pageNavs

* Update

* removed log
2023-02-07 08:01:22 +01:00
Ryan McKinley
5343255de8
Chore: Timeseries cleanup avoid React.FC (#62984)
timeseries FC
2023-02-06 13:53:56 -08:00
Gareth Dawson
ac942d5e72
Loki: Add placeholder to the loki query editor (#62773)
* fix: add placeholder to loki query editor

* fix: use original placeholder

* refactor: extract set placeholder into seperate function

* fix: use correct monaco types

* revert: unwanted change from merge
2023-02-06 15:38:19 +00:00
Gilles De Mey
7824900b87
Alerting: fix "policy" typo (#62953) 2023-02-06 15:27:37 +01:00
Zoltán Bedi
d103c58539
MSSQL/Postgres: List views in table dropdown as well (#62867)
* MSSQL: Query views for table dropdown

* Postgres: Query views for table dropdown
2023-02-06 15:16:32 +01:00
Levente Balogh
fc6a4eee61
Datasources: Add optional tracking for datasources list viewed (#62949)
chore: add optional tracking for datasources list viewed
2023-02-06 14:57:55 +01:00
Levente Balogh
e3512ddd7e
Datasources: Fix tracking event name (#62940)
fix: fix typo in event name
2023-02-06 12:15:44 +01:00
Levente Balogh
f815c690d7
Connections: Fix redirection when creating new DS (#62938)
fix: redirect to connections when creating a new DS from the catalog
2023-02-06 11:24:04 +01:00
Matias Chomicki
57369915f5
Loki Query Editor: Make Monaco the default editor (#62247)
* feat(loki-editor): remove slate and make Monaco the default editor

* feat(loki-editor): remove unsupported usages of onBlur

* feat(loki-editor): remove monaco feature flag

* Chore: remove unused import
2023-02-06 11:18:01 +01:00
Andres Martinez Gotor
9893408af9
Refactor: Use data source UID rather than ID (#62781) 2023-02-06 11:12:44 +01:00
Andres Martinez Gotor
32e6af966f
Prometheus: Refactor. Use data source UID rather than the deprecated ID (#62795) 2023-02-06 11:02:02 +01:00
Ryan McKinley
39116b9c11
Chore: Remove previews crawler UI (and feature flag) (#62906) 2023-02-03 16:45:10 -05:00
Alex Khomenko
84a6671911
Cloudwatch: generate types (#61770)
* New pfs impl

* Reached codegen parity with old system

* Update all models.cue inputs

* Rename all models.cue files

* Remove unused prefixfs

* Changes Queries->DataQuery schema interface

* Recodegen

* All tests passing, nearly good now

* Add SchemaInterface to kindsys props

* Add pascal name deriver

* Relocate plugin cue files again

* Clarify use of injected fields

* Remove unnecessary aliasing

* Move DataQuery into mudball

* Allow forcing ExpandReferences on go type generation

* Move DataQuery def into kindsys, add generator to copy it to common

* Fix copy generator to replace package name correctly

* Setup Cloudwatch data query schema

* Add go file

* Re-generate types

* Re-generate types

* Add missing files

* Re-generate docs

* Add MetricStat

* Add CloudWatchAnnotationQuery

* Remove DataQuery extension

* Fixes

* Sync with main

* Update report

---------

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-02-03 15:27:48 -05:00
Ivana Huckova
20ec54f1f9
Elasticsearch: Use generated types in data source (#62753)
* Use generated types in frontend

* Export missing MetricAggregationWithMeta

* Remove not needed changes

* Update

* Fix lint

* Update comments
2023-02-03 12:04:12 -05:00
Drew Slobodnjak
bbb572e73f
Canvas: Improve anchor UX (#62409)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-02-03 12:02:37 -05:00
Drew Slobodnjak
43ce077133
Canvas: Update server element design (#62832) 2023-02-03 08:59:29 -08:00
Drew Slobodnjak
db953c9a9c
Canvas: Support color themes for arrows (#62829) 2023-02-03 08:50:36 -08:00