Commit Graph

18256 Commits

Author SHA1 Message Date
Josh Hunt
0b2a4322db
NestedFolders: Fix warning from tests, restore page default export (#66441)
NestedFolders: Fix warning from tests, and restore default export for page
2023-04-13 10:46:24 +01:00
mikkancso
659024f672
EditDataSources: Add EditDataSourceActions to EditDataSourcePages (#64487)
* add EditDataSourceActions to EditDataSourcePages

* fix tests

* EditDSPage: do not show buttons in header if topnav is off

* remove delete button from the header

* EditDSPage: hide buttons from footer when topnav is on

* update tests

* rename ActionProps to Props

* wrap setting of feature toggle in act in jest test

* fix jest test by using waitFor
2023-04-13 09:53:18 +02:00
Piotr Jamróz
92b69dfb97
Correlations: Track completion rate for adding correlations (#66361)
Track completion rate for adding correlations
2023-04-13 09:48:09 +02:00
Sven Grossmann
89f23fcbc9
Logs: Fix typo in filename of loki/LogContextProvider (#66410)
change filename to match class name
2023-04-13 09:39:55 +02:00
Kyle Cunningham
00cf561f43
Dashboard Datasource: Update Language (#66015)
Update language on dashboard datasource
2023-04-13 11:46:15 +07:00
Leon Sorokin
2b2a4e13e5
Prometheus: Incremental querying option for to: now dashboards (#62932)
Provide new feature in Prometheus dashboards to cache queried time series data, modify requests to not include previously cached data in order to improve dashboard refresh performance. 

Co-authored-by: Galen <galen.kistler@grafana.com>
Co-authored-by: Leon <leon.sorokin@grafana.com>
2023-04-12 13:10:10 -05:00
Torkel Ödegaard
4ea7677bff
Explore: Start using PanelChrome as container (#66370)
* Explore: Start using PanelChrome as container

* fix test

* Fixing issue with test and timerange
2023-04-12 18:58:08 +02:00
Torkel Ödegaard
0c032460ca
VizLegend: Fixes flicking visualization height & re-render (#66331)
* VizLegend: Fixes flicking visualization height & re-render

* Fix test
2023-04-12 18:57:42 +02:00
Torkel Ödegaard
77852d587d
DashboardChangedModal: Update and fix design issues (#66380) 2023-04-12 18:57:25 +02:00
Ryan McKinley
b83627a661
Table Panel: Fix panel migration for options cell type (#66305) 2023-04-12 08:52:44 -07:00
ismail simsek
08727b7d6c
Prometheus: Show initial hint on builder mode when metric lookup disabled (#65827)
* Show initial hint on builder mode when metric lookup disabled

* Disable MetricEncyclopedia and label request when metric lookup is disabled
2023-04-12 17:22:35 +02:00
ismail simsek
4e71c91cfd
InfluxDB: Fix Interpolation when querying variables (#65875)
Interpolate variables with InfluxQueryModel
2023-04-12 16:34:14 +02:00
ismail simsek
d4bd024951
Expressions: Fix expression load with legacy UID -100 (#65950)
* Fix expressions instance settings loading

* Introduce a new method to get name or uid

* Update public/app/features/plugins/datasource_srv.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Move getNameOrUid method outside the class

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-12 16:33:31 +02:00
Ivana Huckova
e12598f55c
Loki: Move log context to separate log context provider (#66357)
* Loki: Move log context to separate provider

* Update public/app/plugins/datasource/loki/LogContextProvider.ts

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

* Fix lint

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-04-12 15:09:37 +02:00
Galen Kistler
cca109eb77
Prometheus: Query cache flakey tests (#66366)
Fix flaky tests
2023-04-12 07:28:51 -05:00
Ivana Huckova
303777e682
Elasticsearch: Add feature toggle to disable running queries trough backend (#66260)
* Elasticsearch: Create feature toggle to disable running queries trough backend

* Fix frontend tests running trough frontend

* Update description of feature toggle
2023-04-12 15:20:43 +03:00
Ivana Huckova
29c43fcf7e
Explore: Remove deprecated DataSourceWithLogsVolumeSupport (#66266)
Logs volume: Remove deprecated DataSourceWithLogsVolumeSupport
2023-04-12 14:10:14 +02:00
Eric Leijonmarck
2eed889ab7
Service accounts: Refactor to make roleOptions act as Users for service accounts (#66107)
add fetchAC for licenseenabled
2023-04-12 11:07:06 +01:00
Josh Hunt
5df33c0dc1
NestedFolders: New Browse Dashboards views (#66003)
* scaffold new browse routes

* a part of rtk query

* load nested data

* .

* link nested dashboards items

* add comment about bad code, update codeowners

* tidies
2023-04-12 10:44:01 +01:00
Matias Chomicki
db84277244
Logs Navigation: Fix typo in test description (#66293)
Fix typo in test description
2023-04-12 08:27:31 +00:00
Piotr Jamróz
4e14224669
Correlations: Fix parsing create/update response (#66193)
* Fix parsing create/update response

* Make types more explicit
2023-04-12 10:13:28 +02:00
Torkel Ödegaard
1ed75f9709
PageNotFound: Update design so that it looks better in topnav (#66295) 2023-04-11 19:19:25 +02:00
SatVeer Singh
c4f2b50da9
Cloudwatch: Fix ui bug in template variable editor (#66207) 2023-04-11 18:37:08 +02:00
Kousik Mitra
2ecd63764e
Datasource/Loki: Add tooltip explaining resolution for loki query (#66283)
* Add tooltip explaining resolution for loki query

* Update tooltip text with more detail

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Fix lint error

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-04-11 18:01:26 +02:00
Matias Chomicki
931ae02f26
Logs Navigation: Scroll to first log when using pagination (#66214)
* Logs: add reference to the start of the logs

* Logs: Improve pagination by scrolling to the first log

* Logs: move first log ref

* Logs navigation: reset scroll on page changes

* Update tests

* Logs navigation: unify reference to start of logs for scrolling to top

* Chore: update test title

* Move scrolling reference a bit more to the top
2023-04-11 16:26:50 +02:00
Victor Marin
02a8bc76d2
SQL Datasources: Fix variable throwing error if query returns no data (#65937)
* Fix SQL query variable throwing error if query returns no data

* Tests to verify that metricFindQuery returns properly and doesn't throw error

* Fix all codepaths that might throw errors because of undefined backendSrv response
2023-04-11 15:54:55 +03:00
Ashley Harrison
0aa301e251
Navigation: Scrolled hamburger menu links now navigate correctly in Safari (#66261)
overlayProps/dialogProps need to go inside FocusScope
2023-04-11 13:05:08 +01:00
Sven Grossmann
e9b15eff72
Logs: Move components to dedicated directory (#65936)
* move log-context components to dedicated directory

* fix any

* add right format of lerna.json
2023-04-11 12:19:28 +02:00
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
Ashley Harrison
2e2c989530
Dashboard: rewrite useDashboardSave to not use useEffect (#65602)
rewrite useDashboardSave to not use useEffect
2023-04-11 09:10:32 +01:00
Ashley Harrison
1d0e74f998
PanelHeaderMenuTrigger: Store clickCoordinates in a ref instead of state (#65601)
rewrite panelheadermenutrigger to use ref instead of state
2023-04-11 09:08:46 +01:00
Piotr Jamróz
0bf2b89eb9
Explore: Align multiple log volumes (#64356)
* Align log volumes on x an y axes

* Move helper functions to logs/utils

* Add tests

* Simplify supplementaryQueries.ts

* Fix tests

* Revert code simplifications

To simplify the PR, this can be added in a separate PR

* Fix reusing logs volume when limited/non-limited are used

* Use more specific property name

* Add missing property

* Stretch graph to selected range but only if there's data available

* Fix unit tests

* Fix calculating maximum when bars are stacked

* Sort log volumes by data source name

* Simplify logic to determine if log volumes can be zoomed in
2023-04-11 10:05:04 +02:00
Piotr Jamróz
b302cc2297
Correlations: Show correct number of variables (#66191)
* Show correct number of variables

* Remove duplicated test
2023-04-11 08:53:00 +02:00
juanicabanas
759a05083a
Panels: GeomapPanel edit mode fix (#66222) 2023-04-10 17:02:20 -07:00
Khushi Jain
4ba7c48cf5
Search: Add clear search button to the input bar (#66204) 2023-04-10 18:16:07 +02:00
Ryan McKinley
af31c77331
Dataplane: Support prometheus dataplane contract for transformations and name matchers (#65237)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2023-04-08 00:13:19 +03:00
Galen Kistler
6ab7ed0f66
Prometheus: Fix flaky unit test (#66188)
Fix flaky unit test
2023-04-08 00:06:02 +03:00
Artur Wierzbicki
d9b4aa07f7
Previews: remove dashboard previews UI (#66146)
* remove dashboard previews ui

* remove dashboard previews ui

* remove layout prop

* remove layout prop
2023-04-07 19:15:46 +04:00
Gilles De Mey
cb8a5b2c96
Alerting: Fix explore link in alert detail view (#66106) 2023-04-07 14:48:46 +03:00
George Robinson
3e12b72f58
Alerting: Fix docs link when creating or editing rules (#66019) 2023-04-07 11:31:18 +00:00
Domas
5dc529a55d
Query Splitting: Fix for handling queries with no requestId (#66161)
Loki query splitting fix for when there's no request id
2023-04-07 13:31:18 +03:00
Torkel Ödegaard
e10ef2241d
Transformations: Improve UX and fix refId issues (#65982)
* Transformations: Improve UX and fix refId issues

* Show query names and frame names in description

* move to main grafan UI component

* Added unit test

* Fix lint error

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-07 08:31:37 +02:00
Josh Hunt
a6a4326820
Chore: remove console.log from search (#66124) 2023-04-06 13:18:24 +00:00
Torkel Ödegaard
3843c73162
Table: Fix migrations from old angular table for cell color modes (#65760)
* Table: Fix migrations from old angular table

* Update defaults
2023-04-06 09:19:26 +02:00
Victor Marin
df62bba354
XYChart: Add all dataset columns in tooltip (#65027)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-05 23:07:27 +03:00
Kevin Yu
c235ad67e7
CloudWatch Logs: Document logs data protection (#65967)
* CloudWatch Logs: Document logs data protection

* fix href
2023-04-05 12:20:23 -07:00
Piotr Jamróz
423abe3cea
Correlations: Show variables used in the target query (#66009)
* Show variables used in the target query

* Remove redundant dot

* Add usage stats about correlations

* Revert "Add usage stats about correlations"

This reverts commit 6f0c70084a.
2023-04-05 21:15:25 +02:00
Piotr Jamróz
90b15d41bf
Correlations: Don't show Add button in empty call-to-action page when user has no sufficient permissions (#66006)
Do not show add correlation button if user has no permissions to add new correlations
2023-04-05 21:08:12 +02:00
Virginia Cepeda
f27326f7d9
Alerting: Choose a previous valid AM configuration in case of error (#65746)
* Add new property to AlertmanagerConfig type

* Implement fetching successfully applied configurations

Added method to fetch them from the API and its corresponding action and reducer

* Extract ConfigEditor as component to avoid code duplication

* Display dropdown with valid configs upon error and allow to save them

* Fix tests

* Refactor to call new endpoint using RTK

* Improve texts

* Apply suggested refactor

* Change constant casing

* Only show config selector for Grafana AM

* Remove ts-ignore

* Move code together for simplicity

* Remove invalid mock

* Update endpoint and types based on backend changes

* Rename property

* Rename alermanager config property from backend changes

* Disable editing old configurations

Due to the latest backend changes, we no longer will provide the option to edit previous AM configurations in a textearea.
Instead users will only be allowed to reset to a specific one with the same content. For this reason the textearea for old conf
igurations is disabled and a different form action (not submit) is executed on the "reset config" button. The updateAlertManage
rConfigAction is reset to its old functionality due to these changes.

* Add id to AlertManagerCortexConfig type

We'll need it to pass as a parameter to the new reset endpoint

* Add new endpoint for resetting AM configs to an old version

* Move the "Reset to selected configuration" button next to the drop-down

* Add relative offset to configurations
2023-04-05 15:13:33 -03:00
Matias Chomicki
58287c2df2
Loki Query Editor: Increase autocomplete suggestions window with to 50% (#66041)
Loki Monaco Editor: Increase autocomplete min width to 50%
2023-04-05 16:46:44 +00:00