Commit Graph

2013 Commits

Author SHA1 Message Date
Torkel Ödegaard
b929822d72
Theme: Renames theme.palette to theme.colors (#33214)
* Theme: Rename theme.palette to theme.colors

* renaming files
2021-04-21 15:34:08 +02:00
Torkel Ödegaard
7e2bf4f6c3
Theming: Make new theme exposed by ThemeContext and make new theme include v1 for compatability (to pass to useTheme) (#33207)
* WIP: Making new theme the default

* Progress

* Updates, lots of updates

* Things are working

* Fixed issues with storybook

* Fixed tests
2021-04-21 14:25:43 +02:00
Peter Holmberg
569fb3f112
Alerting: adding query editor when creating threshold rule. (#33123)
* fix viz

* add datasource picker on query rows in mixed mode

* add timerange, handle add/remove queryrunners

* multiqueryrunner test

* trying things out.

* adding another test to verify running a induvidual query runner will update multirunner.

* cleaned up tests a bit.

* draft version working ok.

* fixing so we base the refId from request targets.

* reenable adding expression

* layout fixes for alerting page

* some cleanup

* cleaning up code that we won't use

* changed so we don't display the time range if params not passed.

* remove unused things in querygroup

* changed button to type button.

* removed timerange from dataQuery and removed multiquery runner.

* minor refactoring.

* renamed callback function to make it more clear what it does.

* renamed droppable area.

* changed so we only display the query editor when selecting threshold.

* removed the refresh picker.

* revert

* wip

* extending with data query.

* timerange fixes

* it is now possible to add grafana queries.

* removed unused type.

* removed expect import.

* added docs.

* moved range converting methods to rangeUtil.

* clean up some typings, remove file

* making sure we don't blow up on component being unmounted.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-04-21 13:57:17 +02:00
Josh Hunt
0463164f8c
Grafana-UI: Type onEditorDidMount (#33178) 2021-04-21 11:16:54 +02:00
Torkel Ödegaard
dc6d134276
Storybook: Fixes theming of the padded story (that makes stories use primary background by default) (#33166) 2021-04-21 09:45:12 +02:00
kay delaney
bad048b7ba
Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.

* Remove unnecessary _ import from Graph component

* Enforce lodash import style

* Fix remaining lodash imports
2021-04-21 09:38:00 +02:00
Ryan McKinley
af46bbf654
LegendIcon: only render color picker when the props change (#33141) 2021-04-20 20:28:47 +02:00
Torkel Ödegaard
8db3eb90ae
Re-license Grafana to AGPLv3 (#33184)
For a rationale as to why this was done, please see

* https://grafana.com/blog/2021/04/20/grafana-loki-tempo-relicensing-to-agplv3/
* https://grafana.com/blog/2021/04/20/qa-with-our-ceo-on-relicensing/

Signed-off-by: Richard Hartmann <richih@richih.org>
Signed-off-by: Torkel Ödegaard <torkel@grafana.com>
Signed-off-by: Carl Bergquist <carl.bergquist@gmail.com>
Signed-off-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-04-20 19:03:30 +02:00
Torkel Ödegaard
6bbcd43b4c
Switch: Another design update (#33170) 2021-04-20 17:10:05 +02:00
Hugo Häggmark
888667abbc
Table: Fixes so border is visible for cells with links (#33160) 2021-04-20 15:06:29 +02:00
Ryan McKinley
dff78561bc
PanelData: include structure revision info and only apply overrides once (#33098)
* calculate schemaRevision in panel query runner

* schema > structureRev

* calculate revision after apply field overrides

* this.state

* don't apply field overrides if the shape is already the same

* check schema revision

* update snapshots
2021-04-20 11:05:50 +02:00
Torkel Ödegaard
c67737905e
RadioButton: fixes height of radio button after recent design changes (#33147) 2021-04-20 10:47:56 +02:00
Uchechukwu Obasi
bebc48c1f6
ToolTip: refactors story from knobs to control (#33130) 2021-04-20 10:23:59 +02:00
Jack Westbrook
c2953f3a06
PieChart: Unify tooltip to look the way it looks in TimeSeries (#33032)
* feat(piechart): align styles between piechart and graph

* feat(piechart): introduce tooltip options to panel and visualisation

* feat(piechart): get tooltip options working

* feat(piechart): add SeriesTable to visx TooltipInPortal

* refactor(piechart): move getTooltipData out of PieSlice

* docs(piechart): fix storybook story errors

* feat(viztooltip): initial commit of common tooltip types and components

* refactor(viztooltip): rename type as enum and update usage

* refactor(viztooltip): move chart.tooltip into viztooltip and fix imports and typings

* refactor(viztooltip): update import paths and names where used

* docs(infotooltip): fix story import paths

* docs(piechart): fix typings in story

* docs(viztooltip): add public annotations to exported components and types
2021-04-20 09:45:41 +02:00
Ryan McKinley
5f54f2dc00
GraphNG: flip logic so we can explicitly say the field types to keep (#33140) 2021-04-19 17:45:10 -07:00
Uchechukwu Obasi
f92b6518c5
ValuePicker: refactors story from knobs to control (#33122)
* ValuePicker: refactors story from knobs to control

* fixes wrong type issue
2021-04-19 15:45:28 +01:00
Hugo Häggmark
9bb1484dc5
ConfirmModal: Migrates to React with new theme (#33107)
* ConfirmModal: Migrates to React

* Refactor: migrates to v2 styles

* Chore: updates after PR comments
2021-04-19 14:30:18 +02:00
Ryan McKinley
98789e7ed9
MatcherUI: show field name even when not found in results (#33102) 2021-04-19 09:02:58 +02:00
Torkel Ödegaard
d62601e664
Theme: Variable name changes & progress (#33088)
* Theme variable renames

* Fixed variable issue issue

* Fixed test

* fixed story

* More tweaks

* Updated snapshot
2021-04-17 19:17:18 +02:00
Torkel Ödegaard
c46f992bfb
Theme: More theme updates (#33076)
* Theme: More theme updates

* Updated so Switch design

* increase limit
2021-04-17 07:13:25 +02:00
Piotr Jamróz
dd095642e2
Prometheus: Use fuzzy string matching to autocomplete metric names and label (#32207)
* Fuzzy search prototype

* Aggregate filter and sorting functions for auto-complete suggestions

* Add a test for fuzzy search

* Simplify setting fuzzy search information

* Rename SimpleHighlighter

* Test PartialHighlighter

* Add PartialHighlighter snapshot

* Simplify PartialHighlighter

* Revert env change

* Clean up the code

* Add fuzzy search for labels

* Bring back backwards compatiblity

* Expose search function type only

* Update docs

* Covert snapshot test to assertions

* Fix docs

* Fix language provider test

* Add a test for autocomplete logic

* Clean up

* Mock Editor functions

* Add fuzzy search to Prometheus labels

* Add docs about backwards compatibility

* Simplify main fuzzy search loop
2021-04-16 17:06:33 +02:00
Torkel Ödegaard
5d1ec39224 RadioButton: Fixed line-height 2021-04-16 15:23:12 +02:00
Torkel Ödegaard
733bb45172
Button/Link Focus: Use focus-visible for keyboard focus (#33066)
* outside react approach

* fixed ts issues and updated radio button

* css only solution

* Removed a bit

* Updated radio button design and fixed focus state on ToolbarButton

* Fixes

* Added missing fullWidth
2021-04-16 15:22:31 +02:00
Uchechukwu Obasi
41b704716f
VizLayout: refactored story from knobs to controls (#33043)
* VizLayout: refactored storys from knobs to controls

* abstracted the array logic to a separate function
2021-04-16 10:13:24 +01:00
Domas
19c6a02f49
Alerting: alert list state view (#33020) 2021-04-16 12:08:08 +03:00
Uchechukwu Obasi
cb6fe5e65b
Pagination: refactored story from knobs to controls (#33045) 2021-04-16 09:05:23 +01:00
Torkel Ödegaard
66485b3e70
Theme: V8 Theme updates (#33050)
* GraphNG: Use new theme props

* Minor fix to letterspacing in button

* Minor tweaks

* Updated

* Revert to roboto

* Added concept of a dark or white base

* Style updates

* Sass

* Updated light text blue

* updates

* reverting button group design

* Fixed tests

* updates

* Updated tests
2021-04-16 09:48:52 +02:00
Uchechukwu Obasi
ffe90b7abf
VizLegend: sets a min and max value of the seriesCount control in Storybook (#33022) 2021-04-15 13:51:00 +02:00
Dominik Prokop
0cc620aea7
GraphNG: stacking (#30749)
* First iteration

* Dev dash

* Re-use StackingMode type

* Fix ts and api issues

* Stacking work resurected

* Fix overrides

* Correct values in tooltip and updated test dashboard

* Update dev dashboard

* Apply correct bands for stacking

* Merge fix

* Update snapshot

* Revert go.sum

* Handle null values correctyl and make filleBelowTo and stacking mutual exclusive

* Snapshots update

* Graph->Time series stacking migration

* Review comments

* Indicate overrides in StandardEditorContext

* Change stacking UI editor, migrate stacking to object option

* Small refactor, fix for hiding series and dev dashboard
2021-04-15 13:00:01 +02:00
Leon Sorokin
aeb64ecb16
GraphNG: use theme font family and size for axis labels (#33009)
* GraphNG: use theme font family and size for axis labels

* fix test
2021-04-15 12:27:28 +02:00
Torkel Ödegaard
3c1e7a5f05
Theme: tweaking dark theme colors (#33007) 2021-04-15 08:45:19 +02:00
Torkel Ödegaard
bcd0958849
Theme: Updated font to Inter, updates typography, a start of moving legacy & global styles from sass to emotion (#32988)
* Testing inter font

* new fonts and global styles

* Added Typography component and storybook

* Moving more global legacy types to emotion global styles

* Updated snapshot

* mapp bold to 500

* Updates

* Fixes and moved html & body styles to emotion

* moved helper function down

* Updated snapshot

* More tweaks

* Updates

* added internal tag

* Updated snapshot
2021-04-14 21:49:38 +02:00
Domas
282c62d8bf
Alerting: Rule edit form (#32877) 2021-04-14 15:57:36 +03:00
Dominik Prokop
024b6b5779
Utils: Global debugger utils (#32951)
* Global debugger utils

* Update packages/grafana-ui/src/utils/debug.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Update packages/grafana-ui/src/utils/debug.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Update packages/grafana-ui/src/components/uPlot/utils.ts

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

* Update packages/grafana-ui/src/utils/debug.ts

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

* fix merge suggestion

* Typos

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-04-14 12:58:56 +02:00
Villena Guillaume
e533e5fe2a
AsyncSegment: Allow custom "no options" messages (#32674)
* Added support for custom user function for mapping custom noOptions messages

* Added new scenario in SegmentAsync.story.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-04-14 08:15:15 +02:00
Torkel Ödegaard
2808f4b034 Tab: Fixed font-weight for active tab 2021-04-13 21:32:02 +02:00
Torkel Ödegaard
99a6cfc0c6
Theming: Updates Tabs design to v8 theme desing, adds new gradients from theme (#32956)
* Theming: Updates Tabs design to v8 theme desing, adds new gradients from theme

* fixing link color
2021-04-13 20:33:10 +02:00
Torkel Ödegaard
b0c6cad637
Theme: Updates Alert design and licence warning hook (#32930)
* Theme: Updates Alert design and licence warning hook

* Updated snapshot

* Updated design

* Updated
2021-04-13 18:00:55 +02:00
Torkel Ödegaard
00ecd37778
Theme: V8 theme updates to text colors and buttons (#32905)
* Theme text colors

* Theme text colors

* More theme tweaks

* reduce input disabled border

* More updates
2021-04-12 19:44:43 +02:00
Marcus Andersson
5ce25509a1
PanelChrome: adding support for displaying error messages. (#32748)
* adding support to display panel error.

* adding error indicator.

* renaming back to left.

* fixing docs error issues.

* adding release tag.
2021-04-12 16:50:49 +02:00
Oscar Kilhed
1ed73ecef8
Makes pie chart component accept data frames (#32829)
* Makes pie chart component accept dataframes
2021-04-12 14:45:12 +02:00
Torkel Ödegaard
629603dd92
Theming: Updates to select styles and theme model progress (#32797)
* Theming: Updates to select styles and theme model progress

* Progress

* Update menu

* Updated menu group

* Improving button styles

* Added transitions to theme

* solving the hover & selected, focus issues

* Updated snapshot

* adding some colors from figma, but waiting to use them as not enough components use new layer colors

* Updates

* Updates

* Progress

* Renames

* Improvements to theme overview

* updated test

* demo update

* More new theme colors

* Wip new card styles

* Card tweaks hover is not working

* Updates more colors from figma

* Progress

* Progress

* Updated radio button styles

* Progress on new colors

* Progress

* New page toolbar and toolbar button design

* New toolbar button design

* Reverted to older toolbar and button look

* Updated snapshot

* Updated generated files

* Updated design

* Updates

* Added card hover

* Fixed button group

* Updates
2021-04-12 14:23:00 +02:00
Uchechukwu Obasi
44b6c896ae
VizLegend: updates story from knobs to controls (#32801)
* VizLegend: updates story from knobs to controls

* refactored story to be small and concise

* reverted stories to be WithValues and WithNoValues

* fixes the seriesCount control not having effects to the story by using the Effect hook
2021-04-12 12:18:23 +01:00
Jack Westbrook
5efffba234
Grafana-UI: Fix Storybook Docs prop tables reporting "Args unsupported" in custom MDX (#32889)
* fix(grafana-ui): pass params so storybook mdx has access to component args

* chore(grafana-ui): bump storybook to 6.2.7
2021-04-12 13:08:59 +02:00
Uchechukwu Obasi
a6fcd37a20
List: updates story from knobs to controls (#32832) 2021-04-12 11:57:01 +02:00
Uchechukwu Obasi
48853be682
Modal: updates story from knobs to control (#32840) 2021-04-12 10:08:36 +01:00
Torkel Ödegaard
7b23ed728f
DashboardSettings: Migrates annotations list & edit view from angular to react and new forms styles (#31950)
* Initial commit, list and edit page working

* Progress

* angular and standard editors work

* Unifying more between annotations list and links list

* Remove submenu visibilty stuff

* Update packages/grafana-data/src/types/annotations.ts

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

* Review feedback

* fixed checkbox

* Fixes

* test(annotationsettings): initial commit of tests

* delete files brought back by master merge

* update datasourcepicker import path

* update emotion import

* test(linksettings): clean up tests

* Fixed test

* test(annotationssettings): add remaining tests

* docs(grafana-data): export namespace for docs build

* docs(grafana-ui): export ColorValueEditorProps for docs build

* docs(grafana-ui): add docs annotation for ColorValueEditorProps

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-04-12 09:41:07 +02:00
Leon Sorokin
0c71fdac3d
GraphNG: uPlot 1.6.8 (#32859) 2021-04-09 18:27:14 -05:00
Leon Sorokin
0c96cbeef0
Icons: expand static cache to include all internally used icons (#32822) 2021-04-09 11:22:58 -05:00
Peter Holmberg
31a8413fd3
SSE: Add Classic conditions editor (#32256)
* moving expressions to components

* move expression type change to util

* rename gel to expressions

* add clasic condition component

* fix types

* incremental checkin

* button styling

* add range inputs

* some logic fixes and layout

* fix remove condition

* hide input if has no value

* typing fix
2021-04-09 14:46:24 +02:00