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> {
...
@@ -88,7 +88,7 @@ export default class MappingRow extends PureComponent<Props, State> {
const
valueMap
=
mapping
as
ValueMap
;
const
valueMap
=
mapping
as
ValueMap
;
return
(
return
(
<
div
className=
"gf-form
-inline
"
>
<
div
className=
"gf-form"
>
<
div
className=
"gf-form-inline"
>
<
div
className=
"gf-form-inline"
>
<
Label
width=
{
4
}
>
Value
</
Label
>
<
Label
width=
{
4
}
>
Value
</
Label
>
<
input
className=
"gf-form-input"
onChange=
{
this
.
onMappingValueChange
}
value=
{
valueMap
.
value
}
/>
<
input
className=
"gf-form-input"
onChange=
{
this
.
onMappingValueChange
}
value=
{
valueMap
.
value
}
/>
...
@@ -105,36 +105,34 @@ export default class MappingRow extends PureComponent<Props, State> {
...
@@ -105,36 +105,34 @@ export default class MappingRow extends PureComponent<Props, State> {
const
{
mappingType
}
=
this
.
state
;
const
{
mappingType
}
=
this
.
state
;
return
(
return
(
<
div
>
<
div
className=
"gf-form-inline"
>
<
div
className=
"gf-form-inline"
>
<
ToggleButtonGroup
<
ToggleButtonGroup
onChange=
{
mappingType
=>
this
.
onMappingTypeChange
(
mappingType
)
}
label=
"Mapping type"
value=
{
mappingType
}
onChange=
{
mappingType
=>
this
.
onMappingTypeChange
(
mappingType
)
}
render=
{
({
selectedValue
,
onChange
})
=>
{
render=
{
({
selectedValue
,
onChange
})
=>
{
return
[
return
[
<
ToggleButton
<
ToggleButton
className=
"btn-small"
className=
"btn-small"
key=
"value"
key=
"value"
onChange=
{
onChange
}
onChange=
{
onChange
}
selected=
{
selectedValue
===
MappingType
.
ValueToText
}
selected=
{
selectedValue
===
mappingType
}
value=
{
MappingType
.
ValueToText
}
value=
"Value"
>
>
Value
Value
</
ToggleButton
>,
</
ToggleButton
>,
<
ToggleButton
<
ToggleButton
className=
"btn-small"
className=
"btn-small"
key=
"range"
key=
"range"
onChange=
{
onChange
}
onChange=
{
onChange
}
selected=
{
selectedValue
===
MappingType
.
RangeToText
}
selected=
{
selectedValue
===
mappingType
}
value=
{
MappingType
.
RangeToText
}
value=
"Range"
>
>
Range
Range
</
ToggleButton
>,
</
ToggleButton
>,
];
];
}
}
}
}
/>
/>
<
div
>
{
this
.
renderRow
()
}
</
div
>
<
div
>
{
this
.
renderRow
()
}
</
div
>
</
div
>
</
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