mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Re-enable the indexPattern:placeholder setting. Change its value to be an empty string. (#20685)
This commit is contained in:
parent
34a44289aa
commit
aab75aea10
4 changed files with 20 additions and 3 deletions
|
@ -22,6 +22,12 @@ const unmountComponentAtNode = jest.fn();
|
|||
|
||||
jest.doMock('react-dom', () => ({ render, unmountComponentAtNode }));
|
||||
|
||||
jest.mock('ui/chrome', () => ({
|
||||
getUiSettingsClient: () => ({
|
||||
get: () => '',
|
||||
}),
|
||||
}));
|
||||
|
||||
const { renderCreateIndexPatternWizard, destroyCreateIndexPatternWizard } = require('../render');
|
||||
|
||||
describe('CreateIndexPatternWizardRender', () => {
|
||||
|
|
|
@ -24,6 +24,13 @@ import { StepIndexPattern } from '../step_index_pattern';
|
|||
jest.mock('../../../lib/ensure_minimum_time', () => ({
|
||||
ensureMinimumTime: async (promises) => Array.isArray(promises) ? await Promise.all(promises) : await promises
|
||||
}));
|
||||
|
||||
jest.mock('ui/chrome', () => ({
|
||||
getUiSettingsClient: () => ({
|
||||
get: () => '',
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('../../../lib/get_indices', () => ({
|
||||
getIndices: (service, query) => {
|
||||
if (query.startsWith('e')) {
|
||||
|
|
|
@ -38,6 +38,10 @@ import {
|
|||
EuiCallOut,
|
||||
} from '@elastic/eui';
|
||||
|
||||
import chrome from 'ui/chrome';
|
||||
|
||||
const uiSettings = chrome.getUiSettingsClient();
|
||||
|
||||
export class StepIndexPattern extends Component {
|
||||
static propTypes = {
|
||||
allIndices: PropTypes.array.isRequired,
|
||||
|
@ -49,7 +53,7 @@ export class StepIndexPattern extends Component {
|
|||
}
|
||||
|
||||
static defaultProps = {
|
||||
initialQuery: '',
|
||||
initialQuery: uiSettings.get('indexPattern:placeholder'),
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
|
|
|
@ -487,8 +487,8 @@ export function getUiSettingDefaults() {
|
|||
},
|
||||
'indexPattern:placeholder': {
|
||||
name: 'Index pattern placeholder',
|
||||
value: 'logstash-*',
|
||||
description: `The placeholder for the field "Index name or pattern" in the "Settings > Indices" tab.`,
|
||||
value: '',
|
||||
description: `The placeholder for the "Index pattern name" field in "Management > Index Patterns > Create Index Pattern".`,
|
||||
},
|
||||
'context:defaultSize': {
|
||||
name: 'Context size',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue