mirror of
https://github.com/grafana/grafana.git
synced 2026-08-13 06:34:55 -05:00
Table Panel: Refactor Cell Options to Allow for Options per Cell Type (#59363)
* Update table data structure schema. * Update table panel configuration options for new structure * Fix TS errors from refactor * Separate background and gauge display modes * Remove the now used Bar Gauge display from the mud * Fix types up * Reorganize data structures * Fix type issues. * Start stubbing necessary code. * Continue implementing option refactor * Change category for cell type selection. * Consolidate cell options * Fix various typing issues * Clean up dead code * Stub handling display mode changes * Make subOption editor dynamic * Setup interface for sub-option editor props * Remove unused imports * Remove console.log call * Persist display mode changes, stub sub options change, update comments. * Make sure updates from cells are persisted * Persist sub-option changes * Update BarGaugeCell to take into account new settings. * Add deprecated field back * Remove unecessary options in configuration * Update default cell to accept new settings * Make sure color text display works * Add deprecated property notice * Use constant as opposed to string * Make sure we name globally namespaced things uniquely * Update to use unique name * Use union type with discriminator. * Simplify types and operation * Update type definitons * Update types * Update property names in cells * Remove React.FC usage * Update option editor signature * Update options structure * Change variable name * Fix "Color Text" display * Remove debug statement * Make sure we remain backwards compatible with display mode. * Add migration for configuration. * Export BarGaugeDisplayMode from grafana-ui * Update import * Fix bar gauge and dashboard migrator tests * Fix potential undefined references causing test failures * Fix another potential reference error in DefaultCell * Try to fix breaking change detection. * Cache setting changes * Make sure we return with onChange invocation * Fixed migrating overrides * Fix a number of review comments * Simplify option editors * Fix unused imports * Fill out comments for types * Actually use defaultPanelConfig for editor default * Move TableCellEditorProps alongside TableCellOptionEditor * Update docs for table panel * Also make sure we remove TableCellEditorProps from model file * Stub migration tests * Add tests for default config migration * Add basic overrides test * Flesh out tests a bit more * Add inspect to same category as cell editor Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
co-authored by
Torkel Ödegaard
parent
d5da42bbbc
commit
80e7f54166
@@ -68,11 +68,11 @@ Choose how Grafana should align cell contents:
|
||||
- Center
|
||||
- Right
|
||||
|
||||
## Cell display mode
|
||||
## Cell type
|
||||
|
||||
By default, Grafana automatically chooses display settings. You can override the settings by choosing one of the following options to change all fields.
|
||||
By default, Grafana automatically chooses display settings. You can override the settings by choosing one of the following options to set the default for all fields. Additional configuration is available for some cell types.
|
||||
|
||||
> **Note:** If you set these in the Field tab, then the display modes will apply to all fields, including the time field. Many options will work best if you set them in the Override tab.
|
||||
> **Note:** If you set these in the Field tab, then the type will apply to all fields, including the time field. Many options will work best if you set them in the Override tab so that they can be restricted to one or more fields.
|
||||
|
||||
### Color text
|
||||
|
||||
@@ -86,13 +86,23 @@ If thresholds are set, then the field background is displayed in the appropriate
|
||||
|
||||
{{< figure src="/static/img/docs/tables/color-background.png" max-width="500px" caption="Color background" class="docs-image--no-shadow" >}}
|
||||
|
||||
### Gradient gauge
|
||||
### Gauge
|
||||
|
||||
Cells can be displayed as a graphical gauge, with several different presentation types.
|
||||
|
||||
#### Basic
|
||||
|
||||
The basic mode will show a simple gauge with the threshold levels defining the color of gauge.
|
||||
|
||||
{{< figure src="/static/img/docs/tables/basic-gauge.png" max-width="500px" caption="Gradient gauge" class="docs-image--no-shadow" >}}
|
||||
|
||||
#### Gradient
|
||||
|
||||
The threshold levels define a gradient.
|
||||
|
||||
{{< figure src="/static/img/docs/tables/gradient-gauge.png" max-width="500px" caption="Gradient gauge" class="docs-image--no-shadow" >}}
|
||||
|
||||
### LCD gauge
|
||||
#### LCD
|
||||
|
||||
The gauge is split up in small cells that are lit or unlit.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user