Skip to content

Commit

Permalink
fix merge issue
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Aug 28, 2024
1 parent b191d9e commit db1b203
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ContentManagementPluginStart,
ContentProvider,
ESSENTIAL_OVERVIEW_CONTENT_AREAS,
SEARCH_OVERVIEW_CONTENT_AREAS,
} from '../../../../../content_management/public';
import { IMPORT_SAMPLE_DATA_APP_ID } from '../../../../common/constants';

Expand Down Expand Up @@ -47,5 +48,7 @@ export const registerSampleDataCard = (
contentManagement.registerContentProvider(
sampleDataCard(0, ESSENTIAL_OVERVIEW_CONTENT_AREAS.GET_STARTED)
);
contentManagement.registerContentProvider(sampleDataCard(30, 'search_overview/get_started'));
contentManagement.registerContentProvider(
sampleDataCard(30, SEARCH_OVERVIEW_CONTENT_AREAS.GET_STARTED)
);
};
14 changes: 4 additions & 10 deletions src/plugins/home/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { learnBasicsSection } from './application/components/homepage/sections/l
import {
ContentManagementPluginSetup,
ContentManagementPluginStart,
SEARCH_OVERVIEW_PAGE_ID,
} from '../../content_management/public';
import { initHome, setupHome } from './application/home_render';
import { registerSampleDataCard } from './application/components/sample_data/sample_data_card';
Expand All @@ -78,6 +79,7 @@ import {
registerContentToSearchUseCasePage,
setupSearchUseCase,
} from './application/components/usecase_overview/search_use_case_setup';
import { DEFAULT_NAV_GROUPS } from '../../../core/public';

export interface HomePluginStartDependencies {
data: DataPublicPluginStart;
Expand Down Expand Up @@ -172,18 +174,10 @@ export class HomePublicPlugin
workspaceAvailability: WorkspaceAvailability.outsideWorkspace,
});

core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.all, [
{
id: PLUGIN_ID,
title: 'Home',
order: 0,
},
]);

if (core.chrome.navGroup.getNavGroupEnabled()) {
// register search use case overview page
core.application.register({
id: 'search_overview',
id: SEARCH_OVERVIEW_PAGE_ID,
title: 'Overview',
mount: async (params: AppMountParameters) => {
const [
Expand All @@ -204,7 +198,7 @@ export class HomePublicPlugin
// add to search group
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.search, [
{
id: 'search_overview',
id: SEARCH_OVERVIEW_PAGE_ID,
order: -1,
},
]);
Expand Down

0 comments on commit db1b203

Please sign in to comment.