RangeUtils: migrate logic from kbn to grafana/data (#27347)

This commit is contained in:
Ryan McKinley
2020-09-02 23:54:06 -07:00
committed by GitHub
parent 6c5a0421fe
commit febbc60e8b
21 changed files with 322 additions and 229 deletions

View File

@@ -22,9 +22,9 @@ import {
toUtc,
urlUtil,
ExploreUrlState,
rangeUtil,
} from '@grafana/data';
import store from 'app/core/store';
import kbn from 'app/core/utils/kbn';
import { v4 as uuidv4 } from 'uuid';
import { getNextRefIdChar } from './query';
// Types
@@ -488,7 +488,7 @@ export function getIntervals(range: TimeRange, lowLimit?: string, resolution?: n
return { interval: '1s', intervalMs: 1000 };
}
return kbn.calculateInterval(range, resolution, lowLimit);
return rangeUtil.calculateInterval(range, resolution, lowLimit);
}
export function deduplicateLogRowsById(rows: LogRowModel[]) {