Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
gbamparop committed Jan 9, 2025
1 parent dfc2ad0 commit 1072277
Show file tree
Hide file tree
Showing 37 changed files with 5 additions and 2,128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
* Exporting versioned APIs types
*/
export * from './latest';
export * as logEntriesV1 from './log_entries/v1';
export * as logViewsV1 from './log_views/v1';
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
* 2.0.
*/

export * from './log_entries/v1';
export * from './log_views/v1';

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions x-pack/platform/plugins/shared/logs_shared/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ export * from './log_entry';

export { convertISODateToNanoPrecision } from './utils';

// Http types
export type { LogEntriesSummaryBucket, LogEntriesSummaryHighlightsBucket } from './http_api';

// Http runtime
export {
LOG_ENTRIES_HIGHLIGHTS_PATH,
LOG_ENTRIES_SUMMARY_PATH,
logEntriesHighlightsRequestRT,
logEntriesHighlightsResponseRT,
logEntriesSummaryRequestRT,
logEntriesSummaryResponseRT,
} from './http_api';

// Locators
export {
type LogsLocatorParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import type { TimeKey } from '@kbn/io-ts-utils';
import { ascending, bisector } from 'd3-array';
import { ascending } from 'd3-array';

export type Comparator = (firstValue: any, secondValue: any) => number;

Expand Down Expand Up @@ -38,25 +38,3 @@ export const compareToTimeKey =
<Value>(keyAccessor: (value: Value) => TimeKey, compareValues?: Comparator) =>
(value: Value, key: TimeKey) =>
compareTimeKeys(keyAccessor(value), key, compareValues);

export const getIndexAtTimeKey = <Value>(
keyAccessor: (value: Value) => TimeKey,
compareValues?: Comparator
) => {
const comparator = compareToTimeKey(keyAccessor, compareValues);
const collectionBisector = bisector(comparator);

return (collection: Value[], key: TimeKey): number | null => {
const index = collectionBisector.left(collection, key);

if (index >= collection.length) {
return null;
}

if (comparator(collection[index], key) !== 0) {
return null;
}

return index;
};
};

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1072277

Please sign in to comment.