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
3ce45e71
Commit
3ce45e71
authored
Jan 17, 2019
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shortening callback functions
parent
736db86d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
21 deletions
+11
-21
packages/grafana-ui/src/components/ValueMappingsEditor/MappingRow.tsx
+6
-6
public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx
+2
-2
public/app/plugins/panel/gauge/ValueOptions.tsx
+3
-13
No files found.
packages/grafana-ui/src/components/ValueMappingsEditor/MappingRow.tsx
View file @
3ce45e71
...
...
@@ -65,16 +65,16 @@ export default class MappingRow extends PureComponent<Props, State> {
label=
"From"
labelWidth=
{
4
}
inputWidth=
{
8
}
on
Change=
{
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
this
.
onMappingFromChange
(
event
)
}
on
Blur=
{
()
=>
this
.
updateMapping
()
}
on
Blur=
{
this
.
updateMapping
}
on
Change=
{
this
.
onMappingFromChange
}
value=
{
from
}
/>
<
FormField
label=
"To"
labelWidth=
{
4
}
inputWidth=
{
8
}
onBlur=
{
()
=>
this
.
updateMapping
}
onChange=
{
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
this
.
onMappingToChange
(
event
)
}
onBlur=
{
this
.
updateMapping
}
onChange=
{
this
.
onMappingToChange
}
value=
{
to
}
/>
<
div
className=
"gf-form gf-form--grow"
>
...
...
@@ -95,8 +95,8 @@ export default class MappingRow extends PureComponent<Props, State> {
<
FormField
label=
"Value"
labelWidth=
{
4
}
onBlur=
{
()
=>
this
.
updateMapping
}
onChange=
{
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
this
.
onMappingValueChange
(
event
)
}
onBlur=
{
this
.
updateMapping
}
onChange=
{
this
.
onMappingValueChange
}
value=
{
value
}
inputWidth=
{
8
}
/>
...
...
public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx
View file @
3ce45e71
...
...
@@ -21,8 +21,8 @@ export default class GaugeOptionsEditor extends PureComponent<PanelOptionsProps<
return
(
<
PanelOptionsGroup
title=
"Gauge"
>
<
FormField
label=
"Min value"
labelWidth=
{
8
}
onChange=
{
event
=>
this
.
onMinValueChange
(
event
)
}
value=
{
minValue
}
/>
<
FormField
label=
"Max value"
labelWidth=
{
8
}
onChange=
{
event
=>
this
.
onMaxValueChange
(
event
)
}
value=
{
maxValue
}
/>
<
FormField
label=
"Min value"
labelWidth=
{
8
}
onChange=
{
this
.
onMinValueChange
}
value=
{
minValue
}
/>
<
FormField
label=
"Max value"
labelWidth=
{
8
}
onChange=
{
this
.
onMaxValueChange
}
value=
{
maxValue
}
/>
<
Switch
label=
"Show labels"
labelClass=
"width-8"
...
...
public/app/plugins/panel/gauge/ValueOptions.tsx
View file @
3ce45e71
...
...
@@ -56,22 +56,12 @@ export default class ValueOptions extends PureComponent<PanelOptionsProps<GaugeO
label=
"Decimals"
labelWidth=
{
labelWidth
}
placeholder=
"auto"
onChange=
{
event
=>
this
.
onDecimalChange
(
event
)
}
onChange=
{
this
.
onDecimalChange
}
value=
{
decimals
||
''
}
type=
"number"
/>
<
FormField
label=
"Prefix"
labelWidth=
{
labelWidth
}
onChange=
{
event
=>
this
.
onPrefixChange
(
event
)
}
value=
{
prefix
||
''
}
/>
<
FormField
label=
"Suffix"
labelWidth=
{
labelWidth
}
onChange=
{
event
=>
this
.
onSuffixChange
(
event
)
}
value=
{
suffix
||
''
}
/>
<
FormField
label=
"Prefix"
labelWidth=
{
labelWidth
}
onChange=
{
this
.
onPrefixChange
}
value=
{
prefix
||
''
}
/>
<
FormField
label=
"Suffix"
labelWidth=
{
labelWidth
}
onChange=
{
this
.
onSuffixChange
}
value=
{
suffix
||
''
}
/>
</
PanelOptionsGroup
>
);
}
...
...
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