Commit Graph

1660 Commits

Author SHA1 Message Date
Torkel Ödegaard
ec218de05e
React: Upgrading react to v17, wip (#29057)
* React: Upgrading react, wip

* build(grafana-ui): bump react to v17

* build: get enzyme running with react 17

* chore(grafana-ui): declare isMemo namedExport for rollup

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2020-11-18 19:37:17 +01:00
Piotr G
ab2a46bcb3
Gauge: Tweaks short value auto-sizing (#29197)
* Tweaks gauge value auto-sizing

* tweak factor a bit

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-18 18:38:57 +01:00
Ryan McKinley
1895626080
GraphNG: update the options config (#28917) 2020-11-18 08:46:44 -08:00
Dominik Prokop
0cfb967404
ESlint: React fixes part 1 (#29062)
* Eslint: allign with latest grafana-eslint-config

* fix ts

* Fix react/jsx-key

* Fix react/no-children-prop

* Fix react/jsx-no-target-blank
2020-11-18 15:36:35 +01:00
Dominik Prokop
5ae7280249
Introduce eslint-plugin-react (#29053)
* Eslint: allign with latest grafana-eslint-config

* fix ts

* Bump @grafana-eslint-congig version
2020-11-18 14:19:33 +01:00
Dominik Prokop
05fbc614bd
Refactor declarative series configuration to a config builder (#29106)
* Wip: refactor declarative series configuration to a config builder

* Fix plugins initialization

* Config builder reorg and tests

* Typecheck

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

* Scales config tweak

* Temp disable tests

* Disable some tests temporarily
2020-11-18 11:14:24 +01:00
Dominik Prokop
f28ba27ca2
Table: Fix incorrect condtition for rendering table filter (#29165) 2020-11-18 08:46:40 +01:00
Torkel Ödegaard
28ce2f12ed
Legend/GraphNG: Refactoring legend types and options (#29067)
* Legend/GraphNG: Refactoring legend types and options

* Rename label

* Minor update

* Fixed legend placement crash issue

* remove unused

* Minor tweaks and fixes
2020-11-13 17:08:55 +01:00
Hugo Häggmark
1bdcd2f9ab
Chore: Bumps types for jest (#29098) 2020-11-13 14:48:11 +01:00
Andrej Ocenas
bbb1f72963
LogsPanel: Fix scrolling in dashboards (#28974) 2020-11-13 14:26:29 +01:00
Ivana Huckova
71df15738f
sort alphabetically unique labels, labels and parsed fields (#29030) 2020-11-13 14:17:00 +01:00
Torkel Ödegaard
a8c417f09d
GraphNG: Adding ticks test dashboard and improves tick spacing (#29044)
* GraphNG: Adding ticks test dashboard and improves tick spacing

* Added comments

* Trying to trigger CI

* Update
2020-11-12 17:23:05 +01:00
Torkel Ödegaard
367e7b861b
GraphNG: Fixed axis measurements (#29036) 2020-11-11 20:23:46 +01:00
Valentin Agachi
2c724e0aa2
Explore: support ANSI colors in live logs (#28895)
Closes #28893

Co-authored-by: Ivana <ivana.huckova@gmail.com>
2020-11-11 14:58:45 +01:00
Jack Westbrook
6d40206431
Dashboard: remove usage of Legacyforms (#28707)
* refactor(dashboard): remove usage of legacyform components in sharemodal

* refactor(dashboard): replace legacyform components

* refactor(dashboard): remove ng-if and correct typo in content of sharesnapshot

* feat(grafana-ui): set displayName prop for Switch component

* refactor(dashboard): migrate TimePickerSettings legacyform components

* refactor(queryoptions): migrate switch and input to nextgen components

* refactor(sharesnapshot): prefer InlineFieldRow over gf-form-group

* refactor(shareembed): styling fixes

* refactor(timepickersettings): prefer double bang over nullish coalescing operator

* fix(grafana-ui): switch uses id prop if passed in

* feat: connect labels and switches with ids
2020-11-11 14:52:22 +01:00
Ivana Huckova
812f588a75
Logs Panel: Fix inconsistent higlighting (#28971)
* Highlight filter expression in panel

* Remove coonsole.log
2020-11-11 09:58:21 +01:00
Andrej Ocenas
b90304cc79
LogsPanel: Don't show scroll bars when not needed (#28972) 2020-11-10 16:12:15 +01:00
Torkel Ödegaard
91eac6e7af
StatPanel: Fixed center of values in edge case scenarios (#28968) 2020-11-10 15:38:25 +01:00
Torkel Ödegaard
83042cc4b7
GraphNG: Restore focus option (#28946)
* GraphNG: Restore focus option

* Update snapshot
2020-11-09 21:12:22 +01:00
Torkel Ödegaard
71fffcb17c
GraphNG: Using new VizLayout, moving Legend into GraphNG and some other refactorings (#28913)
* Graph refactorings

* Move legend to GraphNG and use new VizLayout

* Things are working

* remove unused things

* Update

* Fixed ng test dashboard

* Update

* More refactoring

* Removed plugin

* Upgrade uplot

* Auto size axis

* Axis scaling

* Fixed tests

* updated

* minor simplification

* Fixed selection color

* Fixed story

* Minor story fix

* Improve x-axis formatting

* Tweaks

* Update

* Updated

* Updates to handle timezone

* Updated

* Fixing types

* Update

* Fixed type

* Updated
2020-11-09 15:31:03 +01:00
Dominik Prokop
2ea4a36bf7
Field color: handling color changes when switching panel types (#28875)
* FieldColor: Per panel settings to filter out supported modes

* Updates

* Updated solution

* Update panel plugin API for standard options support

* Update FieldColorConfigSettings interface

* Change color mode correctly when changing plugin type

* Render only applicable color modes in field color config editor

* Apply field config API changes

* TS fixes

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-09 13:11:09 +01:00
Alex Khomenko
1d7fda4db6
Grafana-UI: LoadingPlaceholder docs (#28874)
* Refactor props

* Add docs
2020-11-09 09:25:07 +02:00
Marcus Andersson
3697b628a7
Gauge: making sure threshold panel json is correct before render (#28898)
* making sure we work with a proper data structure.

* added test to verify functionality.

* removed unused variables.
2020-11-09 08:23:07 +01:00
Ryan McKinley
7308028a90
PanelHeader: show streaming indicator (and allow unsubscribe) (#28682) 2020-11-05 08:03:34 -08:00
Torkel Ödegaard
0a27929100
VizLayout: Simple viz layout component for legend placement and scaling (#28820)
* Updates

* Updated

* Rename slot to legend

* Updated

* Adding js doc comments

* hide horizontal track

* Fix docs error

* Added another export

* removing auto mode

* I hate these doc warnings
2020-11-05 13:29:56 +01:00
Hugo Häggmark
e54fc47462
Variables: Adds variables inspection (#25214)
* Chore: initial commit

* Refactor: adds usages

* Refactor: adds FeatureInfoBox

* Refactor: uses graphs instead

* Refactor: adds id, name, title to prop instead of key

* Refactor: adds usages to VariablesList

* Refactor: Moves unknowns to first page

* Refactor: minor stylings and icons

* Refactor: styling

* Refactor: changed to button with modal

* Refactor: adds VariablesDependenciesButton

* Refactor: changes after UX feedback

* Refactor: renames heading

* Refactor: changes after PR comments

* Refactor: small changes after PR comments
2020-11-05 09:53:27 +01:00
Torkel Ödegaard
c3ed644f66
Marked: Upgrade and always sanitize by default (#28796)
* Marked: Upgrade and always sanitize by default

* Added test

* corrected text panel logic
2020-11-05 09:40:12 +01:00
Torkel Ödegaard
9dd37f1e1b
Alert: Remove z-index on Alert component so that it does not overlay ontop of other content (#28834) 2020-11-04 20:27:43 +01:00
Torkel Ödegaard
2b7a570273
Gauge: Improve font size auto sizing (#28797)
* Gauge: Improved font size calculations

* Added some comments

* update

* Moving to variable
2020-11-04 17:07:37 +01:00
Ivana Huckova
0f7a470138
Icon: Replace font awesome icons where possible (#28757)
* Replace font awesome icons where possible

* Implement small updates
2020-11-04 13:34:40 +01:00
Torkel Ödegaard
5a11abe954
Events: Remove unused or unnecessary events (#28783)
* Events: Removing unused or unnessary events

* More cleanup

* Updated
2020-11-03 15:29:43 +01:00
Peter Holmberg
cfbbab9bd8
Docs: Add docs for InfoBox component (#28705)
* add mdx

* fixes after pr feedback
2020-11-03 09:07:12 +01:00
Jack Westbrook
f519f89103
Migration: Remove LegacyForms from dashboard folder permissions (#28564)
* refactor(permissionlist): replace legacyform components with next-gen equivalents

* refactor(permissionlist): replace legacyform components

* refactor(permissionlist): clean up PermissionsInfo

* feat(grafana-ui): define line-height for Select option descriptions

* refactor(permissionlist): remove debug code

* refactor(permissionlist): simplify component tree with horizontalgroup. Add label

* refactor(permissionlist): remove redundant classname from Select
2020-11-02 12:55:34 +01:00
Hugo Häggmark
ba12a6a42a
TableFilters: Fixes filtering with field overrides (#28690)
* TableFilters: Fixes filtering with field overrides

* Refactor: changes after PR comments
2020-11-02 07:26:58 +01:00
Torkel Ödegaard
b46ac2891d
StatPanel: Fixed value being under graph and reduced likley hood for white and dark value text mixing (#28641)
* StatPanel: Fixed value being under graph and reduced likley hood for white and dark value text mixing

* Updated snapshot

* Updated storybook config
2020-10-29 14:08:09 +01:00
Torkel Ödegaard
1e51d33d85
Table: Fix image cell mode so that it works with value mappings (#28644) 2020-10-29 13:53:08 +01:00
Isa Ozler
85a04794ac
Field config API: add slider editor (#28007)
* Field config: implementation slider editor (#27592)

* PR-28007 feedback fixed

* Field config: implementation slider editor (#27592)

* PR-28007 feedback fixed

* processed review PR-28007

* Field config: implementation slider editor (#27592)

* PR-28007 feedback fixed

* Field config: implementation slider editor (#27592)

* processed review PR-28007

* fixing leftover number[] bugs

* RichHistoryQueriesTab.test fix + slider vertical feat fixed

* fixed Slider.test.tsx expectation

* Added @docs to prevent build-frontend-docs from failing

Co-authored-by: Isa Ozler <contactme@isaozler.com>
2020-10-28 15:00:31 +01:00
Dominik Prokop
019173eb79
Update uPlot to 1.2.2 and align timestamps config with new uPLot API (#28569) 2020-10-28 14:49:38 +01:00
Alex Khomenko
c96ef2676e
Grafana-UI: Add Card component (#28216)
* Base card

* Add disabled state

* Expand knobs

* Add card actions

* Add meta data

* Allow custom tags

* Extend container props

* Add inner link

* Add docs

* Add missing keys

* Update margins

* Add description

* Add full card example

* Tweak disabld state

* Export Card

* title => heading

* Filter out empty content

* Add disableEvents

* Move tooltip to container

* Use new Card for AlertRuleItem

* Cleanup

* Update snapshot

* Rename props

* Rename props[2]

* Disable hover is onClick is missing

* Fix alert rule item

* Update snapshot

* Export CardProps

* Replace logo

* Remove tag prop

* Remove extra div

* Add @public

* Update AlertRuleItem

* Simplify disabled logic

* Export Card styles

* Remove AlertRuleItem tooltips

* Revert to old button design

* Make component internal

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-10-28 09:23:22 +02:00
Torkel Ödegaard
283fd4c247
API: Reducing some api docs errors (#28575) 2020-10-27 17:54:02 +01:00
Alex Khomenko
75ebf3f15c
Grafana-UI: ContextMenu docs (#28508)
* Add story

* Add docs

* Get rid of selectThemeVariant

* Minor tweaks
2020-10-27 17:18:45 +02:00
Dominik Prokop
4468d41417
Plugin signing: UI information (#28469)
* first pass

* return list

* types and cleanup

* add to plugin page and add styles

* update comment

* update comment

* fix component path

* simplify error component

* simplify error struct

* fix tests

* don't export and fix string()

* update naming

* remove frontend

* introduce phantom loader

* track single error

* remove error from base

* remove unused struct

* remove unnecessary filter

* add errors endpoint

* Update set log to use id field

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* skip adding BE plugins

* remove errs from plugin + ds list

* remove unnecessary fields

* add signature state to panels

* Fetch plugins errors

* grafana/ui component tweaks

* DS Picker - add unsigned badge

* VizPicker - add unsigned badge

* PluginSignatureBadge tweaks

* Plugins list - add signatures info box

* New datasource page - add signatures info box

* Plugin page - add signatures info box

* Fix test

* Do not show Core label in viz picker

* Update public/app/features/plugins/PluginsErrorsInfo.tsx

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

* Update public/app/features/plugins/PluginListPage.test.tsx

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

* Update public/app/features/plugins/PluginListPage.tsx

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

* Update public/app/features/datasources/NewDataSourcePage.tsx

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

* Review comments 1

* Review comments 2

* Update public/app/features/plugins/PluginsErrorsInfo.tsx

* Update public/app/features/plugins/PluginPage.tsx

* Prettier fix

* remove stale backend code

* Docs issues fix

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2020-10-27 13:08:08 +01:00
Will Browne
4d2b20f727
Auth: Fix SigV4 request verification step for Amazon Elasticsearch Service (#28481)
* remove forward header and add extra steps for encoding

* add comment

* re-use forwarded header

* fix service param

* Make SDK the default auth option in UI

* use SDK code instead

* propagate err

* refactor flow

* fix prom service namespace
2020-10-26 12:36:11 +01:00
Jack Westbrook
a8a3686785
Grafana/ui: auto focus threshold editor input (#28360)
* feat(grafana-ui): autofocus threshold editor input

* refactor(grafana-ui): remove commented out css

* feat(grafana-ui): use ref for autofocus new thresholds editor input

* refactor(grafana-ui): conditionally set input ref for latest threshold

* refactor(grafana-ui): put back createRef for input ref
2020-10-26 12:21:41 +01:00
Dênis Volpato Martins
639460a789
Checkbox: Fix component sample typo (#28518) 2020-10-26 06:26:34 +01:00
Ivana Huckova
d9d34ceedf
Fix cut off icon (#28442) 2020-10-21 21:39:24 +02:00
Ivana Huckova
3f39b4b601
Loki: Visually distinguish error logs for LogQL2 (#28359)
* Loki: Add errored logs and update UI

* Update messaging

* Add icon and tooltip for errored logs

* Update name of variable for more semantic meaning

* Add tests

* Update test

* Refactor, remove unnecessary state

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

* Update packages/grafana-ui/src/components/Logs/LogDetails.tsx

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
2020-10-21 19:11:32 +02:00
Zoltán Bedi
e1c44d7a8a
Chore: react hooks eslint fixes in grafana-ui (#28026)
* Fix some rule violation in grafan-ui

* Update eslint-plugin-react-hooks to latest

* Remove duplicate dependency

* Fix more files

* Props destruction
2020-10-21 09:06:41 +02:00
Ryan McKinley
0bfdf79968
Chore: fix jsdoc desc and return (#28383) 2020-10-20 07:35:45 -07:00
Jack Westbrook
04c06f2286
Grafana/ui: pass html attributes to segment (#28316)
* feat(grafana-ui): introduce rest props to segment components

* docs(grafana-ui): add segment stories for html attributes
2020-10-20 14:18:05 +02:00