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
afdc19ce
Commit
afdc19ce
authored
Sep 03, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated sumSeries, averageSeries to support other series reference arguments, #117
parent
4a9380cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
src/app/services/graphite/gfunc.js
+16
-11
No files found.
src/app/services/graphite/gfunc.js
View file @
afdc19ce
...
...
@@ -24,6 +24,15 @@ function (_) {
index
[
funcDef
.
shortName
||
funcDef
.
name
]
=
funcDef
;
}
var
optionalSeriesRefArgs
=
[
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
}
];
addFuncDef
({
name
:
'scaleToSeconds'
,
category
:
categories
.
Transform
,
...
...
@@ -59,22 +68,14 @@ function (_) {
addFuncDef
({
name
:
'diffSeries'
,
params
:
[
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
}
],
defaultParams
:
[
'$B'
],
params
:
optionalSeriesRefArgs
,
defaultParams
:
[
'#B'
],
category
:
categories
.
Calculate
,
});
addFuncDef
({
name
:
'asPercent'
,
params
:
[
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
},
{
name
:
'other'
,
type
:
'value_or_series'
,
optional
:
true
}
],
params
:
optionalSeriesRefArgs
,
defaultParams
:
[
'#A'
],
category
:
categories
.
Calculate
,
});
...
...
@@ -83,12 +84,16 @@ function (_) {
name
:
'sumSeries'
,
shortName
:
'sum'
,
category
:
categories
.
Combine
,
params
:
optionalSeriesRefArgs
,
defaultParams
:
[
''
],
});
addFuncDef
({
name
:
'averageSeries'
,
shortName
:
'avg'
,
category
:
categories
.
Combine
,
params
:
optionalSeriesRefArgs
,
defaultParams
:
[
''
],
});
addFuncDef
({
...
...
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