Commit Graph

53 Commits

Author SHA1 Message Date
Torkel Ödegaard
61e6e41ead
FieldConfig: Some name change suggestions and moving defaults to PanelPlugin (#23265)
* FieldConfig: Some name change suggestions and moving defaults to PanelPlugin

* More name changes
2020-04-02 13:24:50 +02:00
Dominik Prokop
dcf6bbc14f
NewPanelEditor: Options/FieldConfig API for defaults and common options selection (#23214)
* Add "some" typesafety to panel options/field config APIs

* Allow selected common field config properties config, allow option defaults config via fluent API

* Update packages/grafana-data/src/panel/PanelPlugin.ts

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Add defaults support for custom field config

* Enable defaults setting for standard and custom field configs

* Remove setFieldConfigDefaults from PanelPlugin API and replace it with useStandardFieldConfig

* Update API for standard field config defaults

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-04-01 15:33:10 +02:00
Torkel Ödegaard
53630b5f13
StatPanels: Refactoring DisplayValueOptions and renaming & adding new panel options to react panels (#23153)
* StatPanels: Refactoring DisplayValueOptions and renaming

* added return

* Progress

* Updated

* Made radio groups full width by default in panel options

* Fixed ts issue

* Updated

* Added remaining options

* Removed unused type

* Updated snapshot

* Renamed to ReduceDataOptions
2020-03-28 23:11:50 +01:00
Dominik Prokop
bf7579d984
FieldOverrides: Move FieldConfigSource from fieldOptions to PanelModel.fieldConfig (#22600)
* Apply field overrides in PanelChrome

* Move applyFieldOverrides to panel query runner

* Review updates

* Make sure overrides are applied back on souce panel when exiting the new edit mode

* TS ignores in est

* Make field display work in viz repeater

* Review updates

* Review and test updates

* Change the way overrides and trransformations are retrieved in PQR

* Add fieldConfig property to PanelModel

* Dashboard migration v1

* Use field config when exiting new panel edit mode

* Gauge - use fieldConfig from panel model

* FieldDisplayOptions - don's extend FieldConfigSource

* Fix fieldDisplay ts

* StatPanel updated

* Stat panel defaults applied

* Table2 panel options  update

* React graph updates

* BarGauge updated

* PieChart, Gauge, BarGauge and Stat updates

* PieChart - remove field config defaults from options

* FieldDisplayEditor - remove unused methos

* PanelModel - remove debugger

* Remove fieldConfig from field options when migrating dashboard

* Update data links migrations

* Update fieldDisaplay tests to respect new fieldConfig

* Update dashboard schema version in snapshots

* Fix BarGaugePanel test

* Rebase fixes

* Add onFieldConfigChange to PanelProps type

* Update shared single stat migration

* Pass PanelModel instead of options only for panel type change handler [breaking]

* Renames

* Don't mutate panel options

* Migrations update

* Remove obsolete snap

* Minor updates after review

* Fix null checks

* Temporarily (until we decide to switch to new pane edit) bring back old aditors

* Temporarily rename ValueMappingEditor and MappingRow to Legacy*

* Migrations update

* Updae setFieldConfigDefaults API

* Update the way field config defaults are applied

* Use standard field config for gauge, bar gauge and stat panels

* refactoring

* Revert dashboard fieldOptions migrations as those are handled by single stat migrator

* Fix ts in tests

* Strict null fix and some minor fixes

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-19 11:50:31 +01:00
Dominik Prokop
9b7748ec13
Chore: Reorg packages (#20111)
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data

* Move types from grafana-ui to grafana-data

* Move valueFormats to grafana-data

* Move utils from grafana-ui to grafana-data

* Update imports in grafana-ui

* revert data's tsconfig change

* Update imports in grafana-runtime

* Fix import paths in grafana-ui

* Move rxjs to devDeps

* Core import updates batch 1

* Import updates batch 2

* Imports fix batch 3

* Imports fixes batch i don't know

* Fix imorts in grafana-toolkit

* Fix imports after master merge
2019-10-31 10:48:05 +01:00
Ryan McKinley
21948e80e0
SingleStat: add a gauge migration call to action button in the editor (#18604) 2019-08-18 15:01:07 -07:00
Torkel Ödegaard
060e97bea8
Plugins: ReactPanelPlugin to VizPanelPlugin (#16779)
* Plugins: ReactPanelPlugin renamed

* Plugins: renamed PanelPlugin to PanelPluginMeta and VizPanelPlugin to PanelPlugin
2019-04-26 19:16:38 +02:00
Ryan McKinley
c8b2102500 Feat: Singlestat panel react progress & refactorings (#16039)
* big value component

* big value component

* editor for font and sparkline

* less logging

* remove sparkline from storybook

* add display value link wrapper

* follow tooltip

* follow tooltip

* merge master

* Just minor refactoring

* use series after last merge

* Refactoring: moving shared singlestat stuff to grafana-ui

* Refactor: Moved final getSingleStatDisplayValues func
2019-03-28 14:57:49 +01:00
Torkel Ödegaard
0d55141a2d Panels: Refactoring how panel plugins sets hooks and components, #16166 2019-03-24 15:56:32 +01:00
ryan
82be27a42a remove panel plugin setters 2019-03-22 13:12:35 -07:00
ryan
b1b5e8d74c use singlestat base where appropriate 2019-03-15 08:38:29 -07:00
ryan
985f057ab3 revert most options sharing 2019-03-14 13:20:24 -07:00
ryan
ccf66154bb add migration tests 2019-03-14 09:50:59 -07:00
ryan
c023635780 reuse more gauge settings in bargauge 2019-03-13 22:59:38 -07:00
ryan
68f7e046ab check types better 2019-03-13 13:11:49 -07:00
ryan
0c086795e3 check types better 2019-03-13 13:07:01 -07:00
ryan
75022ebd63 single hook 2019-03-13 12:46:04 -07:00
ryan
1bc8e7a8d1 merge master, works with bar gauge now 2019-03-13 11:12:11 -07:00
Peter Holmberg
89883c2cf6 copying options between visualizations 2019-02-21 13:43:36 +01:00
Torkel Ödegaard
abddb442a1
Changed how react panels store their options (#15468)
Changed how react panels store their options

* Added a ReactPanelPlugin as the interface that react panels export, this way react panels have clearer api, and gives us hooks to handle migrations and a way for panel to handle panel changes in the future
* Moved gauge value options into a sub oject and made editor more generic, will be moved out of gauge pane later and shared between singlestat, gauge, bargauge, honecomb
* Also remove nested options prop that was there due to bug
* Added missing Gauge props
* Fixed gauge issue that will require migration later and also value options editor did not handle null decimals or 0 decimals
* Fixed unit tests
* More fixes for react panels
2019-02-18 11:41:14 +01:00
Torkel Ödegaard
dede40d459 Began work on handling panel type switching and keep setting 2019-02-17 07:03:42 +01:00
Torkel Ödegaard
074073787d Added a ReactPanelPlugin as the interface that react panels export, this way react panels have clearer api, and gives us hooks to handle migrations and a way for panel to handle panel changes in the future 2019-02-16 15:46:30 +01:00
Dominik Prokop
1618e90844 Minor refactor of Gauge panel 2019-01-09 17:00:10 +01:00
Peter Holmberg
44e2fd4b22 Fix issue with value disappearing when selecting stat 2019-01-03 14:31:45 +01:00
Torkel Ödegaard
a02b4b47b6 Moving a couple of types to @grafana/ui 2018-12-23 09:15:32 +01:00
Peter Holmberg
3662f1c007 getting closer with no thresholds 2018-12-14 13:23:22 +01:00
Peter Holmberg
234095e6df starting with threshold refactor 2018-12-13 16:46:10 +01:00
Peter Holmberg
ddf080dab6 Using an id to identify mappings 2018-12-11 14:17:58 +01:00
Peter Holmberg
76f296e299 fixed typings and remove 2018-12-10 16:57:34 +01:00
Peter Holmberg
4a57d594e5 fixed styling 2018-12-10 14:50:32 +01:00
Peter Holmberg
368f1f67e4 render a value mapping row 2018-12-07 16:55:58 +01:00
Peter Holmberg
6fff8e4a1c initial stuff 2018-12-06 17:09:32 +01:00
Peter Holmberg
fd8fe35e29 redid props for gauge options 2018-12-03 09:37:45 +01:00
Peter Holmberg
ef3c913981 min and max value 2018-11-29 15:23:16 +01:00
Peter Holmberg
6084275119 started on thresholds 2018-11-20 17:01:58 +01:00
Peter Holmberg
4e1f49f883 refactor options, show labels and markers 2018-11-19 17:11:17 +01:00
Peter Holmberg
e0064ed38e Revert "typo fix"
This reverts commit 9ded648bc5.
2018-11-19 16:05:46 +01:00
Peter Holmberg
9ded648bc5 typo fix 2018-11-19 16:05:15 +01:00
Peter Holmberg
22e64eb287 prefix and suffix 2018-11-19 16:00:18 +01:00
Peter Holmberg
37729bf9f1 decimals 2018-11-19 15:50:51 +01:00
Peter Holmberg
a8cf2dc501 some touch ups on unit 2018-11-19 14:03:32 +01:00
Peter Holmberg
5722773467 Merge branch 'unit-picker' into gauge-value-options 2018-11-19 13:13:32 +01:00
Peter Holmberg
f72e751735 picker and functionaliy 2018-11-19 13:06:56 +01:00
Peter Holmberg
cc7bf31c3e Merge remote-tracking branch 'origin/develop' into unit-picker 2018-11-16 16:54:02 +01:00
Peter Holmberg
0f4131b8d7 handle default value 2018-11-16 15:26:51 +01:00
Peter Holmberg
61a704a64e some progress on groups and options 2018-11-15 17:14:43 +01:00
Peter Holmberg
063a1acf94 started on options and groups 2018-11-14 17:00:26 +01:00
Torkel Ödegaard
080d611004 minor changes to react panels 2018-11-14 13:20:19 +01:00
Peter Holmberg
e4e41474b1 first stuff 2018-11-14 11:06:02 +01:00
Torkel Ödegaard
7b805bdb81 minor react panels refafactor 2018-11-13 08:40:42 +01:00