Skip to content

Commit

Permalink
add spacer to form layout, move types to type file
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Aug 4, 2021
1 parent f77447d commit 446755f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import {
INDEX_PATTERN_TYPE,
IndexPatternConfig,
MatchedIndicesSet,
FormInternal,
TimestampOption,
} from '../types';

import {
Expand All @@ -55,14 +57,6 @@ export interface Props {
defaultTypeIsRollup?: boolean;
requireTimestampField?: boolean;
}
export interface TimestampOption {
display: string;
fieldName?: string;
}

export interface FormInternal extends Omit<IndexPatternConfig, 'timestampField'> {
timestampField?: TimestampOption;
}

const editorTitle = i18n.translate('indexPatternEditor.title', {
defaultMessage: 'Create index pattern',
Expand Down Expand Up @@ -295,6 +289,7 @@ const IndexPatternEditorFlyoutContentComponent = ({

const indexPatternTypeSelect = showIndexPatternTypeSelect() ? (
<>
<EuiSpacer size="m" />
<EuiFlexGroup>
<EuiFlexItem>
<TypeField onChange={onTypeChange} />
Expand Down
9 changes: 9 additions & 0 deletions src/plugins/index_pattern_editor/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ export interface IndexPatternConfig {
type: INDEX_PATTERN_TYPE;
}

export interface FormInternal extends Omit<IndexPatternConfig, 'timestampField'> {
timestampField?: TimestampOption;
}

export interface TimestampOption {
display: string;
fieldName?: string;
}

export interface MatchedIndicesSet {
allIndices: MatchedItem[];
exactMatchedIndices: MatchedItem[];
Expand Down

0 comments on commit 446755f

Please sign in to comment.