@@ -9,11 +9,13 @@ import { IScope } from 'angular';
9
9
import { PathReporter } from 'io-ts/lib/PathReporter' ;
10
10
import * as React from 'react' ;
11
11
import * as ReactDOM from 'react-dom' ;
12
+ import { i18n } from '@kbn/i18n' ;
12
13
import { UIRoutes } from 'ui/routes' ;
13
14
import { isLeft } from 'fp-ts/lib/Either' ;
14
15
import { npSetup } from 'ui/new_platform' ;
15
16
import { SecurityPluginSetup } from '../../../../../../../plugins/security/public' ;
16
17
import { BufferedKibanaServiceCall , KibanaAdapterServiceRefs , KibanaUIConfig } from '../../types' ;
18
+ import { BASE_PATH } from '../../../../common/constants' ;
17
19
import {
18
20
FrameworkAdapter ,
19
21
FrameworkInfo ,
@@ -148,45 +150,13 @@ export class KibanaFrameworkAdapter implements FrameworkAdapter {
148
150
) ;
149
151
}
150
152
151
- public registerManagementSection ( settings : {
152
- id ?: string ;
153
- name : string ;
154
- iconName : string ;
155
- order ?: number ;
156
- } ) {
157
- const sectionId = settings . id || this . PLUGIN_ID ;
158
-
159
- if ( ! this . management . hasItem ( sectionId ) ) {
160
- this . management . register ( sectionId , {
161
- display : settings . name ,
162
- icon : settings . iconName ,
163
- order : settings . order || 30 ,
164
- } ) ;
165
- }
166
- }
167
-
168
- public registerManagementUI ( settings : {
169
- sectionId ?: string ;
170
- name : string ;
171
- basePath : string ;
172
- visable ?: boolean ;
173
- order ?: number ;
174
- } ) {
175
- const sectionId = settings . sectionId || this . PLUGIN_ID ;
176
-
177
- if ( ! this . management . hasItem ( sectionId ) ) {
178
- throw new Error (
179
- `registerManagementUI was called with a sectionId of ${ sectionId } , and that is is not yet regestered as a section`
180
- ) ;
181
- }
182
-
183
- const section = this . management . getSection ( sectionId ) ;
184
-
185
- section . register ( sectionId , {
186
- visible : settings . visable || true ,
187
- display : settings . name ,
188
- order : settings . order || 30 ,
189
- url : `#${ settings . basePath } ` ,
153
+ public registerManagementSection ( ) {
154
+ this . management . getSection ( 'ingest' ) ! . register ( 'beats_central_management' , {
155
+ display : i18n . translate ( 'xpack.beatsManagement.centralManagementSectionLabel' , {
156
+ defaultMessage : 'Beats Central Management' ,
157
+ } ) ,
158
+ order : 2 ,
159
+ url : `#${ BASE_PATH } /` ,
190
160
} ) ;
191
161
}
192
162
0 commit comments