Skip to content

Commit

Permalink
[data view mgmt] Field conflict modal - restore functionality (#132197)
Browse files Browse the repository at this point in the history
* fix conflicted fields modal

* fix mock
  • Loading branch information
mattkime committed May 16, 2022
1 parent 6ed28ac commit 61ae132
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export function Tabs({
getFieldInfo,
}}
openModal={overlays.openModal}
theme={theme!}
theme={theme}
userEditPermission={dataViews.getCanSaveSync()}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export async function mountManagementSection(
IndexPatternEditor: dataViewEditor.IndexPatternEditorComponent,
fieldFormats,
spaces,
theme,
};

ReactDOM.render(
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/data_view_management/public/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const docLinks = {
const createIndexPatternManagmentContext = (): {
[key in keyof IndexPatternManagmentContext]: any;
} => {
const { application, chrome, uiSettings, notifications, overlays } = coreMock.createStart();
const { application, chrome, uiSettings, notifications, overlays, theme } =
coreMock.createStart();
const { http } = coreMock.createSetup();
const data = dataPluginMock.createStartContract();
const dataViewFieldEditor = indexPatternFieldEditorPluginMock.createStartContract();
Expand All @@ -81,6 +82,7 @@ const createIndexPatternManagmentContext = (): {
IndexPatternEditor:
indexPatternEditorPluginMock.createStartContract().IndexPatternEditorComponent,
fieldFormats: fieldFormatsServiceMock.createStartContract(),
theme,
};
};

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/data_view_management/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
DocLinksStart,
HttpSetup,
ApplicationStart,
ThemeServiceStart,
} from '@kbn/core/public';
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
Expand Down Expand Up @@ -44,6 +45,7 @@ export interface IndexPatternManagmentContext {
IndexPatternEditor: DataViewEditorStart['IndexPatternEditorComponent'];
fieldFormats: FieldFormatsStart;
spaces?: SpacesPluginStart;
theme: ThemeServiceStart;
}

export type IndexPatternManagmentContextValue =
Expand Down

0 comments on commit 61ae132

Please sign in to comment.