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
68ed4d45
Commit
68ed4d45
authored
Sep 29, 2017
by
coral
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change pdiff to percent_diff for conditions
parent
9e48d544
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
pkg/services/alerting/conditions/reducer.go
+1
-1
pkg/services/alerting/conditions/reducer_test.go
+2
-2
public/app/features/alerting/alert_def.ts
+1
-1
No files found.
pkg/services/alerting/conditions/reducer.go
View file @
68ed4d45
...
...
@@ -117,7 +117,7 @@ func (s *SimpleReducer) Reduce(series *tsdb.TimeSeries) null.Float {
break
}
}
case
"pdiff"
:
case
"p
ercent_
diff"
:
var
(
points
=
series
.
Points
first
float64
...
...
pkg/services/alerting/conditions/reducer_test.go
View file @
68ed4d45
...
...
@@ -86,8 +86,8 @@ func TestSimpleReducer(t *testing.T) {
So
(
result
,
ShouldEqual
,
float64
(
10
))
})
Convey
(
"pdiff"
,
func
()
{
result
:=
testReducer
(
"pdiff"
,
30
,
40
)
Convey
(
"p
ercent_
diff"
,
func
()
{
result
:=
testReducer
(
"p
ercent_
diff"
,
30
,
40
)
So
(
result
,
ShouldEqual
,
float64
(
33.33333333333333
))
})
...
...
public/app/features/alerting/alert_def.ts
View file @
68ed4d45
...
...
@@ -50,7 +50,7 @@ var reducerTypes = [
{
text
:
'last()'
,
value
:
'last'
},
{
text
:
'median()'
,
value
:
'median'
},
{
text
:
'diff()'
,
value
:
'diff'
},
{
text
:
'p
diff()'
,
value
:
'p
diff'
},
{
text
:
'p
ercent_diff()'
,
value
:
'percent_
diff'
},
];
var
noDataModes
=
[
...
...
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