Skip to content

Commit

Permalink
re-using filter from series rate
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Mar 10, 2020
1 parent 7cf0876 commit 231592e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
* under the License.
*/

const filter = metric => metric.type === 'rate';
import { getBucketSize } from '../../helpers/get_bucket_size';
import { getIntervalAndTimefield } from '../../get_interval_and_timefield';
import { bucketTransform } from '../../helpers/bucket_transform';
import { set } from 'lodash';

export const filter = metric => metric.type === 'rate';

export const createRate = (doc, intervalString, aggRoot) => metric => {
const maxFn = bucketTransform.max;
const derivativeFn = bucketTransform.derivative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
* under the License.
*/

const filter = metric => metric.type === 'rate';
import { getBucketSize } from '../../helpers/get_bucket_size';
import { getIntervalAndTimefield } from '../../get_interval_and_timefield';
import { calculateAggRoot } from './calculate_agg_root';
import { createRate } from '../series/rate';
import { createRate, filter } from '../series/rate';

export function rate(req, panel, esQueryConfig, indexPatternObject) {
return next => doc => {
Expand Down

0 comments on commit 231592e

Please sign in to comment.