@@ -64,7 +64,7 @@ import { PLUGIN_ID, HOME_APP_BASE_PATH, IMPORT_SAMPLE_DATA_APP_ID } from '../com
64
64
import { DataSourcePluginStart } from '../../data_source/public' ;
65
65
import { workWithDataSection } from './application/components/homepage/sections/work_with_data' ;
66
66
import { learnBasicsSection } from './application/components/homepage/sections/learn_basics' ;
67
- import { DEFAULT_NAV_GROUPS } from '../../../core/public' ;
67
+ import { DEFAULT_NAV_GROUPS , DEFAULT_APP_CATEGORIES } from '../../../core/public' ;
68
68
import {
69
69
ContentManagementPluginSetup ,
70
70
ContentManagementPluginStart ,
@@ -179,7 +179,9 @@ export class HomePublicPlugin
179
179
title : i18n . translate ( 'home.tutorialDirectory.featureCatalogueTitle' , {
180
180
defaultMessage : 'Add sample data' ,
181
181
} ) ,
182
- navLinkStatus : AppNavLinkStatus . hidden ,
182
+ navLinkStatus : core . chrome . navGroup . getNavGroupEnabled ( )
183
+ ? AppNavLinkStatus . visible
184
+ : AppNavLinkStatus . hidden ,
183
185
mount : async ( params : AppMountParameters ) => {
184
186
const [ coreStart ] = await core . getStartServices ( ) ;
185
187
setCommonService ( ) ;
@@ -194,6 +196,26 @@ export class HomePublicPlugin
194
196
} ) ;
195
197
urlForwarding . forwardApp ( 'home' , 'home' ) ;
196
198
199
+ const configurationInfoForImportSampleData = {
200
+ id : IMPORT_SAMPLE_DATA_APP_ID ,
201
+ title : i18n . translate ( 'home.nav.sampleData.label' , {
202
+ defaultMessage : 'Sample data' ,
203
+ } ) ,
204
+ order : 400 ,
205
+ category : DEFAULT_APP_CATEGORIES . manage ,
206
+ } ;
207
+
208
+ // Register sample data to all of the use cases in 2.16
209
+ [
210
+ DEFAULT_NAV_GROUPS . all ,
211
+ DEFAULT_NAV_GROUPS . analytics ,
212
+ DEFAULT_NAV_GROUPS [ 'security-analytics' ] ,
213
+ DEFAULT_NAV_GROUPS . observability ,
214
+ DEFAULT_NAV_GROUPS . search ,
215
+ ] . forEach ( ( navGroup ) =>
216
+ core . chrome . navGroup . addNavLinksToGroup ( navGroup , [ configurationInfoForImportSampleData ] )
217
+ ) ;
218
+
197
219
const featureCatalogue = { ...this . featuresCatalogueRegistry . setup ( ) } ;
198
220
199
221
featureCatalogue . register ( {
0 commit comments