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
… (#132239)

* fix conflicted fields modal

* fix mock

(cherry picked from commit 61ae132)

# Conflicts:
#	src/plugins/data_view_management/public/types.ts
  • Loading branch information
mattkime committed May 18, 2022
1 parent f788645 commit 7ede480
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 @@ -66,6 +66,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 @@ -55,7 +55,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 @@ -78,6 +79,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 'src/core/public';
import { DataPublicPluginStart } from 'src/plugins/data/public';
import { ManagementAppMountParams } from '../../management/public';
Expand Down Expand Up @@ -42,6 +43,7 @@ export interface IndexPatternManagmentContext {
IndexPatternEditor: DataViewEditorStart['IndexPatternEditorComponent'];
fieldFormats: FieldFormatsStart;
spaces?: SpacesPluginStart;
theme: ThemeServiceStart;
}

export type IndexPatternManagmentContextValue =
Expand Down

0 comments on commit 7ede480

Please sign in to comment.