Skip to content

Commit

Permalink
refactor: index properties + index check fields helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
kapral18 committed Aug 26, 2024
1 parent 4504e00 commit 061171c
Show file tree
Hide file tree
Showing 16 changed files with 345 additions and 395 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, SortConfig } 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 @@ -49,3 +49,11 @@ export const defaultSort: SortConfig = {
field: 'docsCount',
},
};

export const EMPTY_METADATA: PartitionedFieldMetadata = {
all: [],
ecsCompliant: [],
custom: [],
incompatible: [],
sameFamily: [],
};

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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 ALL_TAB_ID = 'allTab';
export const ECS_COMPLIANT_TAB_ID = 'ecsCompliantTab';
export const CUSTOM_TAB_ID = 'customTab';
export const INCOMPATIBLE_TAB_ID = 'incompatibleTab';
export const SAME_FAMILY_TAB_ID = 'sameFamilyTab';
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import React, { useMemo, useState } from 'react';
import { EuiButtonGroup, EuiFlexGroup, EuiSpacer } from '@elastic/eui';
import styled from 'styled-components';

import { EMPTY_METADATA } from '../../../../../../constants';
import { useDataQualityContext } from '../../../../../../data_quality_context';
import { useIndicesCheckContext } from '../../../../../../contexts/indices_check_context';
import { EMPTY_METADATA, INCOMPATIBLE_TAB_ID } from '../helpers';
import { INCOMPATIBLE_TAB_ID } from './constants';
import { IlmPhase, PatternRollup } from '../../../../../../types';
import { getTabs } from './tabs/helpers';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ECS_COMPLIANT_TAB_ID,
INCOMPATIBLE_TAB_ID,
SAME_FAMILY_TAB_ID,
} from '../../helpers';
} from '../constants';
import { getMarkdownComment } from '../../markdown/helpers';
import * as i18n from '../../translations';
import { SameFamilyTab } from './same_family_tab';
Expand Down
Loading

0 comments on commit 061171c

Please sign in to comment.