Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => {

const id = await newIndexPattern.create();

await mlContext.indexPatterns.clearCache();

// id returns false if there's a duplicate index pattern.
if (id === false) {
addRequestMessage({
Expand Down Expand Up @@ -248,6 +250,7 @@ export const useCreateAnalyticsForm = (): CreateAnalyticsFormProps => {
};

const openModal = async () => {
await mlContext.indexPatterns.clearCache();
resetForm();
await prepareFormValidation();
dispatch({ type: ACTION.OPEN_MODAL });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ async function createKibanaIndexPattern(

const id = await emptyPattern.create();

await indexPatterns.clearCache();

// check if there's a default index pattern, if not,
// set the newly created one as the default index pattern.
if (!kibanaConfig.get('defaultIndex')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export const StepCreateForm: FC<Props> = React.memo(

const id = await newIndexPattern.create();

await indexPatterns.clearCache();

// id returns false if there's a duplicate index pattern.
if (id === false) {
toastNotifications.addDanger(
Expand Down