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
0fe452ec
Commit
0fe452ec
authored
Dec 17, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor react graph panel refactorings and fixes
parent
0fd92ef6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
public/app/core/components/Switch/Switch.tsx
+1
-1
public/app/plugins/panel/graph2/GraphOptions.tsx
+10
-19
No files found.
public/app/core/components/Switch/Switch.tsx
View file @
0fe452ec
...
@@ -32,7 +32,7 @@ export class Switch extends PureComponent<Props, State> {
...
@@ -32,7 +32,7 @@ export class Switch extends PureComponent<Props, State> {
const
switchClassName
=
`gf-form-switch
${
switchClass
}
${
transparent
?
'gf-form-switch--transparent'
:
''
}
`
;
const
switchClassName
=
`gf-form-switch
${
switchClass
}
${
transparent
?
'gf-form-switch--transparent'
:
''
}
`
;
return
(
return
(
<
label
htmlFor=
{
labelId
}
className=
"gf-form-switch-container"
>
<
label
htmlFor=
{
labelId
}
className=
"gf-form
gf-form
-switch-container"
>
{
label
&&
<
div
className=
{
labelClassName
}
>
{
label
}
</
div
>
}
{
label
&&
<
div
className=
{
labelClassName
}
>
{
label
}
</
div
>
}
<
div
className=
{
switchClassName
}
>
<
div
className=
{
switchClassName
}
>
<
input
id=
{
labelId
}
type=
"checkbox"
checked=
{
checked
}
onChange=
{
this
.
internalOnChange
}
/>
<
input
id=
{
labelId
}
type=
"checkbox"
checked=
{
checked
}
onChange=
{
this
.
internalOnChange
}
/>
...
...
public/app/plugins/panel/graph2/GraphOptions.tsx
View file @
0fe452ec
...
@@ -27,26 +27,17 @@ export class GraphOptions extends PureComponent<PanelOptionsProps<Options>> {
...
@@ -27,26 +27,17 @@ export class GraphOptions extends PureComponent<PanelOptionsProps<Options>> {
return
(
return
(
<
div
>
<
div
>
<
div
className=
"form-option-box"
>
<
div
className=
"section gf-form-group"
>
<
div
className=
"form-option-box__header"
>
Display Options
</
div
>
<
h5
className=
"section-heading"
>
Draw Modes
</
h5
>
<
div
className=
"section gf-form-group"
>
<
Switch
label=
"Lines"
labelClass=
"width-5"
checked=
{
showLines
}
onChange=
{
this
.
onToggleLines
}
/>
<
h5
className=
"section-heading"
>
Draw Modes
</
h5
>
<
Switch
label=
"Bars"
labelClass=
"width-5"
checked=
{
showBars
}
onChange=
{
this
.
onToggleBars
}
/>
<
Switch
label=
"Lines"
labelClass=
"width-5"
checked=
{
showLines
}
onChange=
{
this
.
onToggleLines
}
/>
<
Switch
label=
"Points"
labelClass=
"width-5"
checked=
{
showPoints
}
onChange=
{
this
.
onTogglePoints
}
/>
<
Switch
label=
"Bars"
labelClass=
"width-5"
checked=
{
showBars
}
onChange=
{
this
.
onToggleBars
}
/>
<
Switch
label=
"Points"
labelClass=
"width-5"
checked=
{
showPoints
}
onChange=
{
this
.
onTogglePoints
}
/>
</
div
>
<
div
className=
"section gf-form-group"
>
<
h5
className=
"section-heading"
>
Test Options
</
h5
>
<
Switch
label=
"Lines"
labelClass=
"width-5"
checked=
{
showLines
}
onChange=
{
this
.
onToggleLines
}
/>
<
Switch
label=
"Bars"
labelClass=
"width-5"
checked=
{
showBars
}
onChange=
{
this
.
onToggleBars
}
/>
<
Switch
label=
"Points"
labelClass=
"width-5"
checked=
{
showPoints
}
onChange=
{
this
.
onTogglePoints
}
/>
</
div
>
</
div
>
</
div
>
<
div
className=
"
form-option-box
"
>
<
div
className=
"
section gf-form-group
"
>
<
div
className=
"form-option-box__header"
>
Axes
</
div
>
<
h5
className=
"section-heading"
>
Test Options
</
h5
>
</
div
>
<
Switch
label=
"Lines"
labelClass=
"width-5"
checked=
{
showLines
}
onChange=
{
this
.
onToggleLines
}
/
>
<
div
className=
"form-option-box"
>
<
Switch
label=
"Bars"
labelClass=
"width-5"
checked=
{
showBars
}
onChange=
{
this
.
onToggleBars
}
/
>
<
div
className=
"form-option-box__header"
>
Thresholds
</
div
>
<
Switch
label=
"Points"
labelClass=
"width-5"
checked=
{
showPoints
}
onChange=
{
this
.
onTogglePoints
}
/
>
</
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