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
a0a06911
Commit
a0a06911
authored
Dec 07, 2018
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toggle buttons
parent
368f1f67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
public/app/plugins/panel/gauge/MappingRow.tsx
+29
-31
No files found.
public/app/plugins/panel/gauge/MappingRow.tsx
View file @
a0a06911
...
...
@@ -88,7 +88,7 @@ export default class MappingRow extends PureComponent<Props, State> {
const
valueMap
=
mapping
as
ValueMap
;
return
(
<
div
className=
"gf-form
-inline
"
>
<
div
className=
"gf-form"
>
<
div
className=
"gf-form-inline"
>
<
Label
width=
{
4
}
>
Value
</
Label
>
<
input
className=
"gf-form-input"
onChange=
{
this
.
onMappingValueChange
}
value=
{
valueMap
.
value
}
/>
...
...
@@ -105,36 +105,34 @@ export default class MappingRow extends PureComponent<Props, State> {
const
{
mappingType
}
=
this
.
state
;
return
(
<
div
>
<
div
className=
"gf-form-inline"
>
<
ToggleButtonGroup
label=
"Mapping type"
onChange=
{
mappingType
=>
this
.
onMappingTypeChange
(
mappingType
)
}
render=
{
({
selectedValue
,
onChange
})
=>
{
return
[
<
ToggleButton
className=
"btn-small"
key=
"value"
onChange=
{
onChange
}
selected=
{
selectedValue
===
mappingType
}
value=
"Value"
>
Value
</
ToggleButton
>,
<
ToggleButton
className=
"btn-small"
key=
"range"
onChange=
{
onChange
}
selected=
{
selectedValue
===
mappingType
}
value=
"Range"
>
Range
</
ToggleButton
>,
];
}
}
/>
<
div
>
{
this
.
renderRow
()
}
</
div
>
</
div
>
<
div
className=
"gf-form-inline"
>
<
ToggleButtonGroup
onChange=
{
mappingType
=>
this
.
onMappingTypeChange
(
mappingType
)
}
value=
{
mappingType
}
render=
{
({
selectedValue
,
onChange
})
=>
{
return
[
<
ToggleButton
className=
"btn-small"
key=
"value"
onChange=
{
onChange
}
selected=
{
selectedValue
===
MappingType
.
ValueToText
}
value=
{
MappingType
.
ValueToText
}
>
Value
</
ToggleButton
>,
<
ToggleButton
className=
"btn-small"
key=
"range"
onChange=
{
onChange
}
selected=
{
selectedValue
===
MappingType
.
RangeToText
}
value=
{
MappingType
.
RangeToText
}
>
Range
</
ToggleButton
>,
];
}
}
/>
<
div
>
{
this
.
renderRow
()
}
</
div
>
</
div
>
);
}
...
...
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