Commit Graph

2067 Commits

Author SHA1 Message Date
Alex Khomenko
3b515e650c
Grafana-UI: Update React Hook Form to v7 (#33328)
* Update hook form

* Update Form component

* Update ChangePassword.tsx

* Update custom types

* Update SaveDashboardForm

* Update form story

* Update FieldArray.story.tsx

* Bump hook form version

* Update typescript to v4.2.4

* Update ForgottenPassword.tsx

* Update LoginForm.tsx

* Update SignupPage.tsx

* Update VerifyEmail.tsx

* Update AdminEditOrgPage.tsx

* Update UserCreatePage.tsx

* Update BasicSettings.tsx

* Update NotificationChannelForm.tsx

* Update NotificationChannelOptions.tsx

* Update NotificationSettings.tsx

* Update OptionElement.tsx

* Update AlertRuleForm.tsx

* Update AlertTypeStep.tsx

* Update AnnotationsField.tsx

* Update ConditionField.tsx

* Update ConditionsStep.tsx

* Update GroupAndNamespaceFields.tsx

* Update LabelsField.tsx

* Update QueryStep.tsx

* Update RowOptionsForm.tsx

* Update SaveDashboardAsForm.tsx

* Update NewDashboardsFolder.tsx

* Update ImportDashboardForm.tsx

* Update DashboardImportPage.tsx

* Update NewOrgPage.tsx

* Update OrgProfile.tsx

* Update UserInviteForm.tsx

* Update PlaylistForm.tsx

* Update ChangePasswordForm.tsx

* Update UserProfileEditForm.tsx

* Update TeamSettings.tsx

* Update SignupInvited.tsx

* Expose setValue from the Form

* Update typescript to v4.2.4

* Remove ref from field props

* Fix tests

* Revert TS update

* Use exact version

* Update latest batch of changes

* Reduce the number of strict TS errors

* Fix defaults

* more type error fixes

* Update CreateTeam

* fix folder picker in rule form

* fixes for hook form 7

* Update docs

Co-authored-by: Domas <domasx2@gmail.com>
2021-04-29 16:54:38 +03:00
Marcus Andersson
9de2f1bb8f
Alerting: moving data source uid to query instead of model (#33416)
* initial commit.

* Some more improvements to the expression data source support.

* added tests to verify that time range picker and data source picker only is visible when callbacks is passed to row.

* fixing issue with filter in alerting list.

* minor refactoring.

* removed guarding code, should be fixed in  backend.

* cleaning the data query if we change to a different data source.
2021-04-29 15:10:14 +02:00
Dominik Prokop
45c763a76b
GraphNG: Bring back plot instance getter on the Plot context (#33516)
* Bring back plot instnace getter on the Plot context

* Update plot context usage
2021-04-29 13:51:21 +02:00
Torkel Ödegaard
017bcc73ba
Theme: Move displayProcessor & fieldOverrides & visualizations to use new theme model (#33502)
* WIP updating getColorForTheme

* Progress

* More fixes

* Updating more parts

* Fixing unit tests

* Fixing more tests

* Fixing storybook issues

* More refactoring

* Fixed test
2021-04-29 12:44:06 +02:00
Jack Westbrook
0836e7bde8
IconButton: introduce variant for red and blue icon buttons (#33479)
* feat(iconbutton): introduce variant for red and blue icon buttons

* refactor(iconbutton): give variants breathing space in story

* docs(iconbutton): add docblock comment for variant prop

* refactor(iconbutton): prefer secondary to undefined variant prop and add default

* refactor(iconbutton): use icon color for hover
2021-04-29 10:47:06 +02:00
Jack Westbrook
249004ebef
Pages: update react components to use v2 theme (#33413)
* chore: expose theme types / functions

* fix(grafana-ui): withTheme2 extends themeable2

* feat: migrate page components to use new theme

* refactor(pages): replace legacy form components with latest form components

* refactor(dashboardimport): update page component to use theme spacing

* refactor(alerting-ng): update page component to use v2 theme

* test(dashboardpage): update test for v2 theme

* test(apikeyspage): update test to select InlineSwitch component

* test(createteam): update snapshot

* refactor(playlist): update page components to use v2 theme

* refactor(page): put back classes on page-container and background colors
2021-04-28 16:05:00 +02:00
Alex Khomenko
6d95f2f1db
Chore: Update typescript to v4.2.4 (#33297)
* Update typescript to v4.2.4

* Update @types/slate

* Fix QueryVariableEditor.test.tsx

* Fix search-related type errors

* Fix Plugin pages type errors

* Fix missing initializer errors

* Update snapshot

* Revert tsconfig changes
2021-04-28 15:40:01 +03:00
Torkel Ödegaard
bac8b967be
PieChart: Refactoring & adding unsubscribe (#33432)
* Tweaks to piechart and theme

* Adds unsubscribe to events and move out to separate hook

* reverted constrast change

* Minor refactor after review feedback

* chain the subs
2021-04-28 14:02:41 +02:00
Alex Khomenko
1336a57e99
Grafana-UI: Export Card container styles (#33386)
* Export Card container styles

* Export CardContainer as a separate component

* Update story

* Remove tooltip
2021-04-28 13:41:20 +03:00
Uchechukwu Obasi
0d1cdbe227
DataLinksSuggestion: updates component with the new theme model (#33390)
* updates component with the new theme model

* uses correct new theme property

* removes constant variables and inlined their usage
2021-04-28 11:17:10 +01:00
Domas
df4181c43a
Alerting: edit receivers (grafana) (#33327) 2021-04-28 12:22:48 +03:00
Uchechukwu Obasi
643e7af3e0
Collapse: updates component to use the new theme model (#33326)
* updates component to use the new theme model

* updates ssome old style to use new theme

* uses correct theme color property

* updates new theme style with correct naming
2021-04-28 10:07:01 +02:00
kay delaney
780b776387
BasicAuthSettings: Update styles to use emotion and new theming (#33164)
* BasicAuthSettings: Update styles to use emotion and new theming

* Use InlineField
2021-04-28 10:04:26 +02:00
Uchechukwu Obasi
faa80003b9
DataLinksInlineEditor: updates component with the new theme model (#33391) 2021-04-28 10:01:18 +02:00
Zoltán Bedi
70bafc2725
GraphNG: Fix exemplars window position (#33427) 2021-04-28 09:37:35 +02:00
Josh Hunt
a13c5380a7
Grafana-UI: Switch CodeEditor to UMD @monao-editor/react (#33204)
* Grafana-UI: Switch CodeEditor to @monao-editor/react

* update copy script and paths

* hide context menu

* use __grafana_public_path__

* Fix value and language not updating

* update jaeger tsconfig

* update tsconfig

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-04-27 17:34:56 +01:00
Giordano Ricci
ea3d3a2218
Grafana-UI: Fix options margin when spanning on multiple lines (#33436) 2021-04-27 17:24:40 +01:00
Uchechukwu Obasi
3725654b38
CallToActionCard: updates component to use the new theme model (#33309)
* updates component to use the new theme model

* fixes frontend test
2021-04-27 15:52:47 +01:00
Uchechukwu Obasi
fce40fff63
updates component with the new theme model (#33387) 2021-04-27 15:51:57 +01:00
Torkel Ödegaard
d5465e5c6a
Cards: Fix margins in old card styles (#33421) 2021-04-27 15:54:33 +02:00
Torkel Ödegaard
eef4e18b62
Theme: Use outline buttons for Cancel & Back actions (#33418)
* Buttons: Use new outline button for cancel & back buttons

* More buttons

* More tweaks

* Updated row snapshot
2021-04-27 15:36:48 +02:00
Domas
e8faec5c19
Alerting: create/edit notification templates (#33225) 2021-04-27 16:28:53 +03:00
Torkel Ödegaard
5d855dbf33
Theme: Fixes to time picker calendar & variable dropdowns & more (#33407)
* More theme fixes

* more updates

* Fixed alerts in explore
2021-04-27 15:13:08 +02:00
Jack Westbrook
45fa5fdf48
Buttons: introduce buttonStyle prop (#33384)
* Wip

* Updates to colors to make secondary outline work

* refactor: prefer buttonStyle="text" over variant="link" for text buttons

* revert(button): put back mdx story page

* fix(button): variant link disabled as text disabled

* docs(button): remove link variant from stories

* feat(grafana-ui): introduce basic deprecation notice for button and linkbutton components

* docs(button): update usage of href with button and buttonlink

* feat(button): add grafana/ui to deprecation warning

* refactor(buttons): use a more descriptive name for prop warning function

* test(buttonrow): update snapshots

* refactor(buttons): change prop name from buttonStyle to fill

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-04-27 12:03:06 +02:00
Jack Lu
495345c0c2
added overflow wrapping css to solve alert url overflowing (#33400) 2021-04-27 07:30:19 +02:00
Leon Sorokin
69bcaf9253
GraphNG: simplify plotContext (#33347) 2021-04-26 13:36:59 -07:00
Torkel Ödegaard
4643bfa539
Modals: design update (#33368)
* Modals: Style update draft

* Modal.ButtonRow to control spacing better in a centralised way

* Remove header border if no tabs

* Added border and made buttons right aligned and changed order of buttons

* Updating the overlay

* Tweaks to paddings

* Updated share modals
2021-04-26 18:26:56 +02:00
Uchechukwu Obasi
de65cef850
updates component with the new theme model (#33392) 2021-04-26 17:06:00 +01:00
Uchechukwu Obasi
36d3c053a9
DataLinksEditor: updates component with the new theme model (#33389) 2021-04-26 17:44:03 +02:00
Oscar Kilhed
d0239ac958
[grafana/UI] Hoovering over a legend label highlights the corresponding pie slice (#32941)
* Hoovering over a legend label hightlighs that pie slice

* Change to event bus

* Adds EventBusWithSource to help identify the origin of the event

* Add tests and fix bug with incorrect source

* Clean up PieChart and EventBus a bit

* Fix bug when payload.source is undefined

* Add some documentation and adjust naming

* useState instead of useSetState

* Clean up some more documentation

* Move eventbus to state

* add event bus actions to the debug panel

* add event bus actions to the debug panel

* Try to make the naming a bit clearer

* Try passing eventbus as context

* Fix lint issues

* Move event bus context to panel chrome

* Fix event handler functions

* switch to using useCallback for legend item callbacks

* Remove unused parameters

* Add id to panel fixture of PanelChrome test

* Simplify event source

* Place eventBus inside more generic context

* Push handling of context up the tree to VizLegend

only export usePanelContext and PanelContextProvider

implement isOwnEvent on EventBus

some cleanup

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-04-26 16:13:15 +02:00
Uchechukwu Obasi
e21d1ccba4
CollapsableSection: updates component to use the new theme model (#33378)
* updates component to use the new theme model

* fixes small nit
2021-04-26 15:01:59 +01:00
Dominik Prokop
a54ac510c4
GraphNG: Make the GraphNG / uPlot flow sync (#33215)
* Move data alignment to panel

* Make uPlot plugins sync, bring back alignment to GraphNG

* Update GraphNG-like panels

* Update explore graph ng

* Cleanup unnecessary tests

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-04-26 13:30:04 +02:00
Uchechukwu Obasi
34910521a6
updated component to use new theme model (#33306) 2021-04-26 09:12:39 +01:00
Torkel Ödegaard
cf2d557974
Alerts/InfoBox: Replaces all uses of InfoBox & FeatureInfoBox with Alert (#33352)
* Alerts/InfoBox: Replaces all uses of InfoBox & FeatureInfoBox with Alert

* Fixes some more stuff

* fixed border radius
2021-04-26 07:18:46 +02:00
Ryan McKinley
cdc6f4c2ac
Chore: update icons with a json index (#33354) 2021-04-25 15:24:29 -07:00
Torkel Ödegaard
424925c3fb
Icons: Fixes iconCache not having same iconRoot as what Icon component used making the pre-cached items not match (#33356) 2021-04-25 11:17:35 -07:00
Torkel Ödegaard
9fe113b016
Emotion: useStyles removed the memoized styles making it worse than stylesFactory (#33263)
* Emotion: useStyles removed the memoized styles making it worse than stylesFactory

* Updated tests
2021-04-24 15:18:09 +02:00
Torkel Ödegaard
ad63f871ce
Stat/Table: Fixes contrast color, was flipped in theme refactoring (#33345)
* Stat/Table: Fixes contrast color, was flipped in theme refactoring

* Updated snapshot
2021-04-24 14:27:27 +02:00
Torkel Ödegaard
50018f37f2
SegmentSelect: Migration from legacy select to default Select component (#33344) 2021-04-24 14:26:58 +02:00
Leon Sorokin
47e68580a6
DataFrame: also filter fields in single frame case in outerJoinDataFrames() (#33343) 2021-04-23 21:28:18 -05:00
Leon Sorokin
948cba199b
GraphNG: don't scan data for min/max when both hard limits are pre-configured (#33295) 2021-04-23 11:35:28 -05:00
Giordano Ricci
ec1c85acca
Grafana-UI: replace react-color with react-colorful (#33267)
* Grafana-UI: replace react-color with react-colorful

* Throttle onChange from SpectrumPalette
2021-04-23 16:03:48 +02:00
Dominik Prokop
d76c056656
Revert "LegendIcon: only render color picker when the props change (#33141)" (#33313)
This reverts commit af46bbf654.
2021-04-23 15:50:34 +02:00
Torkel Ödegaard
e6a9654d0e
Checkbox: Updates to look and feel and using new theme (#33310)
* Checkbox: Updates to look and feel and using new theme

* A few more theme fixes

* Removed comments

* Updated snapshot
2021-04-23 14:40:06 +02:00
Torkel Ödegaard
b6cfb65e40
Annotations: More fixes to the angular annotation editors (#33303)
* Annotations: Fixed angular editor issues

* More angular annotation fixes

* removed console.log
2021-04-23 14:06:30 +02:00
Uchechukwu Obasi
37f7b91a6b
updated component to use new theme model (#33302) 2021-04-23 11:08:52 +01:00
Uchechukwu Obasi
3bae330286
updated component to use new theme model (#33305) 2021-04-23 10:26:29 +01:00
Jack Westbrook
c809d63065
Buttons: replace usage of .btn classnames (#33226)
* refactor(loginpage): migrate custom button styles to use Button component

* refactor(certificationkey): prefer grafana-ui form elements over html elements and classnames

* refactor(axisselector): prefer grafana-ui Button component over html button element

* refactor(input-datasource): replace use of btn class with grafana-ui components

* chore(grafana-ui): delete deprecated ToggleButtonGroup component

* refactor: replace btn and cta-form__close class usage with IconButton

* chore(closebutton): post master merge use v2 theme

* refactor(permissionlist): remove usage of .btn classname

* Wip

* docs(styling): update styling and theme docs import paths

* refactor(alerting): remote btn classnames from TestRuleResult

* refactor(apikeys): prefer grafana-ui Button components over btn classNames

* refactor(folders): prefer grafana-ui Button components over btn classNames

* refactor(teams): prefer grafana-ui Button components over btn classNames

* refactor(datasources): prefer grafana-ui Button components over btn classNames

* refactor: prefer grafana-ui Button components over btn classNames

* Minor style tweak to service buttons

* test: update snapshots related to button changes

* chore(input-datasource): remove unused import declaration

* refactor(loginservicebuttons): rename theme.palette to theme.colors

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-04-23 10:06:42 +02:00
Ryan McKinley
7499efeef8
Icons: fix iconRoot url (#33243) 2021-04-23 09:06:19 +02:00
Uchechukwu Obasi
9774a429b9
creates Themeable v2 type (#33268) 2021-04-22 15:45:35 +02:00