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
ef3c9139
Commit
ef3c9139
authored
Nov 29, 2018
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
min and max value
parent
60ec00ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
public/app/plugins/panel/gauge/module.tsx
+0
-2
public/app/viz/Gauge.tsx
+6
-16
No files found.
public/app/plugins/panel/gauge/module.tsx
View file @
ef3c9139
...
@@ -15,8 +15,6 @@ export interface OptionsProps {
...
@@ -15,8 +15,6 @@ export interface OptionsProps {
suffix
:
string
;
suffix
:
string
;
unit
:
string
;
unit
:
string
;
thresholds
:
Threshold
[];
thresholds
:
Threshold
[];
minValue
:
number
;
maxValue
:
number
;
}
}
export
const
defaultProps
=
{
export
const
defaultProps
=
{
...
...
public/app/viz/Gauge.tsx
View file @
ef3c9139
...
@@ -7,8 +7,6 @@ import kbn from '../core/utils/kbn';
...
@@ -7,8 +7,6 @@ import kbn from '../core/utils/kbn';
interface
Props
{
interface
Props
{
decimals
:
number
;
decimals
:
number
;
timeSeries
:
TimeSeriesVMs
;
timeSeries
:
TimeSeriesVMs
;
minValue
:
number
;
maxValue
:
number
;
showThresholdMarkers
:
boolean
;
showThresholdMarkers
:
boolean
;
thresholds
:
Threshold
[];
thresholds
:
Threshold
[];
showThresholdLabels
:
boolean
;
showThresholdLabels
:
boolean
;
...
@@ -40,7 +38,7 @@ export class Gauge extends PureComponent<Props> {
...
@@ -40,7 +38,7 @@ export class Gauge extends PureComponent<Props> {
this
.
draw
();
this
.
draw
();
}
}
componentDidUpdate
(
prevProps
:
Props
)
{
componentDidUpdate
()
{
this
.
draw
();
this
.
draw
();
}
}
...
@@ -52,17 +50,9 @@ export class Gauge extends PureComponent<Props> {
...
@@ -52,17 +50,9 @@ export class Gauge extends PureComponent<Props> {
}
}
draw
()
{
draw
()
{
const
{
const
{
timeSeries
,
showThresholdLabels
,
showThresholdMarkers
,
thresholds
,
width
,
height
,
stat
}
=
this
.
props
;
timeSeries
,
maxValue
,
console
.
log
(
thresholds
);
minValue
,
showThresholdLabels
,
showThresholdMarkers
,
thresholds
,
width
,
height
,
stat
,
}
=
this
.
props
;
const
dimension
=
Math
.
min
(
width
,
height
*
1.3
);
const
dimension
=
Math
.
min
(
width
,
height
*
1.3
);
const
backgroundColor
=
config
.
bootData
.
user
.
lightTheme
?
'rgb(230,230,230)'
:
'rgb(38,38,38)'
;
const
backgroundColor
=
config
.
bootData
.
user
.
lightTheme
?
'rgb(230,230,230)'
:
'rgb(38,38,38)'
;
...
@@ -85,8 +75,8 @@ export class Gauge extends PureComponent<Props> {
...
@@ -85,8 +75,8 @@ export class Gauge extends PureComponent<Props> {
series
:
{
series
:
{
gauges
:
{
gauges
:
{
gauge
:
{
gauge
:
{
min
:
minV
alue
,
min
:
thresholds
[
0
].
v
alue
,
max
:
maxV
alue
,
max
:
thresholds
[
thresholds
.
length
-
1
].
v
alue
,
background
:
{
color
:
backgroundColor
},
background
:
{
color
:
backgroundColor
},
border
:
{
color
:
null
},
border
:
{
color
:
null
},
shadow
:
{
show
:
false
},
shadow
:
{
show
:
false
},
...
...
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