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 fd0d2a1
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 116 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 @@ -66,7 +66,7 @@ export const IndexPattern = ({
disabled,
model: _model,
allowLevelOfDetail,
allowSwitchUseKibanaIndexesMode,
allowIndexSwitchingMode,
}) => {
const config = getUISettings();
const timeFieldName = `${prefix}time_field`;
Expand Down Expand Up @@ -183,7 +183,7 @@ export const IndexPattern = ({
onChange={onChange}
defaultIndexPattern={model.default_index_pattern}
disabled={disabled}
allowSwitchUseKibanaIndexesMode={allowSwitchUseKibanaIndexesMode}
allowIndexSwitchingMode={allowIndexSwitchingMode}
/>
</EuiFormRow>
</EuiFlexItem>
Expand Down Expand Up @@ -334,5 +334,5 @@ IndexPattern.propTypes = {
disabled: PropTypes.bool,
className: PropTypes.string,
allowLevelOfDetail: PropTypes.bool,
allowSwitchUseKibanaIndexesMode: PropTypes.bool,
allowIndexSwitchingMode: PropTypes.bool,
};
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 @@ -19,7 +19,7 @@ export const FieldTextSelect = ({
value,
placeholder,
onModeChange,
allowSwitchUseKibanaIndexesMode,
allowSwitchMode,
'data-test-subj': dataTestSubj,
}: SelectIndexComponentProps) => {
const textualValue = convertIndexPatternObjectToStringRepresentation(value);
Expand All @@ -38,7 +38,7 @@ export const FieldTextSelect = ({
value={textualValue}
placeholder={placeholder}
data-test-subj={dataTestSubj}
{...(allowSwitchUseKibanaIndexesMode && {
{...(allowSwitchMode && {
append: (
<SwitchModePopover onModeChange={onModeChange} value={value} useKibanaIndices={false} />
),
Expand Down
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;
allowIndexSwitchingMode?: boolean;
}

export const IndexPatternSelect = ({
Expand All @@ -30,7 +30,7 @@ export const IndexPatternSelect = ({
onChange,
disabled,
defaultIndexPattern,
allowSwitchUseKibanaIndexesMode,
allowIndexSwitchingMode,
}: 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={allowIndexSwitchingMode}
/>
);
};

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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class GaugePanelConfigUi extends Component {
fields={this.props.fields}
model={this.props.model}
onChange={this.props.onChange}
allowSwitchUseKibanaIndexesMode={true}
allowIndexSwitchingMode={true}
/>

<EuiHorizontalRule />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class MarkdownPanelConfigUi extends Component {
fields={this.props.fields}
model={this.props.model}
onChange={this.props.onChange}
allowSwitchUseKibanaIndexesMode={true}
allowIndexSwitchingMode={true}
/>

<EuiHorizontalRule />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class MetricPanelConfig extends Component {
fields={this.props.fields}
model={this.props.model}
onChange={this.props.onChange}
allowSwitchUseKibanaIndexesMode={true}
allowIndexSwitchingMode={true}
/>

<EuiHorizontalRule />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class TablePanelConfig extends Component {
fields={this.props.fields}
model={this.props.model}
onChange={this.props.onChange}
allowSwitchUseKibanaIndexesMode={true}
allowIndexSwitchingMode={true}
/>

<EuiHorizontalRule />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class TimeseriesPanelConfigUi extends Component {
model={this.props.model}
onChange={this.props.onChange}
allowLevelOfDetail={true}
allowSwitchUseKibanaIndexesMode={true}
allowIndexSwitchingMode={true}
/>
<EuiHorizontalRule />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class TopNPanelConfig extends Component {
fields={this.props.fields}
model={this.props.model}
onChange={this.props.onChange}
allowSwitchUseKibanaIndexesMode={true}
allowIndexSwitchingMode={true}
/>

<EuiHorizontalRule />
Expand Down

0 comments on commit fd0d2a1

Please sign in to comment.