Skip to content

Commit

Permalink
chore: remove memoize
Browse files Browse the repository at this point in the history
  • Loading branch information
gtk-grafana committed Sep 4, 2024
1 parent aa04db0 commit d0f6780
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/services/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
import { setLevelColorOverrides } from './panel';
import { map, Observable } from 'rxjs';
import { SortBy, SortByScene } from '../Components/ServiceScene/Breakdowns/SortByScene';
import { memoize } from 'lodash';
import { getDetectedFieldsFrame } from '../Components/ServiceScene/ServiceScene';
import { averageFields } from '../Components/ServiceScene/Breakdowns/FieldsBreakdownScene';

Expand All @@ -45,15 +44,15 @@ export type DetectedFieldsResponse = {
fields: DetectedField[];
};

const getReducerId = memoize((sortBy: SortBy) => {
const getReducerId = (sortBy: SortBy) => {
if (sortBy) {
const values: string[] = Object.values(ReducerID);
if (values.includes(sortBy)) {
return sortBy;
}
}
return undefined;
});
};

// Empty string is structured metdata
export type ExtractedFieldsType = 'logfmt' | 'json' | 'mixed' | '';
Expand Down

0 comments on commit d0f6780

Please sign in to comment.