60 Commits

Author SHA1 Message Date
a2cbbe1b8a BarChart: value label sizing (#34229)
* Bar chart label positioning and sizing

* Dev dashbard

* Improve autosizing

* Remove sync option

* Unify text sizing options between stat-ish visualizations and bar chart

* Add simple categorical data scenario and update dev dashboard

* Remove unused options builder

* Add docs annotations

* Fix go lint
2021-05-19 17:33:56 +02:00
9d6c8f8512 PanelEdit: v8 Panel Edit UX (#32124)
* Initial commit

* Progress

* Update

* Progress

* updates

* Minor fix

* fixed ts issue

* fixed e2e tests

* More explorations

* Making progress

* Panel options and field options unified

* With nested categories

* Starting to find something

* fix paddings

* Progress

* Breakthrough ux layout

* Progress

* Updates

* New way of composing options with search

* added regex search

* Refactoring to react note tree

* Show overrides

* Adding overrides radio button support

* Added popular view

* Separate stat/gauge/bargauge options into value options and display options

* Initial work on getting library panels into viz picker flow

* Fixed issues switching to panel library panel

* Move search input put of LibraryPanelsView

* Changing design again to have content inside boxes

* Style updates

* Refactoring to fix scroll issue

* Option category naming

* Fixed FilterInput issue

* Updated snapshots

* Fix padding

* Updated viz picker design

* Unify library panel an viz picker card

* Updated card with delete action

* Major refactoring back to an object model instead of searching and filtering react node tree

* More refactoring

* Show option category in label when searching

* Nice logic for categories rendering when searching or when only child

* Make getSuggestions more lazy for DataLinksEditor

* Add missing repeat options and handle conditional options

* Prepping options category to be more flexibly and control state from outside

* Added option count to search result

* Minor style tweak

* Added button to close viz picker

* Rewrote overrides to enable searching overrides

* New search engine and tests

* Searching overrides works

* Hide radio buttons while searching

* Added angular options back

* Added memoize for all options so they are not rebuilt for every search key stroke

* Added back support for category counters

* Started unit test work

* Refactoring and base popular options list

* Initial update to e2e test, more coming to add e2e test for search features

* Minor fix

* Review updates

* Fixing category open states

* Unit test progress

* Do not show visualization list mode radio button if library panels is not enabled

* Use boolean

* More unit tests

* Increase library panels per page count and give search focus when switching list mode

* field config change test and search test

* Feedback updates

* Minor tweaks

* Minor refactorings

* More minimal override collapse state
2021-03-25 08:33:13 +01:00
1d689888b0 Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00
c7aac1fd40 Gauge: Hide orientation option in panel options (#25511) 2020-06-10 17:27:59 +02:00
63d25944c4 Minor UI touches (#24371)
* Justify to alignment in stat

* No stats label in inspect

* Use sentence case in panel names

* typos

* typo

* Typo

* Query -> query options

* prettier

* Transformer -> transform data

* Do not show deprecated plugins in the viz picker

* Update viz picker layout
2020-05-08 12:40:42 +02:00
ea792edd3a NewPanelEditor/Panels: refactor setDefault to setPanelOptions (#23404)
* Remove deprecated setDefault usages

* Add simple support for conditinal field config properties

* Use new API in NewsPanel

* Update tests

* Fix check
2020-04-08 19:21:26 +02:00
b10392733d FieldConfig: Unify the custom and standard registry (#23307)
* FieldConfig: Unifying standard and custom registry

* Adding path to option items to make id be prefixed for custom options

* Code updates progress

* Add docs back

* Fix TS

* ld overrides tests from ui to data

* Refactor - rename

* Gauge and table cleanup

* F-I-X e2e

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-04-06 16:24:41 +02:00
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
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
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
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
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
21948e80e0 SingleStat: add a gauge migration call to action button in the editor (#18604) 2019-08-18 15:01:07 -07:00
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
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
0d55141a2d Panels: Refactoring how panel plugins sets hooks and components, #16166 2019-03-24 15:56:32 +01:00
82be27a42a remove panel plugin setters 2019-03-22 13:12:35 -07:00
b1b5e8d74c use singlestat base where appropriate 2019-03-15 08:38:29 -07:00
985f057ab3 revert most options sharing 2019-03-14 13:20:24 -07:00
ccf66154bb add migration tests 2019-03-14 09:50:59 -07:00
c023635780 reuse more gauge settings in bargauge 2019-03-13 22:59:38 -07:00
68f7e046ab check types better 2019-03-13 13:11:49 -07:00
0c086795e3 check types better 2019-03-13 13:07:01 -07:00
75022ebd63 single hook 2019-03-13 12:46:04 -07:00
1bc8e7a8d1 merge master, works with bar gauge now 2019-03-13 11:12:11 -07:00
89883c2cf6 copying options between visualizations 2019-02-21 13:43:36 +01:00
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
dede40d459 Began work on handling panel type switching and keep setting 2019-02-17 07:03:42 +01:00
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
1618e90844 Minor refactor of Gauge panel 2019-01-09 17:00:10 +01:00
44e2fd4b22 Fix issue with value disappearing when selecting stat 2019-01-03 14:31:45 +01:00
a02b4b47b6 Moving a couple of types to @grafana/ui 2018-12-23 09:15:32 +01:00
3662f1c007 getting closer with no thresholds 2018-12-14 13:23:22 +01:00
234095e6df starting with threshold refactor 2018-12-13 16:46:10 +01:00
ddf080dab6 Using an id to identify mappings 2018-12-11 14:17:58 +01:00
76f296e299 fixed typings and remove 2018-12-10 16:57:34 +01:00
4a57d594e5 fixed styling 2018-12-10 14:50:32 +01:00
368f1f67e4 render a value mapping row 2018-12-07 16:55:58 +01:00
6fff8e4a1c initial stuff 2018-12-06 17:09:32 +01:00
fd8fe35e29 redid props for gauge options 2018-12-03 09:37:45 +01:00
ef3c913981 min and max value 2018-11-29 15:23:16 +01:00
6084275119 started on thresholds 2018-11-20 17:01:58 +01:00
4e1f49f883 refactor options, show labels and markers 2018-11-19 17:11:17 +01:00
e0064ed38e Revert "typo fix"
This reverts commit 9ded648bc532cfd5b044097970fbc4b4dab9b489.
2018-11-19 16:05:46 +01:00
9ded648bc5 typo fix 2018-11-19 16:05:15 +01:00
22e64eb287 prefix and suffix 2018-11-19 16:00:18 +01:00
37729bf9f1 decimals 2018-11-19 15:50:51 +01:00
a8cf2dc501 some touch ups on unit 2018-11-19 14:03:32 +01:00
5722773467 Merge branch 'unit-picker' into gauge-value-options 2018-11-19 13:13:32 +01:00
f72e751735 picker and functionaliy 2018-11-19 13:06:56 +01:00