mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements (#18544)
* Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements - Introduces dynamic imports for built-in plugins - Uses dynamic imports for various packages (rst2html, brace) - Introduces route-based dynamic imports - Splits angular and moment into separate bundles
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import difference from 'lodash/difference';
|
||||
|
||||
import { fieldReducers, ReducerID, reduceField } from './fieldReducer';
|
||||
|
||||
import _ from 'lodash';
|
||||
import { Field, FieldType } from '../types/index';
|
||||
import { MutableDataFrame } from './dataFrameHelper';
|
||||
import { ArrayVector } from './vector';
|
||||
@@ -42,7 +43,7 @@ describe('Stats Calculators', () => {
|
||||
expect(stats.length).toBe(2);
|
||||
|
||||
const found = stats.map(v => v.id);
|
||||
const notFound = _.difference(names, found);
|
||||
const notFound = difference(names, found);
|
||||
expect(notFound.length).toBe(2);
|
||||
|
||||
expect(notFound[0]).toBe('not a stat');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
import _ from 'lodash';
|
||||
import each from 'lodash/each';
|
||||
import groupBy from 'lodash/groupBy';
|
||||
|
||||
import { RawTimeRange } from '../types/time';
|
||||
|
||||
@@ -64,12 +64,12 @@ const rangeOptions = [
|
||||
const absoluteFormat = 'YYYY-MM-DD HH:mm:ss';
|
||||
|
||||
const rangeIndex: any = {};
|
||||
_.each(rangeOptions, (frame: any) => {
|
||||
each(rangeOptions, (frame: any) => {
|
||||
rangeIndex[frame.from + ' to ' + frame.to] = frame;
|
||||
});
|
||||
|
||||
export function getRelativeTimesList(timepickerSettings: any, currentDisplay: any) {
|
||||
const groups = _.groupBy(rangeOptions, (option: any) => {
|
||||
const groups = groupBy(rangeOptions, (option: any) => {
|
||||
option.active = option.display === currentDisplay;
|
||||
return option.section;
|
||||
});
|
||||
|
Reference in New Issue
Block a user