Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] [MDS] Refactor DataSourceAggregatedView #6542

Merged
merged 1 commit into from
Apr 18, 2024
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 @@ -11,7 +11,7 @@ import { CoreStart, AppMountParameters } from '../../../src/core/public';
import { Home } from './components/home';

export const renderApp = (
{ notifications, http, savedObjects, application }: CoreStart,
{ notifications, http, savedObjects, application, uiSettings }: CoreStart,
dataSource: DataSourcePluginSetup,
dataSourceManagement: DataSourceManagementPluginSetup,
{ appBasePath, element, setHeaderActionMenu }: AppMountParameters,
Expand All @@ -28,6 +28,7 @@ export const renderApp = (
dataSourceManagement={dataSourceManagement}
navigateToApp={application.navigateToApp}
navigation={navigation}
uiSettings={uiSettings}
/>,
element
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface DataSourceListActiveExampleProps {
notifications: CoreStart['notifications'];
setActionMenu?: (menuMount: MountPoint | undefined) => void;
dataSourceManagement: DataSourceManagementPluginSetup;
uiSettings: CoreStart['uiSettings'];
}

export const DataSourceListActiveExample = ({
Expand All @@ -36,6 +37,7 @@ export const DataSourceListActiveExample = ({
notifications,
setActionMenu,
dataSourceManagement,
uiSettings,
}: DataSourceListActiveExampleProps) => {
const DataSourceMenu = dataSourceManagement.ui.getDataSourceMenu<
DataSourceAggregatedViewConfig
Expand Down Expand Up @@ -106,7 +108,10 @@ export const DataSourceListActiveExample = ({
fullWidth: false,
savedObjects: savedObjects.client,
notifications,
displayAllCompatibleDataSources: true,
displayAllCompatibleDataSources: false,
// To see selected options, obtain the datasource id and paste it here. Note that this needs to be defined when displayAllCompatibleDataSources is false
activeDataSourceIds: [],
uiSettings,
}}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface DataSourceListAllExampleProps {
notifications: CoreStart['notifications'];
setActionMenu?: (menuMount: MountPoint | undefined) => void;
dataSourceManagement: DataSourceManagementPluginSetup;
uiSettings: CoreStart['uiSettings'];
}

export const DataSourceListAllExample = ({
Expand All @@ -36,6 +37,7 @@ export const DataSourceListAllExample = ({
notifications,
setActionMenu,
dataSourceManagement,
uiSettings,
}: DataSourceListAllExampleProps) => {
const DataSourceMenu = dataSourceManagement.ui.getDataSourceMenu<
DataSourceAggregatedViewConfig
Expand Down Expand Up @@ -100,6 +102,7 @@ export const DataSourceListAllExample = ({
savedObjects: savedObjects.client,
notifications,
displayAllCompatibleDataSources: true,
uiSettings,
}}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface HomeProps {
notifications: CoreStart['notifications'];
http: CoreStart['http'];
savedObjects: CoreStart['savedObjects'];
uiSettings: CoreStart['uiSettings'];
dataSourceEnabled: boolean;
dataSourceManagement: DataSourceManagementPluginSetup;
navigateToApp: CoreStart['application']['navigateToApp'];
Expand Down Expand Up @@ -65,6 +66,7 @@ export const Home = ({
basename,
notifications,
savedObjects,
uiSettings,
dataSourceEnabled,
setActionMenu,
dataSourceManagement,
Expand Down Expand Up @@ -133,6 +135,7 @@ export const Home = ({
dataSourceEnabled={dataSourceEnabled}
setActionMenu={setActionMenu}
dataSourceManagement={dataSourceManagement}
uiSettings={uiSettings}
/>
),
},
Expand All @@ -146,6 +149,7 @@ export const Home = ({
dataSourceEnabled={dataSourceEnabled}
setActionMenu={setActionMenu}
dataSourceManagement={dataSourceManagement}
uiSettings={uiSettings}
/>
),
},
Expand Down
Loading
Loading