-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes index pattern wizard when there are remote clusters but no loca…
…l indices (#24339) (#25613) * don't hide wizard if clusters exist * catch errors * add toast notifs if unable to load data
- Loading branch information
Showing
13 changed files
with
402 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
283 changes: 178 additions & 105 deletions
283
...ate_index_pattern_wizard/__tests__/__snapshots__/create_index_pattern_wizard.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,205 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`CreateIndexPatternWizard defaults to the loading state 1`] = ` | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
<React.Fragment> | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<LoadingState /> | ||
</div> | ||
<EuiGlobalToastList | ||
dismissToast={[Function]} | ||
toastLifeTimeMs={6000} | ||
toasts={Array []} | ||
/> | ||
<LoadingState /> | ||
</div> | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`CreateIndexPatternWizard renders index pattern step when there are indices 1`] = ` | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<StepIndexPattern | ||
allIndices={ | ||
Array [ | ||
<React.Fragment> | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<StepIndexPattern | ||
allIndices={ | ||
Array [ | ||
Object { | ||
"name": "myIndexPattern", | ||
}, | ||
] | ||
} | ||
esService={Object {}} | ||
goToNextStep={[Function]} | ||
indexPatternCreationType={ | ||
Object { | ||
"name": "myIndexPattern", | ||
}, | ||
] | ||
} | ||
esService={Object {}} | ||
goToNextStep={[Function]} | ||
indexPatternCreationType={ | ||
Object { | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
} | ||
} | ||
} | ||
initialQuery="" | ||
isIncludingSystemIndices={false} | ||
savedObjectsClient={Object {}} | ||
initialQuery="" | ||
isIncludingSystemIndices={false} | ||
savedObjectsClient={Object {}} | ||
/> | ||
</div> | ||
<EuiGlobalToastList | ||
dismissToast={[Function]} | ||
toastLifeTimeMs={6000} | ||
toasts={Array []} | ||
/> | ||
</div> | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`CreateIndexPatternWizard renders the empty state when there are no indices 1`] = ` | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<EmptyState | ||
onRefresh={[Function]} | ||
<React.Fragment> | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<EmptyState | ||
onRefresh={[Function]} | ||
/> | ||
</div> | ||
<EuiGlobalToastList | ||
dismissToast={[Function]} | ||
toastLifeTimeMs={6000} | ||
toasts={Array []} | ||
/> | ||
</div> | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`CreateIndexPatternWizard renders time field step when step is set to 2 1`] = ` | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
<React.Fragment> | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<StepTimeField | ||
createIndexPattern={[Function]} | ||
goToPreviousStep={[Function]} | ||
indexPattern="" | ||
indexPatternCreationType={ | ||
Object { | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
} | ||
} | ||
indexPatternsService={Object {}} | ||
/> | ||
</div> | ||
<EuiGlobalToastList | ||
dismissToast={[Function]} | ||
toastLifeTimeMs={6000} | ||
toasts={Array []} | ||
/> | ||
<StepTimeField | ||
createIndexPattern={[Function]} | ||
goToPreviousStep={[Function]} | ||
indexPattern="" | ||
indexPatternCreationType={ | ||
Object { | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`CreateIndexPatternWizard renders when there are no indices but there are remote clusters 1`] = ` | ||
<React.Fragment> | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={false} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<StepIndexPattern | ||
allIndices={Array []} | ||
esService={Object {}} | ||
goToNextStep={[Function]} | ||
indexPatternCreationType={ | ||
Object { | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
} | ||
} | ||
} | ||
indexPatternsService={Object {}} | ||
initialQuery="" | ||
isIncludingSystemIndices={false} | ||
savedObjectsClient={Object {}} | ||
/> | ||
</div> | ||
<EuiGlobalToastList | ||
dismissToast={[Function]} | ||
toastLifeTimeMs={6000} | ||
toasts={Array []} | ||
/> | ||
</div> | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`CreateIndexPatternWizard shows system indices even if there are no other indices if the include system indices is toggled 1`] = ` | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={true} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<StepIndexPattern | ||
allIndices={ | ||
Array [ | ||
<React.Fragment> | ||
<div> | ||
<Header | ||
indexPatternName="name" | ||
isBeta={false} | ||
isIncludingSystemIndices={true} | ||
onChangeIncludingSystemIndices={[Function]} | ||
showSystemIndices={false} | ||
/> | ||
<StepIndexPattern | ||
allIndices={ | ||
Array [ | ||
Object { | ||
"name": ".kibana ", | ||
}, | ||
] | ||
} | ||
esService={Object {}} | ||
goToNextStep={[Function]} | ||
indexPatternCreationType={ | ||
Object { | ||
"name": ".kibana ", | ||
}, | ||
] | ||
} | ||
esService={Object {}} | ||
goToNextStep={[Function]} | ||
indexPatternCreationType={ | ||
Object { | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
"checkIndicesForErrors": [Function], | ||
"getIndexPatternMappings": [Function], | ||
"getIndexPatternName": [Function], | ||
"getIndexPatternType": [Function], | ||
"getIsBeta": [Function], | ||
"getShowSystemIndices": [Function], | ||
"renderPrompt": [Function], | ||
} | ||
} | ||
} | ||
initialQuery="" | ||
isIncludingSystemIndices={true} | ||
savedObjectsClient={Object {}} | ||
initialQuery="" | ||
isIncludingSystemIndices={true} | ||
savedObjectsClient={Object {}} | ||
/> | ||
</div> | ||
<EuiGlobalToastList | ||
dismissToast={[Function]} | ||
toastLifeTimeMs={6000} | ||
toasts={Array []} | ||
/> | ||
</div> | ||
</React.Fragment> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.