Commit Graph

4910 Commits

Author SHA1 Message Date
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
Torkel Ödegaard
bd90a6e1be
Transformations: Add context parameter to transformDataFrame and operators (#60694)
* Transformations: Add context parameter to transformDataFrame and operators

* Remove unused queries prop

* Fixed test

* Fixed test
2023-01-05 17:34:09 +01:00
Ashley Harrison
a9e39a108c
RelativeTimeRangePicker: correctly trap focus in overlay (#60984)
* correctly trap focus in relativetimerangepicker overlay

* add underlay

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-01-05 11:35:47 +00:00
Polina Boneva
3f1908464d
PanelChrome: Implement Panel header with error, loading, and streaming data status (#60147)
* dashboards squad mob! 🔱

lastFile:packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

lastFile:packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx

* user essentials mob! 🔱

* create grafana/ui LoadingBar and set it up in Storybook

* Remove test changes on PanelChrome

* Fix mdx page reference

* dashboards squad mob! 🔱

lastFile:public/api-merged.json

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

lastFile:public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderState.tsx

* Implemented basic draft of panel header states. Using ToolbarButton instead of IconButton.

* use 'warning' styled Button in ToolbarButton

* make LoadingBar a simple JSX Element; do not use containerWidth; have a wrapper around the loading bar itself;

* fix wrapper around LoadingBar: willChange css prop makes performance of rerendering better

* States: Render general panel query error states and render notices next
to the title

* add streaming to PanelChrome if data is streaming instead of loading

* PanelHeaderState with its own state 'mode'

* clean up useEffect

* notices have their own square space in the size of the panel header

* clean up

* minor fixes

* moving the LoadingBar to core

* LoadingBar is not in grafana/ui

* always have a place for the loading bar in the PanelChrome, otherwise it moves everything when appearing;

remove titleItemsNodes for now - in later development

make no changes to Notice component, not part of this PR

* Revert "moving the LoadingBar to core"

This reverts commit 11f0f4ff2f.

* do not use internal comment as it doesn't do anything

* integrate LoadingBar in PanelChrome from grafana/ui directly

* fix deprecated leftItems comment

* Modify annimation to 1 second

* remove comments

* remove streaming stopped UI because we cannot know when the streaming has stopped

* skip unnecessary test for now

* no point in removing hoverHeader now, even though it's not yet implemented

* small fixes

* error state of the data in a panel is positioned in PanelChrome itself, not in PanelHeaderState

* Fixed loading state jitter

* remove warning state as we have none of it

* streaming cannot be stopped from the icon

* explicit content container width and height

* explicit content container width and height

* edit deprecated comment

* fix LoadingBar to be relative to width of panel; remove explicit width and height on content strict

* no warning state of the data

* status of the panel data given directly to PanelChrome, not a node

* clean up

* clean up console log

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* panel title design fits typography h6 styles; render error status only if error or error message are passed to PanelChrome

* add storybook examples; prepare PanelChrome for hoverHeader because this will be a breaking change and it will affect how the storybook example shows up

* show storybook example for streaming panel with title because that's the condition for having a header

* override margin-bottom: 0.45em of h6

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2023-01-05 11:48:11 +02:00
Galen Kistler
0e265245eb
Prometheus: New instant query results view in Explore (#60479)
Add new default instant query UI option for prometheus users in Explore.

Co-authored-by: Beto Muniz <contato@betomuniz.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-01-04 10:46:03 -06:00
Josh Hunt
a26d4c90b2
I18N: Fail i18n:extract on warnings + update strings (#60949)
* I18N: Fail i18n:extract on warnings

* I18N: Fix onboarding page title

* extract all strings

* move t reassign outside of function
2023-01-04 15:28:07 +00:00
Ashley Harrison
7005b7bf8a
Navigation: Update e2e tests to work with topnav (#60910)
* turn on topnav toggle in e2e tests

* fix variable e2e tests

* fix remaining tests + remove some hardcoded waits

* speculative fixes

* wait for error to disappear

* use new selector, turn toggle back off
2023-01-04 14:59:53 +00:00
Joao Silva
220175cab9
A11y: Improve accessibility of ColorPickerInput (#60923) 2023-01-04 13:19:41 +01:00
Alex Khomenko
c68603a573
Teams: Use generated TS types (#60618)
* Teams: Use generated TS types

* Teams: Update types usage

* Teams: Update types import

* Teams: Move metadata to mock function

* Teams: Move TeamDTO to types

* Update kind
2023-01-04 14:08:03 +02:00
owensmallwood
f0ee3ac80a
PublicDashboards: Enterprise email sharing feature flag (#60644)
adds feature flag for pubdash email sharing
2023-01-03 13:45:15 -06:00
Hamas Shafiq
0dffbcbca7
Chore: Refactor the root of the TraceTimelineViewer folder to TS (#59748) 2023-01-03 15:45:28 +00:00
Hamas Shafiq
355f513718
Chore: Refactor the TraceTimelineViewer/TimelineHeaderRow folder to TypeScript (#60351) 2023-01-03 13:36:50 +00:00
Hamas Shafiq
eb2a9d132a
Chore: Convert SpanGraph/index.test.tsx to RTL (#60200) 2023-01-03 13:01:02 +00:00
Alex Khomenko
b1573104d4
Schema: Use the latest cuetsy version (#60696)
* Schema: Use the latest cuetsy version

* Schema: Update Permission

* Use latest cuetsy
2023-01-03 14:10:32 +02:00
sam boyer
7fd1d5cef0
Codegen: Add support for optional maps (#60883) 2023-01-03 09:12:48 +02:00
Dominik Prokop
4446d500a4
grafana/data: Deprecate kbn.regexEscape and move to grafana/data (#60869)
grafana/data: Deprecate kbn.regexEscape and move escapeRegex to grafana/data
2023-01-02 05:57:55 -08:00
Dominik Prokop
831e7697ae
grafana/data: Move useFieldOverrides from core (#60817)
* grafana/data: Move useFieldOverrides from core

* Update packages/grafana-data/src/field/fieldOverrides.ts

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

* Review

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-02 02:27:48 -08:00
Dominik Prokop
c3c4a57c79
grafana/data: Move getPanelOptionsWithDefaults from core (#60813)
* grafana/data: Move getPanelOptionsWithDefaults from core

* Add internal comments
2022-12-29 05:48:22 -08:00
Dominik Prokop
370aa9f6ea
Runtime: Expose panel plugin import utils (#60799)
* Runtime: Expose plugin import utils

* Review

* Fix
2022-12-29 00:45:50 -08:00
Torkel Ödegaard
497ce81867
Table: Refactoring state handling for expanded rows (#60791)
* Table: Refactoring state handling for expanded rows

* Simplify row expander

* remove console.log

* review fixes

* Simplify hook name

* fixed test
2022-12-28 19:37:17 +01:00
Dominik Prokop
78d7f11b8e
grafana/data: Move data frames processing functions from core (#60795) 2022-12-28 07:59:45 -08:00
Dominik Prokop
aa0936127d
Runtime: Expose runRequest function (#60793) 2022-12-28 06:28:12 -08:00
Dominik Prokop
9b7418ec17
Revert "Chore: Update typescript to 4.9.3 (#60538)" (#60774)
This reverts commit 51f5334748.
2022-12-27 06:30:52 -08:00
Victor Marin
9bd6e471e4
BarChart: Clear tooltip when cursor exits bar (#60617) 2022-12-23 13:00:52 -06:00
juanicabanas
9c3ddda99b
PublicDashboards: Revert Time range setting added (#60698)
Revert "PublicDashboards: Time range setting added (#60487)"

This reverts commit 6f609dbced.
2022-12-22 12:31:54 -03:00
sam boyer
b8253ac3b9
deps: Update thema, use CUE fork (#60496)
* deps: Update thema, use CUE fork

* Remove superfluous openapi-codegen output

* Update thema again to catch cuetsy changes

* Rerun codegen with latest

* Latest thema, removes cuetsy update

* Latest of cuetsy

* Update type usage

* One last cuetsy rollback

* Update playlist summary tests

* More lint fixes

* Remove TS veneer changes for VariableHide

Co-authored-by: Clarity-89 <homes89@ukr.net>
2022-12-22 07:20:02 -05:00
Ashley Harrison
a16ca209fb
Segment: Individual segments are now keyboard accessible (#60555)
use <button> for keyboard accessibility
2022-12-21 17:26:18 +00:00
Gilles De Mey
16c6f223ba
TimeSeriesPanel: Allow threshold indicators without change handler (#60575) 2022-12-21 16:18:35 +01:00
Ashley Harrison
44232569a8
ToolbarButtonRow: Overflow button now toggles visibility correctly (#60635)
* only close the overlay if we're interacting with something other than the overflow button/the overlay itself

* use a ref instead of a test id
2022-12-21 15:01:39 +00:00
Dominik Prokop
70dd5b42ce
DataLinks: Allow providing a dynamic data link builder (#60452) 2022-12-21 05:09:31 -08:00
Kristina
0adb00b692
Explore: Use new icons for split pane resizing (#60391)
* Add icons, use them for split pane resizing

* Change icons

* Apply scale to child div

* Use fancier logic for displaying icon

* Remove color fill on icon

* Change icons, remove scale

* Change icons and logic
2022-12-21 07:07:05 -06:00