Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
95ef0417
Unverified
Commit
95ef0417
authored
Jul 26, 2020
by
Jake Utley
Committed by
GitHub
Jul 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TablePanel: Add support for basic gauge as a cell display mode (#26595)
parent
9ce7fdc1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
0 deletions
+5
-0
packages/grafana-ui/src/components/Table/BarGaugeCell.tsx
+2
-0
packages/grafana-ui/src/components/Table/types.ts
+1
-0
packages/grafana-ui/src/components/Table/utils.ts
+1
-0
public/app/plugins/panel/table/module.tsx
+1
-0
No files found.
packages/grafana-ui/src/components/Table/BarGaugeCell.tsx
View file @
95ef0417
...
...
@@ -37,6 +37,8 @@ export const BarGaugeCell: FC<TableCellProps> = props => {
if
(
field
.
config
.
custom
&&
field
.
config
.
custom
.
displayMode
===
TableCellDisplayMode
.
LcdGauge
)
{
barGaugeMode
=
BarGaugeDisplayMode
.
Lcd
;
}
else
if
(
field
.
config
.
custom
&&
field
.
config
.
custom
.
displayMode
===
TableCellDisplayMode
.
BasicGauge
)
{
barGaugeMode
=
BarGaugeDisplayMode
.
Basic
;
}
let
width
;
...
...
packages/grafana-ui/src/components/Table/types.ts
View file @
95ef0417
...
...
@@ -17,6 +17,7 @@ export enum TableCellDisplayMode {
GradientGauge
=
'gradient-gauge'
,
LcdGauge
=
'lcd-gauge'
,
JSONView
=
'json-view'
,
BasicGauge
=
'basic'
,
}
export
type
FieldTextAlignment
=
'auto'
|
'left'
|
'right'
|
'center'
;
...
...
packages/grafana-ui/src/components/Table/utils.ts
View file @
95ef0417
...
...
@@ -91,6 +91,7 @@ function getCellComponent(displayMode: TableCellDisplayMode, field: Field) {
case
TableCellDisplayMode
.
ColorBackground
:
return
withTableStyles
(
DefaultCell
,
getBackgroundColorStyle
);
case
TableCellDisplayMode
.
LcdGauge
:
case
TableCellDisplayMode
.
BasicGauge
:
case
TableCellDisplayMode
.
GradientGauge
:
return
BarGaugeCell
;
case
TableCellDisplayMode
.
JSONView
:
...
...
public/app/plugins/panel/table/module.tsx
View file @
95ef0417
...
...
@@ -45,6 +45,7 @@ export const plugin = new PanelPlugin<Options, CustomFieldConfig>(TablePanel)
{
value
:
TableCellDisplayMode
.
ColorBackground
,
label
:
'Color background'
},
{
value
:
TableCellDisplayMode
.
GradientGauge
,
label
:
'Gradient gauge'
},
{
value
:
TableCellDisplayMode
.
LcdGauge
,
label
:
'LCD gauge'
},
{
value
:
TableCellDisplayMode
.
BasicGauge
,
label
:
'Basic gauge'
},
{
value
:
TableCellDisplayMode
.
JSONView
,
label
:
'JSON View'
},
],
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment