-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TSVB] Add support for Math Aggregation to tables (#14553)
* Add support for Math Aggregation to tables * Removing the range reduction for dropping the last bucket
- Loading branch information
1 parent
79fdf95
commit e765e3b
Showing
5 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/core_plugins/metrics/server/lib/vis_data/response_processors/table/drop_last_bucket.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { dropLastBucket } from '../series/drop_last_bucket'; | ||
|
||
export function dropLastBucketFn(bucket, panel, series) { | ||
return next => results => { | ||
const fn = dropLastBucket({ aggregations: bucket }, panel, series); | ||
return fn(next)(results); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/core_plugins/metrics/server/lib/vis_data/response_processors/table/math.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { mathAgg } from '../series/math'; | ||
|
||
export function math(bucket, panel, series) { | ||
return next => results => { | ||
const mathFn = mathAgg({ aggregations: bucket }, panel, series); | ||
return mathFn(next)(results); | ||
}; | ||
} |