Commit Graph

18126 Commits

Author SHA1 Message Date
Ieva
783a8527c5
RBAC: hide the empty basic role from the org role picker (#72276)
hide the empty basic role from the org role picker
2023-07-25 13:54:53 +01:00
Ivan Babrou
8e090f9951
Prometheus: Add a keyboard shortcut to toggle all exemplars (#64479)
* Add a keyboard shortcut to toggle all exemplars

Sometimes it's hard to see the quantile line behind all the exemplars.

This commit adds a `d x` keyboard shortcut to toggle exemplar visibility
on all prometheus queries. Unlike with legends, the logic is simpler
and it does a pure toggle as opposed to "majority toggle" as with legends.

Since exemplars might not be loaded, this also requires refreshing the data.
For the same reason, toggling a single panel is not supported, as it will
make the panel data out of sync with the rest of the dashboard.

* Use "p x" to navigate to panel explore rather than just "x"

It's more consistent with other panel level shortcuts.

It also doesn't conflict with the global "x" to toggle exemplars that way.
2023-07-25 07:45:18 -05:00
Giuseppe Guerra
296e30d620
Dashboards: Add Angular deprecation alert in data source query editor (#72211)
* reportInteraction when clicking on angular deprecation docs link

* Made messages consistent, removed duplicate component

* Revert unnecessary changes in PluginDetailsPage.test.tsx

* Moved angular deprecation notice to different folder

* Fix component names

* Dismissable alert

* Plugins: Add Angular deprecation alert in data source query editor

* Add tests

* Fix test name

* Add const deprecationText

* lint

* PR review feedback
2023-07-25 14:35:07 +02:00
Gábor Farkas
63e0b927bd
logs: context: various scrolling-fixes (#72271)
* logs: context: correctly append to the above&below arrays

* logs: context: on initial load always scroll to center

* logs: context: reset counts when context-query-ui changes
2023-07-25 14:34:02 +02:00
Ivana Huckova
2a5a4ded53
Loki: Run logs volume for query when switching from trace to logs (#72268)
Loki: Run logs volume for query that has no queryType (defaults to range)
2023-07-25 14:33:33 +02:00
Joey
c1c8b4d368
Tracing: Span filters UI enhancements (#72245)
* Update margin between inputs

* Updated spacing between toggle and text

* Add more spacing
2023-07-25 13:31:44 +01:00
Ieva
f7c6491f73
Auth: add a feature toggle for locking user roles for users synced through GCom (#72202)
* add a new feature toggle for locking down role sync for users managed by GCom

* protect the frontend and the backend using the new feature toggle

* fix merge
2023-07-25 13:27:02 +01:00
Joey
e4f419b84f
Tempo: Use new configuration editor components (#71288)
* Use new config components in Tempo

* Update Grafana experimental version
2023-07-25 12:50:12 +01:00
Konrad Lalik
32e2304f10
Alerting: Improve alerts names visibility on narrow panels (#72104) 2023-07-25 12:26:53 +02:00
Polina Boneva
1110cb4d44
Public Dashboard: Redesign modal (v2) (#71151)
* Update public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/SettingsBar.tsx

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>

* revert modal styling and add specific styling to Sharing

* Update public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/SettingsBar.tsx

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>

* functions > const

* put a gat between all items in email config, instead of margins for each item

* fix html semantic elements

* ad theme to class component ShareModal

* add labels

* fix failing tests; now Settings has a summary and has to be opened to be able to see the On/Off toggles

* fix dashboard-public-create test with settings dropdown
2023-07-25 13:17:39 +03:00
RoxanaAnamariaTurc
edb7d0e0d8
Login: Show oauth error messages inline (#72255)
Squashed commit of the following:

commit b82ed875b88d12348cd4043e2add493e8fb6edc6
Author: Roxana Turc <anamaria-roxana.turc@grafana.com>
Date:   Tue Jul 25 10:42:31 2023 +0100

    user essentials mob! 🔱

    lastFile:public/app/core/components/Login/LoginPage.test.tsx

commit 923cbcf190d2def57b59f8b231f14322efdf9718
Author: joshhunt <josh@trtr.co>
Date:   Tue Jul 25 10:17:51 2023 +0100

    user essentials mob! 🔱

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
2023-07-25 12:57:45 +03:00
Ieva
e9ba6922c0
Auth: Lock organization roles for users who are managed through an external auth provider (#72204)
remove onlyExternalOrgRoleSync feature flag
2023-07-25 10:51:47 +01:00
jakuzure
b503434bd3
Alerting: Fix typo when no rules exist (#72250) 2023-07-25 11:46:38 +02:00
ismail simsek
376ab3f3ca
InfluxDB: Fix setting retention policy on visual query editor (#72248)
Prevent fetch loop
2023-07-25 11:21:35 +02:00
Gábor Farkas
f2f30caa73
logs: better unit tests (#72246) 2023-07-25 10:50:54 +02:00
Nathan Marrs
bc0bf0ee4b
Geomap: Promote route + photos layer to beta, promote geojson layer to stable (#72233) 2023-07-24 18:07:30 -07:00
Matthew Jacobson
cfb1656968
Alerting: Add notification policy provisioning file export (#70009)
* Alerting: Add notification policy provisioning file export

- Add provisioning API endpoint for exporting notification policies.
- Add option in notification policy view ellipsis dropdown for exporting.
- Update various provisioning documentation.
2023-07-24 17:56:53 -04:00
Kevin Yu
4c42632ab8
CloudWatch Logs: Add Monaco-based query field editor behind feature flag (#71799) 2023-07-24 14:33:45 -07:00
Andre Pereira
bd59a27b99
Tempo: Remove traceqlSearch feature toggle (#72029)
* Remove feature flag from registry.go

* Remove usages of toggle

* Refactor and cleanup Tempo's query field components

* Added deprecation alert

* Mark nativeSearch fields as deprecated

* Also show deprecated search tab if queryType is nativeSearch

* Update deprecation message to list grafana version

* Fix merge conflict

* Remove mention of toggle from docs
2023-07-24 16:26:10 +01:00
Giuseppe Guerra
7f4d8de6f5
Plugins: Consistent Angular deprecation messages and tracking on docs link click (#71715)
* reportInteraction when clicking on angular deprecation docs link

* Made messages consistent, removed duplicate component

* Revert unnecessary changes in PluginDetailsPage.test.tsx

* Moved angular deprecation notice to different folder

* Fix component names

* Dismissable alert
2023-07-24 17:25:36 +02:00
Esteban Beltran
20d7cf34b2
Sandbox: Set the style attribute of all Element child to be a live target (#72208) 2023-07-24 17:23:40 +02:00
Matthew Jacobson
8ffd2a71d3
Alerting: Add min interval option to alert rule query creation (#71986)
This features adds a configuration option when creating an alert rule query. This option already exists as part of the alert query model but is not currently configurable through the UI.
2023-07-24 11:20:55 -04:00
Cyril Tovena
5c1e8c108a
Allow to pass a blob to core fetch function (#71929)
* Allow to pass a blob to core fetch function

* Use global blob instead of import

---------

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-07-24 17:02:56 +02:00
Virginia Cepeda
45b5b81db6
Alerting: Add View YAML button for Grafana/provisioned rules (#71983)
* Add View YAML button for grafana/provisioned rules

* Address PR comments
2023-07-24 11:35:26 -03:00
Marcus Andersson
eee8e52605
PluginExtensions: Increased extension limit per plugin (#72196)
increased limit of how many items a plugin can register for panel and explore extension pint.
2023-07-24 16:20:57 +02:00
Marcus Andersson
7aeca1516a
PluginExtensions: Add category support to explore toolbar extension point (#72194)
Added support for categories to explore UI extensions.
2023-07-24 16:20:36 +02:00
renovate[bot]
c280f884f0
Update dependency @grafana/experimental to v1.6.1 (#68681)
* Update dependency @grafana/experimental to v1.6.1

* chore(mssql-datasource): update completion provider to work with experimental type changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-07-24 15:47:55 +02:00
Ashley Harrison
2374458e94
Nested folders: use FolderPicker in dashboard settings (#72192)
* Use new NestedFolderPicker in SaveDashboardAsForm

* use FolderPicker wrapper in dashboard settings

* fix e2e test

* actually pass the deprecated props to the component

* just pass value

---------

Co-authored-by: joshhunt <josh@trtr.co>
2023-07-24 14:27:47 +01:00
Ivana Huckova
5bb280cb3f
Logs: Remove logsSampleInExplore feature toggle (#72092)
* Logs: Remove logsSampleInExplore feature toggle

* Remove unused import

* Fix incorrect import
2023-07-24 14:24:43 +02:00
Andres Martinez Gotor
987624f8cf
Chore: Move StreamingDataFrame to @grafana/data (#72014) 2023-07-24 13:30:52 +02:00
Josh Hunt
3c48701f08
Use new NestedFolderPicker in SaveDashboardAsForm (#72189) 2023-07-24 11:11:35 +00:00
Marcus Andersson
57a54fc38a
PluginExtensions: Add category to link extensions (#71074)
* adding a panel menu group item to UI extensions.

* draft

* Fixed so we support groups in the old panel menu.

* added proper styling.

* Made tests green and small refactor.

* Added tests for panel menu category.

* Will truncate the extensions category to 25 chars.

* added test for truncating category.
2023-07-24 13:08:59 +02:00
Alexander Zobnin
a2442ef620
Auth: Don't show LDAP CTA card (#72121) 2023-07-24 12:56:18 +02:00
Josh Hunt
1fde7f7f46
NestedFolders: Switch between old and new folder picker components (#72124)
NestedFolders: Create wrapper to switch between old and new folder picker components
2023-07-24 10:25:32 +00:00
Ashley Harrison
56ae5abf08
Chore: remove comment that doesn't apply anymore (#72186)
remove comment that doesn't apply anymore
2023-07-24 10:13:21 +00:00
mikkancso
b08271da32
Connections: Stop using dataConnectionsConsole feature toggle (#72111)
* remove dataConnectionsConsole feature toggle

* fix imports

* reintroduce dataConnectionsConsole

To prevent breaking change
2023-07-24 10:54:52 +02:00
Matias Chomicki
84f94cdc24
Logs: Show active state of "filter for value" buttons in Logs Details (#70328)
* Datasource test: fix describe nesting

* Parsing: export handleQuotes function

* Modify query: add functions to detect the presence of a label and remove it

* Loki: add support to toggle filters if already present

* Datasource test: fix describe nesting

* Loki: add support to toggle filter out if present

* Remove label: handle escaped values

* Datasource: add test case for escaped label values

* Loki: remove = filter when applying !=

* Remove selector: add support for Selector node being far from Matcher

* Modify query: add unit tests

* Elasticsearch: create modifyQuery for elastic

* Elastic modify query: implement functions

* Elasticsearch: implement modifyQuery functions in datasource

* Elasticsearch: update datasource test

* Loki modify query: check for streamSelectorPositions length

* Elasticsearch query has filter: escape filter value in regex

* Remove unused type

* Modify query: add functions to detect the presence of a label and remove it

* Remove label: handle escaped values

* Logs: create props to check for label filters in the query

* Log Details Row: use label state props to show visual feedback

* Make isCallbacks async

* Explore: add placeholder for checking for filter in query

* Datasource: define new API method

* Inspect query: add base implementation

* Remove isFilterOutLabelActive as it will not be needed

* Check for "isActive" on every render

Otherwise the active state will be out of sync

* Elasticsearch: implement inspectQuery in the datasource

* Logs: update test

* Log details: update test

* Datasources: update tests

* Inspect query: rename to analize query to prevent confusion

* Datasource types: mark method as alpha

* Explore: add comment to log-specific functions

* Remove duplicated code from bad rebase

* Remove label filter: check node type

* getMatchersWithFilter: rename argument

* Fix bad rebase

* Create DataSourceWithQueryManipulationSupport interface

* Implement type guard for DataSourceWithQueryManipulationSupport

* DataSourceWithQueryManipulationSupport: move to logs module

* hasQueryManipulationSupport: change implementation

`modifyQuery` comes from the prototype.

* DataSourceWithQueryManipulationSupport: expand code comments

* AnalyzeQueryOptions: move to logs module

* DataSourceWithQueryManipulationSupport: add support for more return types

* Fix merge error

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

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* DatasourceAPI: deprecate modifyQuery

* Explore: refactor isFilterLabelActive

* DataSourceWithQueryModificationSupport: rename interface

* Split interfaces into Analyze and Modify

* Query analysis: better name for interface

* Fix guard

* Create feature flag for active state

* Use new feature flag in Explore

* DataSourceToggleableQueryFiltersSupport: create a specific interface for this feature

* Rename feature flag

* De-deprecate modifyQuery

* DataSourceToggleableQueryFiltersSupport: Rethink types and methods

* Explore: adjust modifyQuery and isFilterLabelActive to new methods

* Loki: implement new interface and revert modifyQuery

* DataSourceToggleableQueryFiltersSupport: better name for arguments

* Elasticsearch: implement new interface and revert modifyQuery

* Loki: better name for arguments

* Explore: document current limitation on isFilterLabelActive

* Explore: place toggleable filters under feature flag

* Loki: add tests for the new methods

* Loki: add legacy modifyQuery tests

* Elasticsearch: add tests for the new methods

* Elasticsearch: add legacy modifyQuery tests

* Toggle filter action: improve type values

* Logs types: update interface description

* DataSourceWithToggleableQueryFiltersSupport: update interface name

* Update feature flag description

* Explore: add todo comment for isFilterLabelActive

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-07-24 11:22:47 +03:00
Nathan Marrs
8c86a46440
Phlare: Set enum field type to enum instead of integer (#72078)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-07-21 13:08:23 -05:00
Nathan Marrs
9a6a739003
TestData: Update Flame Graph scenario to use enum field type for label (#72082)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-07-21 20:27:23 +03:00
Leon Sorokin
1de35bf3c3
TimeSeries / StateTimeline: Add support for rendering enum fields (#64179)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-07-21 11:38:11 -05:00
Josh Hunt
3457ccbf12
FolderPicker interaction reporting (#71896)
* FolderPicker interaction reporting

* rename event
2023-07-21 18:23:05 +03:00
Josh Hunt
a5016c9e88
NestedFolders: API improvements for NestedFolderPicker (#72093)
* NestedFolders: Prepare nested folder picker for more usage

* fix betterer results

* Update usage of NestedFolderPicker

* fix tests

* fix betterer
2023-07-21 15:40:39 +01:00
Josh Hunt
f3235ba959
NestedFolders: Rename FolderPicker to OldFolderPicker (#72098)
* Rename FolderPicker to OldFolderPicker

* fix jest mock

* fix jest mock
2023-07-21 13:24:43 +00:00
Josh Hunt
b9fc097ccd
NestedFolderPicker: Fix forms being submitted when opening folder picker (#72109)
Fix NestedFolderPicker submitting forms when opened
2023-07-21 15:57:09 +03:00
Ashley Harrison
f078a0bb40
NestedFolderPicker: Allow for excluding certain uids (#72019)
* exclude some uids from nested folder picker so you can't move a folder to itself

* rename excludedUids to excludeUIDs
2023-07-21 13:10:23 +01:00
Ashley Harrison
8f464ac66e
NestedFolderPicker: Correctly handle pagination (#72030)
correctly handle pagination in the folder picker when there is more than 1 page of dashboards
2023-07-21 13:08:19 +01:00
Gareth Dawson
4e42f9b619
Loki: Add the ability to prettify logql queries (#64337)
* pushed to get help of a genius

* fix: error response is not json

* feat: make request on click

* refactor: remove print statement

* refactor: remove unnecessary code

* feat: convert grafana variables to value for API request

* use the parser to interpolate and recover the original query (#64591)

* Prettify query: use the parser to interpolate and recover the original query

* Fix typo

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

* Fix typo

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

* fix: reverse transformation not working

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>

* fix: bugs created from merge

* refactor: move prettify code out of monaco editor

* fix: variables with the same value get converted back to the incorect variable

* refactor

* use consistent styling with bigquery

* fix: only allow text/plain and application/json

* fix: only make the request if the query is valid

* endpoint now returns application/json

* prettify from js

* WIP: not all cases are handles, code still needs cleaning up

* WIP

* large refactor, finished support for all pipeline expressions

* add tests for all format functions

* idk why these files changed

* add support for range aggregation expr & refactor

* add support for vector aggregation expressions

* add support for bin op expression

* add support for literal and vector expressions

* add tests and fix some bugs

* add support for distinct and decolorize

* feat: update variable replace and return

* fix: lezer throws an errow when using a range variable

* remove api implementation

* remove api implementation

* remove type assertions

* add feature flag

* update naming

* fix: bug incorrectly formatting unwrap with labelfilter

* support label replace expr

* remove duplicate code (after migration)

* add more tests

* validate query before formatting

* move tests to lezer repo

* add feature tracking

* populate feature tracking with some data

* upgrade lezer version to 0.1.7

* bump lezer to 0.1.8

* add tests

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-07-21 13:03:56 +01:00
Matias Chomicki
c84d689ce0
Loki: Enable Query Splitting by default (#72094)
* lokiQuerySplitting: enable feature flag by default

* Query stats: add special note for stats + splitting
2023-07-21 13:53:10 +02:00
RoxanaAnamariaTurc
e7ad60bfc7
A11Y: Added the name of the section to collapse button for screenreader (#72010)
A11Y: Added the name of the section  to aria-label of the button to collapse or expand section in the navigation tree
2023-07-21 09:54:48 +01:00
Ashley Harrison
01369e6aff
Chore: fix .eslintignore to only ignore folder paths at the root (#72032)
fix eslintignore to only ignore folder paths at the root
2023-07-21 09:17:42 +01:00