Commit Graph

16024 Commits

Author SHA1 Message Date
Nathan Marrs
5d9ffe54ee
Canvas: Enable multi-select via shift key 2022-06-29 10:00:58 -07:00
Seyaji
2473dc68f6
Chore: Convert KeyValuesTable to RTL (#51278)
* Convert KeyValuesTable to RTL

* Update data-testid

* Update data-testid

* Convert KeyValuesTable to RTL

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 16:44:48 +01:00
kay delaney
8053f770c1
Export: Fix export/import of dash with library panels (#49319) 2022-06-29 16:18:27 +01:00
Michael Mandrus
fd3c986ceb
Plugins: disable management of secrets manager plugins through the UI (#51553)
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not

* show disabled badge in front end if the plugin is not enabled

* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")

* refactor to make use of fields already available in the DTO

* fix typo

* if there is no error returned for the plugin, just show 'disabled'

* fix typo

* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx

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

* Update frontendsettings.go

add clarifying comment

* fix unit test

* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled

* Update helpers.test.ts

revert test change

* fix unit test

* show custom uninstall message if the plugin is a secrets manager

* bogus commit to trigger precommit

* undo commit

* run precommit manually

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 11:05:54 -04:00
ismail simsek
0de544f3a2
Handle scalar and string resultType separately (#51411) 2022-06-29 16:43:33 +02:00
Maria Alexandra
76aa4f770e
SearchV2: add back the column styles for the SearchResultsTable component (#51549) 2022-06-29 15:45:20 +02:00
Kristina
73ceb25035
Remove async, set static actions from response and not state variable (#51556) 2022-06-29 08:38:09 -05:00
Michael Mandrus
7ef21662f9
Plugins: Show that Secrets Manager Plugin is active in the UI (#50953)
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not

* show disabled badge in front end if the plugin is not enabled

* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")

* refactor to make use of fields already available in the DTO

* fix typo

* if there is no error returned for the plugin, just show 'disabled'

* fix typo

* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx

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

* Update frontendsettings.go

add clarifying comment

* fix unit test

* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled

* Update helpers.test.ts

revert test change

* fix unit test

* bogus commit to trigger precommit

* undo commit

* run precommit manually

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 08:48:23 -04:00
Polina Boneva
f83f05d6b3
Variables: variables in Markdown links are not interpolated (#51392)
* on a text panel first interpolate, then markdown, then sanitize;

* update devenv dashboard + e2e tests

* fix typo and undo changes in grafana/data

* handling of config option disableSanitizeHtml more readable when preparing markdown in text panel

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 15:26:31 +03:00
Ivana Huckova
60454192b7
Loki: Add e2e test for query builder (#51314)
* Loki: Add e2e test for query builder

* Update

* Update test

* Update test

* Update test

* Update test

* Add more checks in test

* Update betterer

* Update betterer
2022-06-29 11:04:27 +02:00
Ashley Harrison
683bbc7373
Templating: Changing between variables with the same name now correctly triggers a dashboard refresh (#51490)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.ts

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.test.ts

* linting

* update betterer

Co-authored-by: kay delaney <kay@grafana.com>
2022-06-29 09:10:55 +01:00
Leon Sorokin
d32ec75661
HeatmapNG: expand log y axis min/max config to full powers (#51472)
also fix x bucket count setting for calculate (regressed in #51089)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-28 19:13:13 -05:00
Jguer
6d0261263c
ServiceAccounts: Add Service Account Token last used at date (#51446)
* ServiceAccounts Add api key last used at

* ServiceAccounts: LastUpdateAt tests
2022-06-28 16:42:40 +02:00
Dominik Prokop
daf0e3cb4e
Bar chart: Fix stacking bug when data produces 0 accumulators (#51450)
* Don't divide by 0 ...

* Add test panel to gdev dashboard
2022-06-28 07:21:18 -07:00
Torkel Ödegaard
f047f7dcf6
TopNav: A possible approach having a TopNav that lives outside route (#51301)
* Add topnav in Route

* TopBar: Good progress on a approach that looks promising

* Added some elements to top level

* Get page nav from route

* Progress

* Making breadcrumbs slightly more real

* Updates

* Memoize selector

* Removed some console.log

* correctly type iconName

* betterer updates

* Change setting to hideNav

* Rename again

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-28 09:47:12 -04:00
Ashley Harrison
2429fe1c70
Search: Add unit tests for SearchResultsTable (#51269)
* initial scaffolding for unit tests

* more tests for searchresultstable

* skip failing test, remove unused css

* Correctly mock stuff so TableCell renders correctly!
2022-06-28 12:48:59 +01:00
Gilles De Mey
3ab410de0b
QueryEditorRow: Render frame warnings in QueryEditorRow (#50116) 2022-06-28 13:38:31 +02:00
Gilles De Mey
97c9b25d44
Alerting: Skip the default data source if incompatible (#51452) 2022-06-28 10:05:53 +02:00
Timur Olzhabayev
7c886fb6f9
Frontend Logging: Integrate grafana javascript agent (#50801)
Add Grafana Javascript Agent integration to Grafana
2022-06-28 03:25:30 -04:00
Ryan McKinley
b6a9b9804d
Plugin admin: Add a page to show where panel plugins are used in dashboards (#50909) 2022-06-27 20:23:43 -04:00
Leon Sorokin
89b150ab58
HeatmapNG: pre-allocate arrays during calc (#51465) 2022-06-27 18:43:59 -05:00
Ryan McKinley
cfbfacb152
Heatmap: migrate old zero gap to one (#51467) 2022-06-27 19:13:09 -04:00
Alexander Zobnin
0e1f0dd8f5
Geomap: Route/path visualization (#43554)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-27 09:45:09 -07:00
Ezequiel Victorero
99f921cf32
Public Dashboards: adding telemetry for Sharing Modal options and Public Dashboards events (#50834)
* Public Dashboards: adding telemetry for Sharing Modal options and Public Dashboards events
2022-06-27 12:33:30 -03:00
Ashley Harrison
ee3f4f1709
Navigation: Display Starred dashboards in the Navbar (#51038)
* remove feature toggle, add empty state and fix bug with initial starring

* Extract empty message into lingui

* remove full stop

* add empty message in the backend

* remove unused import

* translate starred + empty starred states

* betterer changes
2022-06-27 15:41:00 +01:00
Daniel Lee
292b24e30d
Piechart: Implements series override -> hide in area for the legend or tooltip (#51297)
* piechart: support series override for hiding legend item

* piechart: add support for hiding values in multi tooltip

* tidy up variable names

* piechart: typing for hideFrom variable

* betterer fixes
2022-06-27 15:13:19 +02:00
Dominik Prokop
b2b0be7b93
Table panel: Add multiple data links support to Default, Image and JSONView cells (#51162)
* Table panel: Support multiple data links in default cell

* Table panel: Show data links for Image and JSONView cells

* Simplify DataLinksContextMenu api

* Betterer
2022-06-27 05:23:29 -07:00
Joao Silva
f2d8b1ceee
Dashboards: Fixes issue with the initial panel layout counting as an unsaved change (#51315) 2022-06-27 12:30:59 +01:00
Nathaniel Saxe
683f31f2c6
Variables: improve performance of transformMetricFindResponse (#49360)
* improve performance of transformMetricFindResponse

* use lodash uniqBy for postgres

* use lodash uniqBy for mysql

* use lodash uniqBy for mssql

* hopefully conform to import linting rules

* Added .betterer.results

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-06-27 14:26:46 +03:00
Gilles De Mey
bcc43aa0bc
Alerting: adds additional command palette actions (#51393)
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-06-27 11:57:37 +02:00
Patrick Baus
26424260ca
Alerting: Use relative path for flow chart image (#51409) 2022-06-27 11:19:04 +02:00
Sofia Papagiannaki
1399ab50b3
API: Universal swagger generation (#51033) 2022-06-27 10:54:31 +03:00
Vardan Torosyan
7f0c33d8a4
Update the hint text in service accounts to point to docs (#51400)
* Update the hint text in service accounts to point to docs

* Update ServiceAccountsListPage.tsx
2022-06-27 09:18:16 +02:00
Ryan McKinley
c8f814196a
CommandPalette: Populate dashboard search when the palette is opened (#51293)
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-06-24 23:08:29 +02:00
Ivana Huckova
d3dd3042d6
Loki: Fix support of ad-hoc filters for specific queries (#51232)
* Loki: Refactor ad-hoc filters to use parser

* Remove renaming of files for easier review

* Update

* Update

* Add previously buggy test

* Fix tests

* Fix typos

* Update, improve typing

* Move reused code up

* Update order

* Update betterer statss
2022-06-24 22:29:22 +02:00
Artur Wierzbicki
c496b3e712
Search: Fix pagination in the new search page (#51366)
* Fix pagination in the new search

* update betterer betterer betterer betterer betterer betterer

* revert packagejson
2022-06-24 21:21:59 +04:00
Todd Treece
342344bb03
Variables: Selectively reload panels on URL update (#51003) 2022-06-24 13:06:36 -04:00
Leon Sorokin
7e1667ce87
HeatmapNG: explicitly pass scales for cursor sync config (#51389) 2022-06-24 11:42:39 -05:00
Connor Lindsey
620309ced5
Explore: Sort trace process attributes alphabetically (#51261)
* Explore: Sort trace process attributes alphabetically

* Update betterer?
2022-06-24 08:20:23 -06:00
Jguer
9a82ed7105
Remove LDAP specific example from team sync (#51368)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-24 15:29:50 +02:00
ismail simsek
c804639b53
Hide datalink button when datasource for exemplar is undefined (#51236) 2022-06-24 15:26:52 +02:00
Ivana Huckova
0d899e2635
FeedbackLink: Add tracking (#51251) 2022-06-24 15:08:24 +02:00
Joey Tawadrous
6b407f7265
Update metrics (#51117) 2022-06-24 10:19:26 +01:00
Ivana Huckova
f7db3d2ae6
Logs: Fix report interaction name (#51335) 2022-06-24 10:37:16 +02:00
Ryan McKinley
dd5a3b7747
Heatmap: Replace the heatmap panel with new implementation (#50229) 2022-06-23 11:48:28 -07:00
Isabella Siu
497310a9cb
CloudWatch: Factor LogGroupSelector into a separate component (#50829) 2022-06-23 14:40:43 -04:00
Isabella Siu
8ba8e1df83
CloudWatch: fix variable query migration with json template variables (#51207)
* CloudWatch: fix variable query migration with json template variables

* fix error messages

* changes for reviews

* fix lint

* fix betterer
2022-06-23 14:23:56 -04:00
Ryan McKinley
a093250dd5
Chore: avoid implicit any by using inline functions (#51338) 2022-06-23 11:19:08 -07:00
Ezequiel Victorero
25d4ddf959
PublicDashboards: disable annotations (#50984)
* PublicDashboards: disable annotations
2022-06-23 13:09:30 -03:00
Ryan McKinley
eceb21e72d
Search: switch to a card view when the display is narrow (#51208) 2022-06-23 07:30:47 -07:00
Connor Lindsey
16aaffe0a1
Node Graph Panel: Add options to configure units and arc colors (#51057)
* Node Graph Panel: Add options to configure units and arc colors

* Add tests
2022-06-23 07:20:56 -06:00
Seyaji
ec1480b964
Chore: Convert DataSourceDashboards test to RTL (#51294)
* Convert DataSourceDashboards test to RTL

* Convert DataSourceDashboards test to RTL

* Convert DataSourceDashboards test to RTL

* Update public/app/features/datasources/DataSourceDashboards.test.tsx

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

* Convert DataSourceDashboards test to RTL

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-23 14:39:00 +03:00
Maria Alexandra
81dc9ef725
SearchV2: Add unit test to SearchResultsGrid (#51296)
* SearchResultsGrid add unit test

* Fix linting issues
2022-06-23 12:14:30 +02:00
Polina Boneva
496c2e26f4
I18n: User and Org Preferences allow change of Language (#51175)
* add locale selection settings under preferences; Alpha feature toggle;

* extract components' ids for internationalisation references

* migrate OrgDetailsPage tests from Enzyme to RTL

* test locale selection in shared preferences

* fix OrgDetailsPage needing a fetch polyfill; "Real fetch shouldn't be being hit." - Josh

* remove snapshot

* remove snapshot
2022-06-23 11:20:31 +03:00
Nathan Marrs
5d74701848
Canvas: Address center constraint on drag glitch (#51270) 2022-06-22 20:30:24 -07:00
Jeff Levin
d076bedb5e
public dashboards: finalize db schema & v1 feature complete (#50467)
This PR completes public dashboards v1 functionality and simplifies public dashboard conventions. It exists as a large PR so that we are not making constant changes to the database schema.

models.PublicDashboardConfig model replaced with models.PublicDashboard directly
dashboard_public_config table renamed to dashboard_public
models.Dashboard.IsPublic removed from the dashboard and replaced with models.PublicDashboard.isEnabled
Routing now uses a uuid v4 as an access token for viewing a public dashboard anonymously, PublicDashboard.Uid only used as database identifier
Frontend utilizes uuid for auth'd operations and access token for anonymous access
Default to time range defined on dashboard when viewing public dashboard
Add audit fields to public dashboard

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>, Ezequiel Victorero <ezequiel.victorero@grafana.com>, Jesse Weaver <jesse.weaver@grafana.com>
2022-06-22 13:58:52 -08:00
Ryan McKinley
773c269084
OptionsUI: UnitPicker now supports isClearable setting (#51064) 2022-06-22 13:49:44 -07:00
Ryan McKinley
3b1c7cc359
Annotations: do not show fields mappings for -- grafana -- datasource (#51256) 2022-06-22 13:05:16 -07:00
Joao Silva
cbefbd3ff7
Search: Adds tests to SearchView (#51248) 2022-06-22 17:20:57 +01:00
Yuriy Tseretyan
4d02f73e5f
Alerting: Persist rule position in the group (#50051)
Migrations:
* add a new column alert_group_idx to alert_rule table
* add a new column alert_group_idx to alert_rule_version table
* re-index existing rules during migration

API:
* set group index on update. Use the natural order of items in  the array as group index
* sort rules in the group on GET
* update the version of all rules of all affected groups. This will make optimistic lock work in the case of multiple concurrent request touching the same groups.

UI:
* update UI to keep the order of alerts in a group
2022-06-22 10:52:46 -04:00
Leon Sorokin
ef53a49896
HeatmapNG: skip y <= 0 values when log y axis (#51221) 2022-06-22 07:12:22 -07:00
Ashley Harrison
be6a878fd6
Annotations: Fixes a problem where annotation autocomplete would crash the panel (#51164)
* use custom formatCreateLabel in AnnotationEditorForm

* give `TagFilter` it's own formatCreateLabel

* only show TagBadge if the label is a string
2022-06-22 14:54:42 +01:00
Karl Persson
8b82bebdc5
RolePicker: Only select roles that is delegatable when selecting a group (#51246) 2022-06-22 15:49:32 +02:00
Karl Persson
454f65cd88
RolePicker: Only update org role if the value has changed (#51239) 2022-06-22 14:47:47 +02:00
Kevin Yu
f9becc2d4f
Cloud Monitoring: Update Metrics to use experimental UI components (#51134)
* update metrics component

* separate state variables

* add additonal tests
2022-06-22 05:39:08 -07:00
Josh Hunt
7cee620fbb
Chore: Use @types/webpack-env to type require.context (#51196) 2022-06-22 12:38:47 +01:00
Konrad Lalik
765b995b1b
Alerting: Alert rules pagination (#50612) 2022-06-22 11:33:39 +02:00
Karl Persson
2698e37291
RBAC: Add access control metadata to folder dtos (#51158)
* RBAC: Add access control metadata to Folder dto

* Add access control metadata to folder dto response

* Add test to verify that access control metadata is attached

* Attach access control metadata to multiple folders

* Add access control metadata to frontend folder dto
2022-06-22 10:29:26 +02:00
Josh Hunt
8fa951df04
Type window.nonce (#51200) 2022-06-22 09:28:05 +01:00
Josh Hunt
26f6b91fd9
Chore: Type GA and Rudderstack analytics config (#51197)
* Chore: Type GA and Rudderstack analytics config

* rely on implicit unknown
2022-06-22 09:27:55 +01:00
Josh Hunt
24bdda72fb
Barchart: Fix warning not showing (#51190) 2022-06-21 17:45:37 -05:00
Josh Hunt
357b859fa7
Remove any generics from configureMockStore in tests (#51179) 2022-06-21 17:48:52 +01:00
Josh Hunt
98132fc7dc
Remove as any from requireActual usage (#51182) 2022-06-21 17:48:38 +01:00
Seyaji
0bfd48c164
Chore: Convert DataLinks tests to RTL (#51137)
* Convert DataLinks tests to RTL

* Convert DataLinks test to RTL

* Convert DataLinks test to RTL

* Convert DataLinks test to RTL
2022-06-21 15:55:10 +01:00
Seyaji
bab017799e
Chore: Convert QueryOperationAction test to RTL (#51139)
* Convert QueryOperationAction test to RTL

* Convert QueryOperationAction to RTL

* Convert QueryOperationAction test to RTL
2022-06-21 15:53:10 +01:00
polibb
665da5d063
Template Variable: Datasource variable can be used when MIXED option is selected in panel query (#51170)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/query/components/QueryEditorRowHeader.test.tsx

* user essentials mob! 🔱

* test variables showing in data source picker dropdown on MIXED

* clean up unused imports

* remove comment

* remove unused mock

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-21 17:46:52 +03:00
Josh Hunt
bc7ed4baab
Chore: use jest.mocked in favor of type assertions/any (#51156)
* use jest.mocked instead of yucky any

* remove more anys in favor of jest.mocked

* fix stray unused variables
2022-06-21 13:47:33 +01:00
Maria Alexandra
395623b0a2
SearchV2: Add unit test for ManageActions (#51131) 2022-06-21 13:44:46 +02:00
Seyaji
3710c9a7c8
Chore: Convert DataSourcesListPage test to RTL (#51138)
* Convert DataSourceListPage test to RTL

* Convert DataSourceListPage test to RTL
2022-06-21 11:47:54 +01:00
renovate[bot]
a0ffb9093c
Update dependency react-dropzone to v14 (#49243)
* Update dependency react-dropzone to v14

* Changes needed for react-dropzone v13

* feat(FileDropzone): update props to be backward compatible

* refactor(filedropzone): clean up component story

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-21 11:10:00 +02:00
Josh Hunt
47abf44224
Chore: SharedPreferences tests (#51132)
* Add a test assertion function to make testing a little bit easier

* Add tests for SharedPreferences

* Remove some tests from UserProfileEditPage because we're testing SharedPreferences directly now
2022-06-21 09:36:34 +01:00
Ashley Harrison
05fbfdaa13
Search: add unit tests for FolderView (#51114)
* add unit tests for FolderView

* add basic unit test for Alert component

* prevent flicker of `No results found`
2022-06-21 09:35:03 +01:00
Leon Sorokin
f4f31b40fd
HeatmapNG: consolidate frame types & fix color ranging (#51089)
* rename yZeroDisplay -> yMinDisplay
* remove heatmap-cells-sparse frame type
* parse x bucket size to millis
* take into account hideLE & hideGE filters to auto-range color scale
* extract cell value range scanning to heatmapData
2022-06-20 15:38:13 -05:00
Ryan McKinley
c2aee2b6da
Geomap: Add alpha day/night layer (#50201)
Co-authored-by: drew08t <drew08@gmail.com>
2022-06-20 19:35:03 +02:00
Gilles De Mey
a37b868da7
Alerting: Provisioning UI (#50776)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-20 10:55:12 -04:00
Torkel Ödegaard
3c3293df78
TopNav: Adds new feature toggle for upcoming nav~ (#51115) 2022-06-20 16:25:43 +02:00
Kevin Yu
d8d1ca8151
add query header (#51072) 2022-06-20 07:06:14 -07:00
Gilles De Mey
6a1b8693e0
Alerting: Fix alert rule page crashing when datasource contained URL unsafe characters (#51105)
Any Prometheus datasources that contained URL unsafe characters would crash the application since it fails to find the datasource from the Grafana bootData.
2022-06-20 15:37:22 +02:00
Konrad Lalik
87bf0f4315
Alerting: Fix alert instances filtering for prom rules (#50850) 2022-06-20 15:37:05 +02:00
Kevin Yu
e889dfdc5c
Cloud Monitoring: Update GroupBy fields to use experimental UI components (#50541)
* Cloud Monitoring: Update GroupBy fields to use experimental UI components

* let group by field grow horizontally

* remove fixed width constants from inputs

* add test

* Cloud Monitoring: Update GraphPeriod to use experimental UI components (#50545)

* Cloud Monitoring: Update GraphPeriod to use experimental UI components

* Cloud Monitoring: Update Preprocessing to use experimental UI components (#50548)

* Cloud Monitoring: Update Preprocessing to use experimental UI components

* add tests

* make overrides optional

* move preprocessor back into its own row
2022-06-20 06:28:29 -07:00
Seyaji
902101c524
Chore: Convert PanelHeaderCorner test to RTL (#51074)
* export props

* Convert PanelHeaderCorner test to RTL

* Update public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.test.tsx

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-20 14:54:13 +02:00
Gilles De Mey
ab89fa0853
Alerting: Fix automatically select newly created folder option (#50949) 2022-06-20 14:48:57 +02:00
Seyaji
606732dd5e
Chore: Converts ButtonRow tests to RTL (#51068) 2022-06-20 15:46:11 +03:00
Seyaji
e4f4cc4a32
Chore: Convert pageActionBar test to RTL (#51073)
* Convert pageActionBar test to RTL

* add test for conditional render of button
2022-06-20 15:42:56 +03:00
Torkel Ödegaard
3a586a6053
PanelRenderer: Improves PanelRenderer performance (#51092)
* PanelRenderer: Improves PanelRenderer performance

* Minor refactor

* remove old func
2022-06-20 14:41:39 +02:00
Gilles De Mey
81a5436c1e
Alerting: Adds Mimir to Alertmanager data source implementation (#50943) 2022-06-20 12:56:38 +02:00
Andreas Christou
ecaa1dcbfd
AzureMonitor: Migrate to backend checkHealth API (#50448)
* Add check health functions for each datasource and generic checkHealth function

* Log backend errors

* Update testDatasource function

- Remove unused testDatasource functions from pseudo datasources

* Switch datasource to extend DataSourceWithBackend

* Improve errors and responses from health endpoint

* Fix backend lint issues

* Remove unneeded frontend tests

* Remove unused/unnecessary datasource methods

* Update types

* Improve message construction

* Stubbing out checkHealth tests

* Update tests

- Remove comments
- Simplify structure

* Update log analytics health check to query data rather than retrieve workspace metadata

* Fix lint issue

* Fix frontend lint issues

* Update pkg/tsdb/azuremonitor/azuremonitor.go

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

* Updates based on PR comments

- Don't use deprecated default workspace field
- Handle situation if no workspace is found by notifying user
- Correctly handle health responses

* Remove debug line

* Make use of defined api versions

* Remove field validation functions

* Expose errors in frontend

* Update errors and tests

* Remove instanceSettings

* Update error handling

* Improve error handling and presentation

* Update tests and correctly check error type

* Refactor AzureHealthCheckError and update tests

* Fix lint errors

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-20 11:33:13 +01:00
Gábor Farkas
48a258f515
loki: no histogram for instant queries (#50711) 2022-06-20 11:31:36 +02:00
Joey Tawadrous
5d65d4ce03
Traces: APM table improvements (#50969)
* Update rate and error rate query link

* Update tests for new rate and error rate links

* Update duration query

* Update tests for new duration query
2022-06-20 09:56:45 +01:00
Connor Lindsey
bd30e85031
Explore: Update service graph metrics and links (#50897) 2022-06-19 19:11:59 -06:00
Seyaji
244650835e
Refactor 'Basic Settings' test to RTL from Enzyme (#51059)
* Refactor 'Basic Settings' test to RTL from Enzyme

* Update public/app/features/datasources/settings/BasicSettings.test.tsx

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

* Refactor 'Basic Settings' test to RTL from Enzyme

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-18 13:13:51 +03:00
Ryan McKinley
caa92320d7
Heatmap: use y axis settings for units (#50998)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-17 23:30:26 +02:00
Kyle Cunningham
86b785d039
Time Series Panel: Add Null Filling and "No Value" Support (#50907)
* Use nullInsertThreshold and nullToValue in time series

* Allow for undefined timeRange to support certain candlestick uses of prepareGraphableFields

* Make sure null to value doesn't modify initial data

* Do a shallow values copy and avoid Array.push()

* Clean up null to value transformation.

* Add basic tests

* Remove redunant null threshold application flagging

* set nullThresholdApplied flag even when no null inserts were done

* Include nullThresholdApplied in test snapshot

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-17 14:38:59 -05:00
Ryan McKinley
c6f7e53e38
Heatmap: do not dim the values in the color scale legend (#50976) 2022-06-17 16:24:53 +02:00
Torkel Ödegaard
c6ab87008a
Dashboard: Remove super old prop that has not been used in years (#50826) 2022-06-17 14:55:35 +02:00
Joao Silva
36d6aef79f
Internationalisation: POC for loading the messages depending on the user selected locale (#50539) 2022-06-17 13:41:03 +01:00
asymness
43839dc40b
Playlists: Disable Create Playlist buttons for users with viewer role (#50840)
* Disable / hide buttons for creating playlist for users with viewer role

* Update tests

* Re-add mock for contextSrv module
2022-06-17 11:59:33 +00:00
Gábor Farkas
a22e9a0e0a
logs: merge log-lines-based and full-range histogram (#50507)
* logs: merge old-histogram and new-histogram

* better variable names

* better names

* refactor

* refactor

* refactor

* logs: remove log-volume-loading indicator
2022-06-17 11:42:46 +02:00
Ashley Harrison
1b9dd378f2
Chore: Unit tests for FolderSection (#50961)
* unit test scaffolding for FolderSection

* remove redundant spinner + more test scaffolding

* more test experimentation

* clear localStorage between test runs

* more tests + add back spinner when renderStandaloneBody

* bit of tidy up

* update Spinner data-testid

* fix import ordering
2022-06-17 10:14:33 +01:00
Erik Sundell
fcbe0059c2
CloudWatch: Allow hidden queries to be executed in case an ID is provided (#50987)
* allow hidden queries in case an id is provided

* cleanup test

* name tests properly
2022-06-17 10:24:38 +02:00
Andres Martinez Gotor
1f0c951bce
AzureMonitor: Update supported namespaces (#50788) and filter resources by the right type (#50880) 2022-06-17 10:15:20 +02:00
Torkel Ödegaard
7e22b8e6fb
Dashboard: Don't show unsaved changes modal for automatic schema changes (#50822)
* Dashboard: Don't show unsaved changes modal for automatic schema changes

* More refinements

* Fix logic in updateGridPos
2022-06-17 08:58:53 +02:00
Torkel Ödegaard
eb25d8df89
Expressions: Fixes dashboard schema migration issue that casued Expression datasource to be set on panel level (#50945)
* Expressions: Fixes dashboard schema migration issue that casued Expression datasource to be set on panel level

* fixing logic

* Updated
2022-06-17 08:57:11 +02:00
Leon Sorokin
406509cdd3
StateTimeline: make sure we use result of applyNullInsertThreshold() (#50988)
Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
2022-06-16 17:28:41 -05:00
Erik Sundell
1b51cd2043
DataSource: Allow data source plugins to set query default values (#49581)
* make it possible to set default query

* set default query in cloudwatch ds

* remove cloudwatch example code

* apply feedback

* Update public/app/features/explore/state/query.ts

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

* Update public/app/features/query/components/QueryGroup.tsx

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

* add alpha tag to method definiton

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-06-16 22:22:05 +02:00
Ryan McKinley
4a749e68a8
Geomap: Support showing tooltip content on click (not just hover) (#50985) 2022-06-16 22:08:42 +02:00
Jguer
32103fcd9f
Fix double change password calls (#50948) 2022-06-16 16:30:33 +02:00
Alexander Zobnin
5a35381f77
Service accounts: don't update RBAC roles in OSS when creating service account (#50922) 2022-06-16 16:22:52 +02:00
Alexander Zobnin
118b071d98
Service accounts: able to hide api keys migration info (#50933) 2022-06-16 16:22:05 +02:00
Laura
b09df60464
Revert "Explore: Convert SASS styles of explore-active-button to emotion (#50061)" (#50882)
This reverts commit 85ecf997be.
2022-06-16 14:39:54 +02:00
Ashley Harrison
d0fa326798
Chore: Remove newNavigation feature toggle and old navbar code (#50872)
* Remove newNavigation feature toggle + old code

* fix unit tests

* remove buildCreateNavLinks
2022-06-16 10:48:38 +01:00
jcolladokuri
ab8176d234
AzureMonitor: Update alerts dashboard (#50712) 2022-06-16 10:14:35 +02:00
Joey Tawadrous
bd6c027a01
Jaeger: Add support for variables (#50500)
* Add service variable

* Interpolate vars in query

* Add var in service select if it exists

* Add var in operation select if it exists

* Interpolate tags and serivce in operation query

* Interpolate vars for explore

* Add/update tests

* Tests

* Update format for tags that do not have vars
2022-06-16 08:17:38 +01:00
Kevin Yu
d88108a3b7
Cloud Monitoring: Update Alignment fields to use experimental UI components (#50536)
* Cloud Monitoring: Update Alignment fields to use experimental UI components

* remove unreachable code

* remove alias

* remove custom label style

* add tests
2022-06-15 18:03:47 -07:00
Leon Sorokin
7c175e019c
HeatmapNG: support y min/max config (#50900)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-15 17:24:51 -05:00
Ryan McKinley
ed6a9d65aa
Heatmap: implement cursor sync (#50271)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-15 21:45:54 +02:00
Ryan McKinley
e23dbfe605
Search: default layout to last selected value (#50743) 2022-06-15 10:07:34 -07:00
Kristina
dfa538ff92
Revert "Explore: Remove support for legacy, compact format URLs (#49350)" (#50873)
This reverts commit a9cc3225ba.

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-06-15 08:44:36 -05:00
Alexander Zobnin
f82264c2b1
ServiceAccounts: API keys migration (#50002)
* ServiceAccounts: able to get upgrade status

* Banner with API keys migration info

* Show API keys migration info on Service accounts page

* Migrate individual API keys

* Use transaction for key migration

* Migrate all api keys to service accounts

* Hide api keys after migration

* Migrate API keys separately for each org

* Revert API key

* Revert key API method

* Rename migration actions and reducers

* Fix linter errors

* Tests for migrating single API key

* Tests for migrating all api keys

* More tests

* Fix reverting tokens

* API: rename convert to migrate

* Add api route descriptions to methods

* rearrange methods in api.go

* Refactor: rename and move some methods

* Prevent assigning tokens to non-existing service accounts

* Refactor: ID TO Id

* Refactor: fix error message

* Delete service account if migration failed

* Fix linter errors
2022-06-15 14:59:40 +02:00
Ashley Harrison
94d585063e
Dashboard: Prevent non-repeating panels being dropped from repeated rows when collapsed/expanded (#50764)
* Mob: fix issue with repeating panels+rows, add e2e test

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>

* Fix describe block description

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>
2022-06-15 11:07:54 +01:00
Chrysa Dikonimaki
0753539721
Ayy1: Cannot save single dashboard link (#49075) 2022-06-15 10:28:42 +01:00
Konrad Lalik
9d0e7564ed
Alerting: Fix removal of notification policy without labels matchers (#50678) 2022-06-15 10:59:37 +02:00
Ashley Harrison
3430928294
Convert InviteesTable test to RTL (#50674) 2022-06-15 09:54:26 +01:00
Ashley Harrison
803473f479
Chore: Enable useUnknownInCatchVariables for stricter type checking in catch blocks (#50591)
* wrap a bunch of errors

* wrap more things!

* fix up some unit tests

* wrap more errors

* tiny bit of tidy up
2022-06-15 08:59:29 +01:00
Alex Khomenko
2fbe99c1be
RolePicker: Fix submenu position on horizontal space overflow (#50769) 2022-06-15 09:51:32 +03:00
Adela Almasan
1af63ba5f9
OptionsUI: use NumberInput for number options (#46046)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-14 22:42:26 +02:00
Kristin Laemmert
a33a023629
backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609)
* backend/api: refactor PlaylistId to PlaylistUid
* Add org_id to Get and Update playlist functions
Fix migration - no longer pad the uid; fix mysql syntax

The relevant tests are passing using postgres, mysql and the default sqllite backends, but there are a number of other failing tests when using postgres and myself so I'm not entirely confident with those results.

* fix bad query in GetPlaylistItem and add a test that would have caught the mistake in the first place. Reverted the playlist_uid column addition in playlist_item; it became unnecessary after this PR.

Added default value to the new UID column based on PR feedback.

* break this PRs migration into its own function

* Playlists: Update UI to use the updated API

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-06-14 15:32:52 -04:00
Ryan McKinley
58e7769158
OptionsUI: Move internal options editors out of @grafana/ui (#50739) 2022-06-14 08:05:11 -07:00
Connor Lindsey
ddf0f94248
Explore: Make service graph visualization use available vertical space (#50518)
* Explore: make service graph visualization use available vertical space

* Use react-use
2022-06-14 08:33:22 -06:00
Ivana Huckova
0073f1b0b5
Update header (#50787) 2022-06-14 16:24:44 +02:00
Levente Balogh
b184280cb3
fix: set base-path manually (#50773)
In case we didn't set a `basePath`, `<AppPluginLoader>` would always use the current path as a `basePath`.
This can get problematic in case the Cloud Onboarding app tries to handle it's own sub-routes.
2022-06-14 14:29:55 +02:00
Sofia Papagiannaki
7418a80264
API: Make Swagger specification more consistent (#50576)
* Fix swagger generation targer using mac

Validate using the swagger binarry instead of the docker container

* API: Make swagger specification more consistent

Fix operation parameter ordering
2022-06-14 12:35:22 +02:00
Joey Tawadrous
f87927c82e
Traces: Add absolute time to span details (#50685)
* Show absolute time

* Add test
2022-06-14 11:13:33 +01:00
Gábor Farkas
a97f022612
Loki: Handle invalid query type values (#50755)
* loki: more robust query-type handling

* better comment

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-14 11:48:49 +02:00
Levente Balogh
2a72dff356
Data Connections: make sub-routes work (#50754)
* fix(Data Connections): make sub-routes work

* test(Data Connections): add basic tests for sub-urls
2022-06-14 11:10:20 +02:00
Alex Khomenko
701edcdc46
UserListPage: Convert tests to RTL (#50717) 2022-06-14 11:39:43 +03:00
Kevin Lewin
5aab95885f
Alertmanager: Adding SigV4 Authentication to Alertmanager Datasource (#49718)
* adding sigv4 alertmanager

* adding sigv4 alertmanager

* ConfigEditor: Adding Render Prop
2022-06-14 10:15:21 +02:00
Ryan McKinley
b75cc7a86c
Heatmap: Remove alpha flag from new heatmap panel (#50733) 2022-06-14 07:18:54 +02:00
owensmallwood
1bb2d2599c
Public Dashboards: Pubdash panels get data from pubdash api (#50556)
* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Gets the panel data from the pubdash query api

* Adds tests to make sure we get the correct api url from retrieving panel data

* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Handle queries from multiple datasources

* Replace dashboard time range with pubdash time range settings

* Fix comments from review, build failure

* removes changes to DataSourceWithBackend.ts regarding getting the pubdash panel query url. Going to do this in a new class, PublicDashboardDataSource.ts

* Include pubdash Uid in dashboard meta

* Creates new PublicDashboardDataSource.ts and adds test

* Passes pubdash uid down to PanelQueryRunner.ts to a PublicDashboardDatasource can be chosen when were looking at a public dashboard

* removes comment

* checks for error when unmarshalling json

* Only replace dashboard time settings with pubdash time settings when pubdash time settings exist

* formatting and added comment

Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-13 18:03:43 -06:00
Drew Slobodnjak
07aa2bbbba
GeomapPanel: Add base types to data layer options (#50053)
* GeomapPanel: Add base types to data layer options

Removed isBaseMap check from data layer filter, which used to remove
base layer types from data layer options. For layer editor, slider to
control opacity is added.

* GeomapPanel: Reorder data layer options

For data layer selection, present user with data layer types first,
before base map layer types. Refactored to consolidate layer options
into a single exported function in registry with a base map boolean.

* GeomapPanel: Add descriptions to base map types

* GeomapPanel: add hideOpacity and apply to markers

* GeomapPanel: update descriptions for map types

Closes #47812
2022-06-13 14:07:20 -07:00
Ryan McKinley
402b5ce4c6
SearchV2: support keyboard navigation (#49650)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-13 09:10:19 -07:00
Gábor Farkas
d872aa993d
logs: better hasLogsVolumeSupport check (#50676) 2022-06-13 17:20:57 +02:00
Ryan McKinley
1902357693
Heatmap: consolidate naming conventions (#50272) 2022-06-13 08:08:33 -07:00
Sven Grossmann
d8d3a9c561
added opensearch annotations to not use default ui (#50655) 2022-06-13 17:07:38 +02:00
Ashley Harrison
d23bc5c390
Convert ApiKeysAddedModal test to RTL (#50669) 2022-06-13 14:52:17 +01:00
Ivana Huckova
77bdbe1dea
Loki: Fix showing of duplicated label values in dropdown in query builder (#50680)
* Prometheus,Loki: Fix showing of duplicated values in dropdown

* Use different more readable solution

* Update
2022-06-13 15:19:20 +02:00
Sriram
ede7b29db5
Expression: Execute hidden expressions (#50636) 2022-06-13 10:23:15 +01:00
Andrej Ocenas
bd04b776b5
Prometheus: Don't show undefined for step in collapsed options in query editor when value is "auto" (#50511) 2022-06-13 11:21:38 +02:00
Gábor Farkas
a2eb4e85e5
elasticsearch: always use fixed_interval (#50297) 2022-06-13 10:28:29 +02:00
Ivana Huckova
0ddb3b7521
Query history: Add swagger definitions (#50498)
* Query history: Add swagger definitions

* Update

* Remove changes in generated files

* Generate api files

* Add query history into api docs

* Add examples for commands

* Add missing parameters

* Generate api-spec and api-merged

* Fix linting

* Fix showing of example of queries

* Revert "Fix showing of example of queries"

This reverts commit b1eb073fbe.

* Update

* Update
2022-06-13 09:47:40 +02:00
Ivana Huckova
088a1880d8
Loki, Prometheus: Show Query patterns in all editor modes (#50263) 2022-06-13 09:45:01 +02:00
Gábor Farkas
a0e5a4eba2
logs: histogram: handle backend-mode queries (#50535) 2022-06-13 08:33:28 +02:00
Ivana Huckova
88279dda1c
Loki: Fix issues with using query patterns (#50414)
* WIP

* Loki: Fix running of query patterns

* Remove console.log

* Add test

* Update empty line filter test
2022-06-11 21:36:44 +02:00
Ryan McKinley
ae8dd73770
Graph Panel: Add feature toggle that will allow automatic migration to timeseries panel (#50631) 2022-06-10 17:12:56 -07:00
Ryan McKinley
b6f97e8101
SearchV2: move search parameters to a nested object (#50561) 2022-06-10 11:06:41 -07:00
Ryan McKinley
5af04cf81d
Chore: Do not expose angular search components (#50562) 2022-06-10 09:12:54 -07:00
Agnès Toulet
a832b92988
Dashboard: Clean up state after deletion (#50316)
* Dashboard: Clean up after deletion

* cleanup

* rename cleanUp function
2022-06-10 17:08:09 +02:00
Josh Hunt
32d4f6ac60
Dashboards: Fix folder picker not showing correct results when typing too fast (#50303)
* Use callback form for loadOptions in folder picker

* clean up

* fix other tests

* clarify comment
2022-06-10 15:54:21 +01:00
Stephanie Closson
913ac82108
revert change, and enforce table format when in explore (#50616) 2022-06-10 11:28:09 -03:00
Torkel Ödegaard
56a9994a13
Panels: Fixes issue with showing 'Cannot visualize data' when there issue really was no data (#50485) 2022-06-10 16:07:38 +02:00
Laura
85ecf997be
Explore: Convert SASS styles of explore-active-button to emotion (#50061)
* Chore: replace sass styling by emotion incl. new theme

* Chore: remove sass styling

* Chore: change colour

* Chore: change colour

* Chore: clean up

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-06-10 16:01:28 +02:00
Josh Hunt
9d73264895
No longer generate theme json as it's not compatible with the right tooling (#50605) 2022-06-10 14:26:56 +01:00
Karl Persson
b4559b41c2
RBAC: fix access control check in both new navivation and new search view (#50596)
* check access control permissions for new navigation

* check access control actions in new search view
2022-06-10 15:26:00 +02:00
Gilles De Mey
5539bb4578
Alerting: use "find" to wait for expression editor to load (#50602) 2022-06-10 14:58:15 +02:00
Levente Balogh
9a85a2e441
Data Connections: Create a new top-level page (#50018)
* Feature Flags: introduce a flag for enabling the Data Connections page

* Feature Flags: generate schemas

* Navigation: add navigation weight for the Data Connections page

* NavLink: add a comment pointing out where icon names can be looked up

* NavTree: add a new page called Data Connections

* fix(Api): prefix the navigation IDs with the parent ("data-connections")

* feat(Frontend): add a basic page with four tabs

* feat(Plugins): add a hook for importing an app plugin

* feat(Plugins): add a component for loading app plugins anywhere

* feat(Data Connections): load the cloud-onboarding app under the "Cloud onboarding" tab

* feat(Data Connections): generate a proper nav model to highlight active tabs

* test(Data Connections): add tests

* refactor(Data Connections): update temporary text content

This is only used as a placeholder until the tabs are under development.

* refactor(Data Cnnnections): move /pages to /tabs

* refactor(Data Connections): remove the `types.ts` file as it is not referenced by any module

* feat(Data Connections): only register routes if feature is enabled
2022-06-10 12:13:31 +02:00
Torkel Ödegaard
c1d405a200
Search: Fixes margins and paddings and left position (#50570) 2022-06-10 11:30:52 +02:00
Zoltán Bedi
ce6a73a623
TimeSeries: Add missing legend width migration (#50551) 2022-06-10 09:55:46 +02:00
Alex Khomenko
fd239f94e8
TeamSettings: Convert tests to RTL (#50513) 2022-06-10 09:50:53 +02:00
Adam Simpson
5df694b924
AzureMonitor: changes to azureMonitorExperimentalUI after feedback (#50455)
* AzureMonitor: tweak experimental-ui after UX discussions.
- move metrics up to resource row
- allow resources field to take an inlineField prop and a labelWidth prop. Eventually once the feature toggle is removed
the inlineField prop will be the only code branch in Field.tsx.

* AzureMonitor: remove devmode req for azureMonitorExperimentalUI flag

* refactor: consolidate logic branch for inline Field
2022-06-09 18:24:48 +00:00
Joey Tawadrous
4ed7ff2ed1
Traces: APM table (#48654)
* APM table

* Remove unnecessary changes in Explore.tsx

* Enhancements

* Show empty table if filter returns no results for table

* Error checking

* Combine extra filter options

* Convert service map query to apm query for apm requests

* Simplify links

* Better query building

* Extract method and clean up

* Upgrade filter

* Self review

* Export method

* Update test

* Switch area-chart to lcd-gauge

* Remove AreaChartCell

* Colors, units and other UI upgrades

* Remove 2 queries and reuse existing queries

* Nested observables

* rate/error rate/duration links: open new pane with range query and exemplars turned on

* Align error rate values to rate values col according to span_name

* Rearrange code

* Several improvements

* Filter by span_name

* align the table col values to the same row name (rateName) across the table

* On click tempo link filter by span_name

* Filtering updates

* Ensure serviceQuery null is ok

* Update link expr

* Update duration p90 unit

* Tempo links case

* Update tests

* Self review

* Tests

* Empty state

* Remove some code

* Test: should build expr correctly

* Test: should build link expr correctly

* Test: should get rate aligned values correctly

* Test: should make apm request correctly

* Test: should make tempo link correctly

* Move apm table tests to its own describe

* Feature toggle

* Added to docs for APM table

* Add screenshot to APM table section in docs

* Add feature toggle to test

* Split queries and make method names clearer

* Doc changes

* Add back in config import removed by merge

* Update tempo link and tests

* Update filter

* Set field filterable: false

* Updated doc

* Remove @end from queries

* Add back in tempo link
2022-06-09 17:56:15 +01:00
Kevin Yu
e046f14f36
Cloud Monitoring: Update AliasBy to use experimental UI components (#50461) 2022-06-09 09:22:44 -07:00
Michael Mandrus
1284c596fe
Geomap: Add ability to select a data query filter for each layer (#49966)
* Fix random typo I found

* add 'useDataFrame' boolean to each layer type to determine whether the layer queues off of query data

* Add data frame picker to options layout depending on layer type

* change layer update logic to render features from a specific data frame. Lift data frame selection up a level in order to add some more complex error handling.

* add a todo to the MapLayerRegistryItem interface

* update optional arg in function signature for consistency

* move dataframe filtering to paneldata, revert layers to prior state

* commit refactor, need to clean up still

* pull copy-pasted code into its own function

* clean up comments

* Update layer.ts

* remove unused types

* fix spacing

* improve dropdown

* need to add dependency to this callback function, otherwise it will always use the context of the last layer

* add data query recovery logic to handle query renames

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-09 11:54:57 -04:00
Andres Martinez Gotor
9703c9211e
AzureMonitor: Remove unused code (#50399) 2022-06-09 17:27:01 +02:00
Ashley Harrison
6da4feb2a9
Convert OrgProfile test to RTL (#50525) 2022-06-09 16:07:40 +01:00
Gábor Farkas
c412a3b052
logs: track the usage of certain features (#50325)
* logs: track the usage of certain features

* Add report interaction for logs interactions

* mock reportInteraction in test

* mock reportInteraction

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2022-06-09 15:53:23 +02:00
Joao Silva
ce1ee4de04
DataSources: Fixes issue with expressions not being queried (#50446) 2022-06-09 12:50:16 +01:00
Ryan McKinley
fdf67276ea
FeatureToggles: Support changing feature toggles with URL parameters (#50275) 2022-06-09 11:42:38 +02:00
Jack Westbrook
ccd75d72f8
Chore: Remove react-testing-lib from bundles (#50442)
* refactor(selectoptiontest): move helper function out of grafana/ui so testing-lib isn't in bundle

* test(selectoptionintest): update import location of helper function

* test(amroutes): put back missing selectOptionInTest helper

* test(selectoptionintest): clean up remaining file imports / exports

* test(queryeditor): fix failing import

* refactor(grafana-ui): reuse selectOptionInTest in SelectBase test
2022-06-09 11:10:48 +02:00
Konrad Lalik
ab4171770e
Alerting: Unify alert status labels on the alert list panel (#50240)
We do not use the "Inactive" state anywhere in the alerting product, this PR removes the Inactive state filter and instead uses the "Normal" state filter. Backwards compatibility has been added to the alert list panel.

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-09 10:58:57 +02:00
Peter Holmberg
06bbf870da
Alerting: Tidy up input fields for name, folder and group (#50432)
* aligned fields moved labels

* reduce width for labels inputs
2022-06-09 10:51:37 +02:00
Ashley Harrison
3fa7f72d6c
scroll nav elements into view when using the keyboard (#50434) 2022-06-09 09:07:15 +01:00
Joe Blubaugh
ecf080825e
Alerting: Fix image embed in email template. (#50370)
The ng_alert_notification email template did not include templating for
linked or embedded images. This change updates that.

Additionally, this change supports embedding an image for each alert in
an email batch.

Fixes #50315
2022-06-09 10:01:58 +08:00
Alex Khomenko
ffb8ae4900
TeamPages: Convert tests to RTL (#50429)
* TeamPages: Setup tests

* TeamPages: Finalise tests

* TeamPages: Add missing test
2022-06-08 19:05:27 +03:00
Gábor Farkas
3b745b597f
loki: rename result_transformer* to live_streams_result_transformer* (#50376) 2022-06-08 13:28:48 +00:00
Gábor Farkas
130bd26edd
loki: better error message when escaping is involved (#50352) 2022-06-08 15:27:58 +02:00
ying-jeanne
a6f3e0a9dd
Swagger: Finish some TODOs and Add consistancy check for definition generation (#50119)
* finish some todo and add consistancy check

* sort parameters

* revert parameter ordering

* fix meaningless changes

* remove go-generate tag also from alerting json

* spec changes

* update spec
2022-06-08 15:27:31 +02:00
Torkel Ödegaard
3866debae9
Angular: Fixes minor mistake in previous bsTypeahead PR (#50411) 2022-06-08 14:09:46 +02:00
Torkel Ödegaard
74608d6480
Security: Fixes javascript security warnings in old vendored libs (#50382) 2022-06-08 13:55:08 +02:00
brendamuir
e0e76f0252
Fixes term Grafana Alerting (#50404) 2022-06-08 13:35:37 +02:00
Ashley Harrison
a1cf709ad2
Playlists: Save button now correctly creates a new playlist (#50381)
* Add type="submit" to PlaylistForm submit button

* fix linting errors
2022-06-08 10:39:36 +01:00
Torkel Ödegaard
288eede638
Angular: Adds back two angular directives that are still used by remaining angular bits and plugins (#50380) 2022-06-08 10:34:58 +02:00
Kevin Yu
8bd56b8226
Chore: convert Cloud Monitoring Aggregation enzyme tests to RTL (#50326) 2022-06-08 10:03:58 +02:00
Gábor Farkas
50145e1617
Loki: remove frontend mode code (#50185)
* feature-flag removed

* loki: remove frontend-mode
2022-06-08 08:14:34 +02:00
Andres Martinez Gotor
ae449cc823
AzureMonitor: Clean namespace when changing the resource (#50311) 2022-06-07 17:05:41 +02:00
Connor Lindsey
c65d62c95b
Tracing: Fix links to traces in Explore (#50113)
* Tracing: Fix links to traces in Explore

* Fix links in dashboard

* Fix references and tracetimelineviewer tests

* Remove hard-coded references to fix tests

* Add noopener
2022-06-07 07:21:01 -06:00
Connor Lindsey
f9ddb8bf86
Explore: Download and upload service graphs for Tempo (#50260)
* Download service graph from inspect data tab

* Upload service graph

* Fix tests
2022-06-07 06:37:19 -06:00
Gábor Farkas
cbfac157fb
Logs: handle clicks on legend labels in histogram (#49931)
* logs: move new-histogram next to old-histogram

* logs: handle legend-click in new-histogram

* minor visual change
2022-06-07 14:27:32 +02:00
Ivana Huckova
be712a5f17
Loki: Add more query patterns (#50248)
* Loki: Add query patterns

* Update

* Update queries

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

* Update descriptions

* Update

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
2022-06-07 13:22:05 +02:00
Gábor Farkas
cb96f51c73
Loki: remove angular (#49471)
* loki: remove angular

Co-Authored-By: Joey Tawadrous <joey.tawadrous@grafana.com>

* better backward-compatibility

* slightly better typescript check

Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
2022-06-07 12:41:16 +02:00
Ashley Harrison
13a71e7219
Add back a lower z-index (#50285) 2022-06-07 10:25:34 +01:00
Ivana Huckova
9f6afb3475
Prometheus, Loki: Update run queries button (#50005)
* Prometheus, Loki: Updare run queries button

* Update docs

* Update docs
2022-06-07 09:57:56 +02:00
Artur Wierzbicki
49112c8356
Search: fix 'Clear filters' button (#50227)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-07 11:57:23 +04:00
sam boyer
8876d56495
schema: Migrate from scuemata to thema (#49805)
* Remove crufty scuemata bits

Buhbye to: cue/ dir with old definitions, CI steps for checking unnecessary
things, and the original dashboard scuemata file.

* Remove grafana-cli cue subcommand

* Remove old testdata

* Don't swallow errors from codegen

* Small nits and tweaks to cuectx package

* WIP - refactor pluggen to use Thema

Also consolidate the embed.FS in the repo root.

* Finish halfway rename

* Convert all panel models.cue to thema

* Rewrite pluggen to use Thema

* Remove pkg/schema, and trim command

* Remove schemaloader service and usages

Will be replaced by coremodel-centric hydrate/dehydrate system Soon™.

* Remove schemaloader from wire

* Remove hangover field on histogram models.cue

* Fix lint errors, some vestiges of trim service

* Remove unused cuetsify cli command
2022-06-06 17:52:44 -07:00
owensmallwood
e7d6a58037
Owensmallwood/pubdash get public dashboard definition (#50269)
* When getting a public dashboard, backend returns a response structured the same as when you get a regular dashboard

* Updates backend tests for getting public dashboard

* Frontend can load the public dashboard based on the pubdash uid provided

* adds frontend test to make sure public dashboard doesnt render toolbar and submenu

* sorts imports
2022-06-06 16:19:34 -06:00
Joey Tawadrous
d20608ab84
Convert packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.test.js to RTL (#49992)
* Added new selectors

* Added selector to UIFindInput

* Added selectors to TracePageSearchBar

* Convert tests

* Remove next/prev button test ids

* Remove uiFindInput selector

* Remove tracePageSearchBar selector

* Remove tracePageSearchBarSuffix selector

* Update TraceViewContainer test
2022-06-06 16:31:51 +01:00
Ashley Harrison
6fcb2cd307
remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
Ashley Harrison
22fbcebabf
Chore: convert DashboardsTable test to RTL (#50252)
* convert DashboardsTable test to RTL

* ensure render does not throw
2022-06-06 15:27:40 +01:00
renovate[bot]
0c32dec9e2
Update dependency @types/jest to v28 (#49249)
* Update dependency @types/jest to v28

* modern is now default!

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-06 14:45:02 +01:00
Alex Khomenko
333e261074
SaveDashboardForm: Ensure saveTimerange is a boolean (#50228) 2022-06-06 14:30:41 +03:00
Sriram
a3071b7797
Expression: Filter query, mixed mode fixes and panel error message (#50218)
* implement filterQuery to support query.hide

* Fixed - expression ds name in mixed mode

* Execute expression query on blur

* show actual error message when ds return Query data error
2022-06-06 11:51:23 +01:00
Andrej Ocenas
37aedd6906
Loki: Add user analytics for query editor mode (#49619)
* Add reportInteraction call

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryEditorSelector.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-06 10:38:45 +02:00
Leon Sorokin
8cdfef4796
HeatmapNG: cell value filtering and color clamping (#50204)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-06 00:21:47 -07:00
Gábor Farkas
f8eb3c8720
Revert "Loki: do not produce histogram for instant queries (#50019)" (#50182)
This reverts commit b0925ed4ee.
2022-06-06 08:57:36 +02:00
Alexander Emelin
da49f907bb
SearchV2: explicit dashboard loading order and cleanups (#50210) 2022-06-05 23:46:35 +02:00
Ryan McKinley
fd34700225
HeatmapNG: add log scale calculation (#49969)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-03 21:02:44 -05:00
Kyle Cunningham
12ba2d6b8b
State Timeline: Fix Null Value Filling and Value Transformation (#50054) 2022-06-03 16:22:57 -05:00
Stephanie Closson
53ee72d15d
Prometheus: Migrate metadata queries to use resource calls (#49921)
* Sent resource calls for metadata to the backend

* moved resource calls to the backend

* code review feedback

* fixed post with body

* statuscode >= 300

* cleanup

* fixed tests

* fixed datasource tests

* code review feedback

* force some other endpoints to only GET

* fix linting errors

* fixed tests

* was able to remove section of redundant code

* cleanup and code review feedback

* moved query_exemplars to get request

* fixed return on error

* went back to resource calls, but using the backendsrv directly

* moved to a resource call with fallback

* fixed tests

* check for proper messages

* proper check for invalid calls

* code review changes
2022-06-03 15:56:13 -03:00
Marcus Efraimsson
36c3398c6d
Datasource: Remove support for unencrypted passwords (#49987)
* Datasource: Remove support for unencrypted passwords

* regenerate swagger

* [WIP] Remove references to datasource password and basic auth password fields (#50015)

* try delete moar tings

* delete provisioning stuff

* remove from yaml

* update snapshots

* remove lingering snapshot fields

* fix ds http settings

* Re-generate swagger and fix swagger-api-spec make target

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-03 17:38:22 +02:00
Maria Alexandra
b344f48e68
SearchV2: Fix Move and Delete not updating list in folder view (#49524)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-03 17:33:04 +02:00
Ryan McKinley
1a324b3330
SearchV2: add CTA and reporting to new search UI (#50175) 2022-06-03 17:22:17 +02:00
Peter Holmberg
b1e1a97c63
Alerting: Make folder filter clearable in Alert list panel (#50093) 2022-06-03 15:43:29 +02:00
Konrad Lalik
7a56097b13
Alerting: Fix folder filtering for existing alert rule (#50156) 2022-06-03 15:09:27 +02:00
Sofia Papagiannaki
a165b40e56
API: Fix swagger generation (#50071)
* API: Fix Swagger generation using docker

* Unset SWAGGER_GENERATE_EXTENSION for Mac
2022-06-03 13:31:14 +03:00
Konrad Lalik
573e121a67
Alerting: Prevent query wrapper recreation on drag/drop (#50142) 2022-06-03 12:07:33 +02:00
Joey Tawadrous
9d5c0bec0f
Tempo: Add link to Tempo Search with node service selected (#49776)
* Node to tempo search with service selected

* Tests

* Update link text

* Update test
2022-06-03 10:38:13 +01:00
Gábor Farkas
6011c373ae
loki: handle ad hoc filters in backend mode (#50135)
* loki: handle ad hoc filters in backend mode

* devenv: better loki fake data

* added test
2022-06-03 10:53:03 +02:00
Alex Khomenko
d3adc42e6e
Service accounts: Use new icon (#50140) 2022-06-03 11:23:19 +03:00
Jack Westbrook
691a597f43
Plugins Catalog: Make tabs position consistent with other Grafana pages (#49997) 2022-06-03 10:01:14 +02:00
Yaelle Chaudy
bcf8320e07
Cloudwatch: Add template variable query function for listing log groups (#50100)
* cloud-datasources mob! :shipit:

* cloud-datasources mob! :shipit:

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.tsx

* mob next [ci-skip] [ci skip] [skip ci]

lastFile:public/app/plugins/datasource/cloudwatch/variables.ts

* cloud-datasources mob! 👶

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.test.tsx

* cloud-datasources mob! 👶

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.test.tsx

* mob next [ci-skip] [ci skip] [skip ci]

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.test.tsx

* cloud-datasources mob! :shipit:

lastFile:public/app/plugins/datasource/cloudwatch/variables.test.ts

* cloud-datasources mob! 

* prettier md

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Andres <andres.martinez@grafana.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-06-03 09:26:57 +02:00
Adam Simpson
53cb94a2ad
AzureMonitor: add NewDimension component using experimental UI (#48946)
* AzureMonitor: add NewDimension component using experimental UI

This new component is exercised by the same unit test file as the current Dimension component.

Also cleans up a few unneeded `await` keywords in the Dimensions test file.

* AzureMonitor: make tweaks based on PR comments.

- I was importing the wrong Field component
- We can use a typeguard to avoid the strange `if`.
2022-06-03 02:35:53 +00:00
Jeff Levin
52ed651958
public dashboards: insert default public dashboard config into database on save (#49131)
This PR adds endpoints for saving and retrieving a public dashboard configuration and and api endpoint to retrieve the public dashboard.

All of this is highly experimental and APIs will change. Notably, we will be removing isPublic from the dashboard model and moving it over to the public dashboard table in the next release.

Further context can be found here: https://github.com/grafana/grafana/pull/49131#issuecomment-1145456952
2022-06-02 18:27:23 -08:00
owensmallwood
cfdea1ee30
PublicDashboards: Frontend routing for public dashboards (#48834)
* add isPublic to dashboard

* refactor routes to use route group and add placeholder method for sharing apii

* add sharing pane and utils for public dashboard config to sharing modal

* Sharing modal now persists data through the api

* moves ShareDashboard endpoint to new file and starts adding tests

* generates mocks. Adds tests for public dashboard feature flag

* Adds ability to pass in array of features to enable for the test

* test to update public flag on dashboard WIP

* Adds mock for SaveDashboardSharingConfig

* Fixes tests. Had to use FakeDashboardService

* Adds React tests for public dashboards toggle

* removes semicolons

* refactors SharePublic component to use hooks

* rename from `share publicly` to `public dashboard config`

* checkpoint. debugging tests. need to verify name changes

* checkpoint. test bugs fixed. need to finish returning proper response codes

* finish renaming. fix test

* Update pkg/api/api.go

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* update backend url

* rename internal objects and commands. fix configuration modal labels

* add endpoint for retrieving public dashboard configuration and populate the frontend state from it

* add test for dashboardCanBePublic

* adds backend routes

* copy DashboardPage component into component for public dashboards. WIP

* adds react routes, and doesnt render main nav bar when viewing a public route

* removes extra react route from testing

* updates component name

* Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc

* Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed.

* removes commented out code from exploratory work

* Makes public dashboard routes require no auth

* extracts helper to own util file to check if were viewing a public page

* Hides panel dropdown when its being viewed publicly

* formatting

* use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette.

* adds unit tests for util function used to see if page is being viewed publicly

* cant added annotations to panel when being publicly viewed

* removes useless comment

* hides backend and frontend pubdash routes behind feature flag

* consider feature flag when checking url path to see if on public dashboard

* renames function

* still render app notifications when in public view

* Extract pubdash route logic into own file

* fixes failing tests

* Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests.

* renames pubdash web route to be more understandable

* rename route

* fixes failing test

* fixes failing test. Needed to update pubdash urls

* sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url

* fixes failing tests. Uses config to determine if viewing public dashboard

* renders the blue panel timeInfo on public dashboard panel

* Extracts conditional logic for rendering components out into their own functions

* removes publicDashboardView check, and uses dashboard meta instead

* the timeInfo is always displayed on the panel

* After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader.

* Fixes failing test. Needed to add isPublic flag to dashboard meta.

Co-authored-by: Jeff Levin <jeff@levinology.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-02 14:57:55 -06:00
Ryan McKinley
d452322aa8
Search (SQL): support dashboardUID query parameter (#50121) 2022-06-02 12:56:01 -07:00
An
104c4a7630
TestData: Add schema-based form for simulation (#49637)
* add inputs for corresponding schema

* change input to default value

* reformat inline fields and keep local state

* add comment on state

* show input on default
2022-06-02 12:48:07 -04:00
Konrad Lalik
b06235de28
Alerting: Filter folders based on users' permissions (#49698) 2022-06-02 17:06:07 +02:00
Gilles De Mey
51dcac4c34
Alerting: Fix alert creation form layout when errors occur (#50084) 2022-06-02 16:19:13 +02:00
Piotr Jamróz
84860ffc96
Query History: Hide query history when anonymous user uses Explore (#49896)
* Hide query history when anonymous user uses Explore

* Show query history to anonymous users when local storage is used

* Fix integration test
2022-06-02 08:51:11 -05:00
Piotr Jamróz
927b6e33c0
Update total items when query history item is deleted to avoid triggering pagination (#49899) 2022-06-02 08:48:24 -05:00
Piotr Jamróz
d41b0f0a21
Test commenting query history (#49802) 2022-06-02 08:48:04 -05:00
Gilles De Mey
5191870c24
Alerting: Fix alert list panel showing firing alerts with no instances (#50069) 2022-06-02 15:44:03 +02:00