Skip to content

Commit

Permalink
remove callouts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Mar 3, 2021
1 parent 47fc806 commit 439998f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ export class CreateIndexPatternWizard extends Component<
context.services.setBreadcrumbs(getCreateBreadcrumbs());

const type = new URLSearchParams(props.location.search).get('type') || undefined;
const indexPattern = new URLSearchParams(props.location.search).get('name') || '';

this.state = {
step: 1,
indexPattern,
indexPattern: '',
allIndices: [],
remoteClustersExist: false,
isInitiallyLoadingIndices: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const ComboBoxSelect = ({
disabled,
value,
placeholder,
allowSwitchUseKibanaIndexesMode,
allowSwitchMode,
'data-test-subj': dataTestSubj,
}: SelectIndexComponentProps) => {
const [availableIndexes, setAvailableIndexes] = useState<IdsWithTitle>([]);
Expand Down Expand Up @@ -75,7 +75,7 @@ export const ComboBoxSelect = ({
isDisabled={disabled}
placeholder={placeholder}
data-test-subj={dataTestSubj}
{...(allowSwitchUseKibanaIndexesMode && {
{...(allowSwitchMode && {
append: (
<SwitchModePopover onModeChange={onModeChange} value={value} useKibanaIndices={true} />
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import React, { useCallback } from 'react';
import { EuiFieldText, EuiFieldTextProps } from '@elastic/eui';
import { EuiFieldText, EuiFieldTextProps, EuiTourStep, EuiText } from '@elastic/eui';
import { SwitchModePopover } from './switch_mode_popover';
import { convertIndexPatternObjectToStringRepresentation } from '../../../../../common/index_patterns_utils';

Expand All @@ -19,7 +19,7 @@ export const FieldTextSelect = ({
value,
placeholder,
onModeChange,
allowSwitchUseKibanaIndexesMode,
allowSwitchMode,
'data-test-subj': dataTestSubj,
}: SelectIndexComponentProps) => {
const textualValue = convertIndexPatternObjectToStringRepresentation(value);
Expand All @@ -32,17 +32,33 @@ export const FieldTextSelect = ({
);

return (
<EuiFieldText
disabled={disabled}
onChange={onFieldTextChange}
value={textualValue}
placeholder={placeholder}
data-test-subj={dataTestSubj}
{...(allowSwitchUseKibanaIndexesMode && {
append: (
<SwitchModePopover onModeChange={onModeChange} value={value} useKibanaIndices={false} />
),
})}
/>
<EuiTourStep
content={
<EuiText>
<p>The tour step content.</p>
</EuiText>
}
isStepOpen={false}
minWidth={300}
onFinish={() => true}
step={1}
stepsTotal={1}
title="Title of the current step"
subtitle="Title of the full tour"
anchorPosition="rightUp"
>
<EuiFieldText
disabled={disabled}
onChange={onFieldTextChange}
value={textualValue}
placeholder={placeholder}
data-test-subj={dataTestSubj}
{...(allowSwitchMode && {
append: (
<SwitchModePopover onModeChange={onModeChange} value={value} useKibanaIndices={false} />
),
})}
/>
</EuiTourStep>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface IndexPatternSelectProps {
defaultIndexPattern: string;
onChange: Function;
disabled?: boolean;
allowSwitchUseKibanaIndexesMode?: boolean;
allowSwitchMode?: boolean;
}

export const IndexPatternSelect = ({
Expand All @@ -30,7 +30,7 @@ export const IndexPatternSelect = ({
onChange,
disabled,
defaultIndexPattern,
allowSwitchUseKibanaIndexesMode,
allowSwitchMode,
}: IndexPatternSelectProps) => {
const panelModel = useContext(PanelModelContext);
const useKibanaIndices = Boolean(panelModel?.[USE_KIBANA_INDEXES_KEY]);
Expand Down Expand Up @@ -67,7 +67,7 @@ export const IndexPatternSelect = ({
placeholder={defaultIndexPattern}
onIndexChange={setInputValue}
onModeChange={onModeChange}
allowSwitchUseKibanaIndexesMode={allowSwitchUseKibanaIndexesMode}
allowSwitchMode={allowSwitchMode}
/>
);
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { i18n } from '@kbn/i18n';
import { Assign } from '@kbn/utility-types';
import { FormattedMessage } from '@kbn/i18n/react';
import { SelectIndexComponentProps } from './types';
import { MigrationCallout } from './migration_callout';
import { isStringTypeIndexPattern } from '../../../../../common/index_patterns_utils';
import { IndexPatternObject } from '../../../../../common/types';
import { getDataStart } from '../../../../services';
Expand Down Expand Up @@ -99,7 +98,6 @@ export const SwitchModePopover = ({
</EuiText>
<EuiSpacer />
<EuiSwitch
name="switch"
checked={useKibanaIndices}
label={i18n.translate(
'visTypeTimeseries.indexPatternSelect.switchModePopover.useKibanaIndices',
Expand All @@ -110,9 +108,6 @@ export const SwitchModePopover = ({
onChange={switchMode}
data-test-subj="switchIndexPatternSelectionMode"
/>
{value && isStringTypeIndexPattern(value) && (
<MigrationCallout value={value} switchMode={switchMode} matchedIndex={matchedIndex} />
)}
</div>
</EuiPopover>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export interface SelectIndexComponentProps {
'data-test-subj': string;
placeholder?: string;
disabled?: boolean;
allowSwitchUseKibanaIndexesMode?: boolean;
allowSwitchMode?: boolean;
}

0 comments on commit 439998f

Please sign in to comment.