Skip to content

Commit

Permalink
[Security Solution][DQD][Tech Debt] Refactor lower level helpers (#19…
Browse files Browse the repository at this point in the history
…1245)

addresses #190964

Fourth in the series of PRs to address general DQD tech debt

This one builds on previous 3 PRs

#190970
#190978
#191233

Gist of changes:

split lower level helpers into series of utils/* files
each utils/ file is named after common behavior it export or works with.
cleanup dead code
  • Loading branch information
kapral18 authored Aug 28, 2024
1 parent 094f4a3 commit 7f22ca5
Show file tree
Hide file tree
Showing 89 changed files with 3,135 additions and 2,898 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { EcsFlat } from '@elastic/ecs';
import { EuiComboBoxOptionOption } from '@elastic/eui';

import { EcsFieldMetadata } from './types';
import { EcsFieldMetadata, PartitionedFieldMetadata, SortConfig } from './types';
import * as i18n from './translations';

export const EcsFlatTyped = EcsFlat as unknown as Record<string, EcsFieldMetadata>;
Expand Down Expand Up @@ -42,3 +42,18 @@ export const ilmPhaseOptionsStatic: EuiComboBoxOptionOption[] = [
export const EMPTY_STAT = '--';

export const INTERNAL_API_VERSION = '1';

export const defaultSort: SortConfig = {
sort: {
direction: 'desc',
field: 'docsCount',
},
};

export const EMPTY_METADATA: PartitionedFieldMetadata = {
all: [],
ecsCompliant: [],
custom: [],
incompatible: [],
sameFamily: [],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export const MIN_PAGE_SIZE = 10;
Loading

0 comments on commit 7f22ca5

Please sign in to comment.