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
e0064ed3
Commit
e0064ed3
authored
Nov 19, 2018
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "typo fix"
This reverts commit
9ded648b
.
parent
9ded648b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
public/app/plugins/panel/gauge/module.tsx
+5
-5
public/app/viz/Gauge.tsx
+4
-4
No files found.
public/app/plugins/panel/gauge/module.tsx
View file @
e0064ed3
...
@@ -10,7 +10,7 @@ export interface Options {
...
@@ -10,7 +10,7 @@ export interface Options {
decimals
:
number
;
decimals
:
number
;
prefix
:
string
;
prefix
:
string
;
stat
:
string
;
stat
:
string
;
sufix
:
string
;
suf
f
ix
:
string
;
unit
:
string
;
unit
:
string
;
}
}
...
@@ -56,10 +56,10 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
...
@@ -56,10 +56,10 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
onPrefixChange
=
event
=>
this
.
props
.
onChange
({
...
this
.
props
.
options
,
prefix
:
event
.
target
.
value
});
onPrefixChange
=
event
=>
this
.
props
.
onChange
({
...
this
.
props
.
options
,
prefix
:
event
.
target
.
value
});
onSuf
ixChange
=
event
=>
this
.
props
.
onChange
({
...
this
.
props
.
options
,
su
fix
:
event
.
target
.
value
});
onSuf
fixChange
=
event
=>
this
.
props
.
onChange
({
...
this
.
props
.
options
,
suf
fix
:
event
.
target
.
value
});
render
()
{
render
()
{
const
{
stat
,
unit
,
decimals
,
prefix
,
sufix
}
=
this
.
props
.
options
;
const
{
stat
,
unit
,
decimals
,
prefix
,
suf
f
ix
}
=
this
.
props
.
options
;
return
(
return
(
<
div
>
<
div
>
<
div
className=
"section gf-form-group"
>
<
div
className=
"section gf-form-group"
>
...
@@ -94,8 +94,8 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
...
@@ -94,8 +94,8 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
<
input
className=
"gf-form-input width-12"
type=
"text"
value=
{
prefix
||
''
}
onChange=
{
this
.
onPrefixChange
}
/>
<
input
className=
"gf-form-input width-12"
type=
"text"
value=
{
prefix
||
''
}
onChange=
{
this
.
onPrefixChange
}
/>
</
div
>
</
div
>
<
div
className=
"gf-form-inline"
>
<
div
className=
"gf-form-inline"
>
<
Label
width=
{
5
}
>
Sufix
</
Label
>
<
Label
width=
{
5
}
>
Suf
f
ix
</
Label
>
<
input
className=
"gf-form-input width-12"
type=
"text"
value=
{
suf
ix
||
''
}
onChange=
{
this
.
onSu
fixChange
}
/>
<
input
className=
"gf-form-input width-12"
type=
"text"
value=
{
suf
fix
||
''
}
onChange=
{
this
.
onSuf
fixChange
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
public/app/viz/Gauge.tsx
View file @
e0064ed3
...
@@ -17,7 +17,7 @@ interface Props {
...
@@ -17,7 +17,7 @@ interface Props {
height
:
number
;
height
:
number
;
stat
?:
string
;
stat
?:
string
;
prefix
:
string
;
prefix
:
string
;
sufix
:
string
;
suf
f
ix
:
string
;
}
}
const
colors
=
[
'rgba(50, 172, 45, 0.97)'
,
'rgba(237, 129, 40, 0.89)'
,
'rgba(245, 54, 54, 0.9)'
];
const
colors
=
[
'rgba(50, 172, 45, 0.97)'
,
'rgba(237, 129, 40, 0.89)'
,
'rgba(245, 54, 54, 0.9)'
];
...
@@ -32,7 +32,7 @@ export class Gauge extends PureComponent<Props> {
...
@@ -32,7 +32,7 @@ export class Gauge extends PureComponent<Props> {
prefix
:
''
,
prefix
:
''
,
showThresholdMarkers
:
true
,
showThresholdMarkers
:
true
,
showThresholdLables
:
false
,
showThresholdLables
:
false
,
sufix
:
''
,
suf
f
ix
:
''
,
thresholds
:
[
0
,
100
],
thresholds
:
[
0
,
100
],
};
};
...
@@ -45,10 +45,10 @@ export class Gauge extends PureComponent<Props> {
...
@@ -45,10 +45,10 @@ export class Gauge extends PureComponent<Props> {
}
}
formatValue
(
value
)
{
formatValue
(
value
)
{
const
{
decimals
,
prefix
,
sufix
,
unit
}
=
this
.
props
;
const
{
decimals
,
prefix
,
suf
f
ix
,
unit
}
=
this
.
props
;
const
formatFunc
=
kbn
.
valueFormats
[
unit
];
const
formatFunc
=
kbn
.
valueFormats
[
unit
];
return
`
${
prefix
}
${
formatFunc
(
value
,
decimals
)}
${
sufix
}
`
;
return
`
${
prefix
}
${
formatFunc
(
value
,
decimals
)}
${
suf
f
ix
}
`
;
}
}
draw
()
{
draw
()
{
...
...
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