Commit Graph

4940 Commits

Author SHA1 Message Date
Torkel Ödegaard
9b82e65b7a
TablePanel: Refactor to functional component and move add ad hoc filter action to PanelContext (#61360)
* FieldOptions: Add filterable as registry added field item

* Refactor to functional component, move ad hoc filter to PanelStateWrapper

* review tweaks
2023-01-19 14:03:13 +01:00
Ivan Ortega Alba
29f8722c91
PanelChrome: Allow hovering on description when status error is visible (#61757) 2023-01-19 14:01:36 +01:00
Alexa V
134ca6bb8f
[Panel] Extract styling duplication in new TitleItem component (#61625) 2023-01-19 11:03:56 +00:00
Eric Leijonmarck
0d42edddbf
Auth: Add skip_org_role_sync setting to OAuth integration Google (#61572)
* WIP

* Add: skip_org_role_sync for Google OAuth

- add setting for frontend
- add read of config
- add config to sample and default

* add: docs

* spelling

* Update pkg/login/social/social.go

* Apply suggestions from code review

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* removed unnessecary line

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-19 09:54:22 +01:00
Hamas Shafiq
7f4b2fcb9c
Chore: Convert VirtualizedTraceView.test.tsx to RTL (#61589)
* Chore: Convert VirtualizedTraceView.test.tsx to RTL

* Don't need to change shared component

Co-authored-by: André Pereira <adrapereira@gmail.com>
2023-01-18 18:13:26 +00:00
sam boyer
492bdbd585
Kindsys: Rename mudball to common schemas, allow multiple input cue files (#61703)
* kindsys: Rename mudball to common schemas

* Update all core plugin imports

* Add missed table types

* Remove invalid JSON comment

* Remove coremodel dir from codeowners
2023-01-18 17:40:22 +00:00
Josh Hunt
959c89793f
Chore: eslint rule for preventing e2e selectors in aria-label (#59731)
* Create eslint plugin/rule for catching e2e selectors in aria-label

* Add no-aria-label-e2e-selectors to betterer

* chore: skip levitate for the `grafana-eslint-rules` package

* Fix rule

* Add readme

* Add Apache 2 license

* Typecheck using @typescript-eslint/utils

* actually export the rule

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-01-18 15:02:35 +00:00
Hamas Shafiq
58a86133af
Chore: Convert ListView/index.test.tsx to RTL (#61590)
* Chore: Convert ListView/index.test.tsx to RTL

* Update .better.results

Co-authored-by: André Pereira <adrapereira@gmail.com>
2023-01-18 14:10:31 +00:00
juanicabanas
18e8d1e28d
PublicDashboards: Time range settings (#61585) 2023-01-18 10:54:19 -03:00
linoman
4d095547f8
Auth: Implement skip org role sync for jwt (#61647)
* Add new config option

* Add frontend control

* Condition new auth broker with config option

* Condition old auth broker with config option

Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-01-18 13:59:50 +01:00
Levente Balogh
29119a7d08
UI/Alert: Infer the role property based on the severity (#61242)
* feat(UI/Alert): add two new optional properties: 'ariaLabel' and 'role'

* docs(UI/Alert): add some docs to the props

* feat: infer the role based on the severity

* fix: stop overriding props

* fix: fix a test depending on the wrong alert role
2023-01-18 10:16:41 +01:00
Torkel Ödegaard
8620909006
Table: Fixes broken link styles after recent cell options PR (#61582)
* Table: Fixes broken link styles after recent cell options PR

* Share migration and fix bar gauge as well

* Remove unused import

* Review fixes

* Fixed test

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
2023-01-17 17:08:23 +01:00
Joey Tawadrous
4076933e66
Traces: extra feature tracking (#61348)
* grafana_traces_service_graph_size

* grafana_traces_trace_view_find_next_prev_clicked

* grafana_traces_trace_view_scroll_to_top_clicked

* grafana_traces_cheatsheet_clicked
2023-01-17 14:43:28 +00:00
ismail simsek
67c02f660a
Influxdb: Remove backend migration feature toggle (#61308)
* Remove influxdbBackendMigration feature toggle

* Remove code blocks related to influxdbBackendMigration feature toggle

* Fix annotations

* Remove commented lines

* Fix unit tests
2023-01-17 15:11:26 +01:00
Oscar Kilhed
004705a10b
Table Panel: Fix image of image cell overflowing table cell when a data link is added. (#59392)
* TablePanel: fix image of image cell overflowing table cell when a data link is added

* Fix image cell and gauge panel in respective places instead
2023-01-17 14:05:58 +01:00
Hamas Shafiq
ac25913f53
Chore: Convert TimelineViewingLayer.test.tsx to RTL (#61056) 2023-01-17 12:35:36 +00:00
Andre Pereira
d2a5b9b289
Tempo: Trace View - Search bar to absolute position instead of sticky (#61324)
* Trace View: Search bar to absolute position instead of sticky

* Fix search bar position to the inside of the trace view panel
2023-01-17 11:42:56 +00:00
Torkel Ödegaard
c1d3b59643
PanelChrome: Simplify props and code a bit (#61595)
* PanelChrome: Simplify props and code a bit

* Don't set a default empty array for leftItems so we can know user has set it

* fix 'this' is undefined

* add storybook examples of statusMessage; remove SB examples of loadingState === Error; simplify loadingState checks in PanelChrome;

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2023-01-17 09:52:14 +01:00
Alexa V
0eeeeef08b
PanelChrome: Refactor and refine items next to title (#60514)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2023-01-16 15:56:39 +00:00
Eric Leijonmarck
c5e74ee607
Auth: Add skip_org_role_sync for AzureAD OAuth (#60322)
* [WIP] Auth: add backend skipOrgRoleSync to AzureAD OAuth

- add: skipOrgRoleSync
- rename: skipOrgRoleSync to skipOrgRoleSyncBase (to make it clear that
  it is the base version of SocialBase)
- add: tests for skipOrgRoleSync in AzureAD

TODO:
- [ ] frontend changes

* add: docs

* refactor: remove role from basicinfo

* add: settings for grafanacom

* add: settigns for frontend

* add: logic for azureAD user skip org role

* add: docs for skip_org_role_sync

* refactor: docs a bit

* add: tests for userinfo

* refactor: to only extract if skiporgrolesync false

* refactor: based on review comments

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-16 13:16:01 +01:00
Hamas Shafiq
1b6c0d9752
Chore: Convert ViewingLayer.test.tsx to RTL (#61358) 2023-01-16 10:25:47 +00:00
Victor Marin
43ca4e0bc7
Fix Barchart legend aligning right when orientation is horizontal (#61451) 2023-01-16 12:09:20 +02:00
Yuri Tseretyan
9d57b1c72e
Alerting: Do not persist noop transition from Normal state. (#61201)
* add feature flag `alertingNoNormalState`
* update instance database to support exclusion of state in list operation
* do not save normal state and delete transitions to normal
* update get methods to filter out normal state
2023-01-13 18:29:29 -05:00
Joey Tawadrous
2b6a5e2b3d
Tracing: Span link feature tracking (#61022)
* Span link feature tracking

* Update interaction name
2023-01-13 14:02:25 +00:00
renovate[bot]
55ec0c1c49
Update dependency chrome-remote-interface to v0.32.0 (#61448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 11:05:26 +00:00
renovate[bot]
be04096366
Update dependency core-js to v3.27.1 (#61342)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 12:03:24 +01:00
Torkel Ödegaard
a5eb858d53
PanelChrome: Slight design improvements to menu button (#61399)
* PanelChrome: Slight design improvements to menu button

* Switch to narrow ToolbarButton

* Updated test

* removed unused import
2023-01-13 10:35:02 +01:00
Ryan McKinley
da3f02d81b
Schema: Add TimeZone to mudball (#61003) 2023-01-12 14:54:02 -08:00
Piotr Jamróz
e8ef0395b1
Glue: Hide run queries button in Correlations Page (#61039)
* Hide run queries button in Correlations Page when showing Loki and Prometheus editors

* Use more semantic selectors

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

* Use more semantic selectors

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

* Post-merge fix (remove duplicate)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-01-12 21:14:55 +01:00
Eric Leijonmarck
91322bebb5
Auth: Add skip_org_role_sync setting for GrafanaCom (#60553)
* add frontend settings and setting for grafanacom

* removed println

* add skip-org-role-sync on login

* add deprecation notice for this field

* remove println

* remove newline

* change and renamed variables

* fix for reconfiguring the settings for grafanacom

* add documentationf or grafanacom setup

* WIP tests

* added tests

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* updated steps

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

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

* doc: updated the docs to reflect what happens to grafana.com users

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* add blankline

* rephrase of doc improvements for explaing of the settings

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* add frontend setting for grafanacom.

* WIP tests

* refactor docs

* frontend to adhere to skipping org role sync for GrafanaCom users

* update docs to reflect desired behavior

* tests: added test for skip and nonskip

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-01-12 16:44:08 +01:00
Kyle Cunningham
80e7f54166
Table Panel: Refactor Cell Options to Allow for Options per Cell Type (#59363)
* Update table data structure schema.

* Update table panel configuration options for new structure

* Fix TS errors from refactor

* Separate background and gauge display modes

* Remove the now used Bar Gauge display from the mud

* Fix types up

* Reorganize data structures

* Fix type issues.

* Start stubbing necessary code.

* Continue implementing option refactor

* Change category for cell type selection.

* Consolidate cell options

* Fix various typing issues

* Clean up dead code

* Stub handling display mode changes

* Make subOption editor dynamic

* Setup interface for sub-option editor props

* Remove unused imports

* Remove console.log call

* Persist display mode changes, stub sub options change, update comments.

* Make sure updates from cells are persisted

* Persist sub-option changes

* Update BarGaugeCell to take into account new settings.

* Add deprecated field back

* Remove unecessary options in configuration

* Update default cell to accept new settings

* Make sure color text display works

* Add deprecated property notice

* Use constant as opposed to string

* Make sure we name globally namespaced things uniquely

* Update to use unique name

* Use union type with discriminator.

* Simplify types and operation

* Update type definitons

* Update types

* Update property names in cells

* Remove React.FC usage

* Update option editor signature

* Update options structure

* Change variable name

* Fix "Color Text" display

* Remove debug statement

* Make sure we remain backwards compatible with display mode.

* Add migration for configuration.

* Export BarGaugeDisplayMode from grafana-ui

* Update import

* Fix bar gauge and dashboard migrator tests

* Fix potential undefined references causing test failures

* Fix another potential reference error in DefaultCell

* Try to fix breaking change detection.

* Cache setting changes

* Make sure we return with onChange invocation

* Fixed migrating overrides

* Fix a number of review comments

* Simplify option editors

* Fix unused imports

* Fill out comments for types

* Actually use defaultPanelConfig for editor default

* Move TableCellEditorProps alongside TableCellOptionEditor

* Update docs for table panel

* Also make sure we remove TableCellEditorProps from model file

* Stub migration tests

* Add tests for default config migration

* Add basic overrides test

* Flesh out tests a bit more

* Add inspect to same category as cell editor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-12 18:42:57 +07:00
Sonia Aguilar
f2d4e24710
Alerting: improve FolderPicker and Evaluation Group Select for Huge lists (#61221)
* Add AsyncVirtualizedSelect component in grafana-ui

* Slice FolderPicker results to 1k and virtualize list using AsyncVirtualizedSelect

* Group list in alert form: Use AsyncSelect and slice results to 1000

* Virtualize and slice always in FolderPicker: set default sliceResults value and let consumers change this value

* Always slice results in FolderPicker

* Limit folder results setting the limit in the api call instead slicing in the FE

* Remove warning about the limit in the Select label
2023-01-12 11:45:03 +01:00
Laura Benz
9400ccf478
Glue: Validate target query in correlations page (#57245)
* feat: add draft version of validate button

* feat: add some styling and basics

* temp: intermediate result

* refactor: solve TODOs

* refactor: replace string in state

* refactor: replace error message style

* refactor: set validate state on change in ds

* refactor: add QueryRunner

* refactor: add QueryRunner

* temp: temporary status

* Emit PanelData to check if the query is valid

* refactor: clean up

* refactor: improve a11y of error message and adjust test

* Remove deprecated property call, change equality

* refactor: add changes from code review

* refactor: remove memory leak

* refactor: replace query runner

* refactor: adjust error handling

* refactor: move testing to related unit test

* refactor: clean up test for QueryEditorField

* refactor: clean up test for CorrelationsPage

* refactor: repair test

* refactor: clean up

* refactor: add refId in order avoid errors when running Loki queries

* refactor: replace buildQueryTransaction + set query to invalid if query is empty

* refactor: add empty query value to test cases

* refactor: end handleValidation after setIsValidQuery()

* refactor: refactor test

* refactor: fix last two tests

* refactor: modify validation

* refactor: add happy path

* refactor: clean up

* refactor: clean up tests (not final)

* refactor: further clean up

* refactor: add condition for failing

* refactor: finish clean up

* refactor: changes from code review

* refactor: add response state to condition

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* refactor: fix prettier issue

* refactor: remove unused return

* refactor: replace change in queryAnalytics.ts

* refactor: remove correlations from query analytics

* refactor: remove unnecessary test preparation

* refactor: revert changes from commit 4997327

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2023-01-12 11:43:40 +01:00
Polina Boneva
84eb275c8d
PanelChrome: Menu is wrapped in a render prop for full outside control (#60537)
* setup menu as a render prop sent down from PanelStateWrapper to PanelChrome

* let the Dropdown take care of opening the menu in PanelChrome

* menu and leftItems are on the right side of the header together

* add storybook examples with menu

* menu does not need to be a callback because it's opened in a Dropdown anyway

* pass down to getPanelMenu whether or not data is streaming atm

* stop loading data as well as streaming from menu

* override menu's style where needed

* reduce snapshot matching in tests
2023-01-12 11:10:09 +02:00
Levente Balogh
8b290bba55
Connections: Update redirect alert message (#61152)
* fix(Alert): don't add padding to content when there is no title

* Feat(Connections): update the style and wording of the redirect alert

* fix(UI/Alert): more resilient check for has title
2023-01-11 11:41:19 +01:00
Leon Sorokin
be1c5e13d5
DataFrame: Add explicit histogram frame type (panel & transforms) (#61195) 2023-01-10 17:42:45 -06:00
Hamas Shafiq
bc3ce5760b
Chore: Convert TimelineColumnResizer.test.tsx to RTL (#61156) 2023-01-10 21:24:51 +00:00
juanicabanas
2505f112f5
PublicDashboards: A unique page for public dashboards (#60744)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-10 14:50:37 -03:00
Ludovic Viaud
220ee3d1d4
Prometheus: Disabled inputs when settings are read-only (#60354) 2023-01-10 16:13:42 +01:00
Hamas Shafiq
2af79535bc
Chore: Fix flaky test in SpanGraph/index.test.tsx (#61009) 2023-01-10 14:23:00 +00:00
Andre Pereira
bda13a1b5d
Explore: Expand table height to show sub-tables (#60359)
* Expand table height to show sub-tables when there isn't enough space

* Fix after merge
2023-01-10 11:58:49 +00:00
Ashley Harrison
4e00fbbd7f
Navigation: Allow overriding icons in nav settings (#61160)
expose k6 icon, allow overriding icon in nav settings, override connections + k6
2023-01-10 10:29:07 +00:00
Torkel Ödegaard
a277d504a2
Table: Improve data link text style (#60811)
Table: Change data link text style
2023-01-10 07:48:53 +01:00
Leon Sorokin
a1609230f8
TimeSeries: Fix y-axis Yes/No and On/Off boolean units (#61207) 2023-01-09 23:04:50 -07:00
ismail simsek
6a68fbb495
Influxdb: Improve filtering (#60994)
* Add createOptionPosition props to SelectBase

* Show create option in the beginning of the list

* Show only matched template variables

* Fix the test

* Remove redundant check
2023-01-09 11:37:25 +01:00
Giordano Ricci
fafae26068
GrafanaUI: Fix vercal slider handle positioning (#61088) 2023-01-06 14:24:35 +00:00
Jack Baldry
410b23c3d9
Use preferred package header for generated code (#61059)
* Use preferred package header for generated code

> To convey to humans and machine tools that code is generated, generated source should have a line that matches the following regular expression (in Go syntax):
> `^// Code generated .* DO NOT EDIT\.$`

https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source

Co-authored-by: sam boyer <sdboyer@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Regenerate files with updated header

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-06 04:57:45 -05:00
Levente Balogh
fc0e3d6c14
Connections: use the "adjust-circle" icon as a logo (#61046)
* feat: add a new icon called 'adjust-circle'

* feat(Connetions): use the `adjust-circle` logo
2023-01-06 07:31:49 +01:00
Giordano Ricci
dfed7e59a5
Explore: move items out of topnav & use canvas variant for toolbar buttons (#60630)
* Explore: remove topnav

* PageToolbar: fix left items margin when no title or page icon is set

* add missing key prop & fix tests

* use canvas variant in live logs

* avoid rendering empty space

* fix test

* avoid disabling split resize button when live tailing

* minor touchups

* Update packages/grafana-ui/src/components/PageLayout/PageToolbar.tsx

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-05 22:26:58 +00:00
Ryan McKinley
48fbe51d37
Chore: Avoid FC in canvas elements and dimension editors (#61014) 2023-01-05 09:55:55 -08:00