diff --git a/x-pack/legacy/plugins/beats_management/common/constants/index.ts b/x-pack/legacy/plugins/beats_management/common/constants/index.ts index 31fa84906cd3..5f9ae815e34d 100644 --- a/x-pack/legacy/plugins/beats_management/common/constants/index.ts +++ b/x-pack/legacy/plugins/beats_management/common/constants/index.ts @@ -9,4 +9,4 @@ export { INDEX_NAMES } from './index_names'; export { PLUGIN } from './plugin'; export { LICENSES, REQUIRED_LICENSES, REQUIRED_ROLES } from './security'; export { TABLE_CONFIG } from './table'; -export const BASE_PATH = '/management/beats_management'; +export const BASE_PATH = '/management/beats/beats_management'; diff --git a/x-pack/plugins/beats_management/public/application.tsx b/x-pack/plugins/beats_management/public/application.tsx index b17031a61f43..bf450e9c7a5e 100644 --- a/x-pack/plugins/beats_management/public/application.tsx +++ b/x-pack/plugins/beats_management/public/application.tsx @@ -28,7 +28,7 @@ export const renderApp = ( ReactDOM.render( - + diff --git a/x-pack/plugins/beats_management/public/bootstrap.tsx b/x-pack/plugins/beats_management/public/bootstrap.tsx index ce5b6642773f..678b4b763863 100644 --- a/x-pack/plugins/beats_management/public/bootstrap.tsx +++ b/x-pack/plugins/beats_management/public/bootstrap.tsx @@ -20,7 +20,7 @@ import { BeatsManagementConfigType } from '../common'; async function startApp(libs: FrontendLibs, core: CoreSetup) { await libs.framework.waitUntilFrameworkReady(); - if (true || libs.framework.licenseIsAtLeast('standard')) { + if (libs.framework.licenseIsAtLeast('standard')) { libs.framework.registerManagementSection({ id: 'beats', name: i18n.translate('xpack.beatsManagement.centralManagementSectionLabel', { @@ -31,6 +31,7 @@ async function startApp(libs: FrontendLibs, core: CoreSetup) { libs.framework.registerManagementUI({ sectionId: 'beats', + appId: 'beats_management', name: i18n.translate('xpack.beatsManagement.centralManagementLinkLabel', { defaultMessage: 'Central Management', }), diff --git a/x-pack/plugins/beats_management/public/components/navigation/breadcrumb/breadcrumb.tsx b/x-pack/plugins/beats_management/public/components/navigation/breadcrumb/breadcrumb.tsx index 66259fcb138c..13a0003b5ebd 100644 --- a/x-pack/plugins/beats_management/public/components/navigation/breadcrumb/breadcrumb.tsx +++ b/x-pack/plugins/beats_management/public/components/navigation/breadcrumb/breadcrumb.tsx @@ -53,7 +53,7 @@ export const Breadcrumb: React.FC = ({ title, path, parentBread {context => ( diff --git a/x-pack/plugins/beats_management/public/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/beats_management/public/lib/adapters/framework/adapter_types.ts index a2db2d75fa4f..2ae152dc969e 100644 --- a/x-pack/plugins/beats_management/public/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/beats_management/public/lib/adapters/framework/adapter_types.ts @@ -18,13 +18,14 @@ export interface FrameworkAdapter { // Methods waitUntilFrameworkReady(): Promise; registerManagementSection(settings: { - id?: string; + id: string; name: string; iconName: string; order?: number; }): void; registerManagementUI(settings: { - sectionId?: string; + sectionId: string; + appId: string; name: string; basePath: string; visable?: boolean; diff --git a/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts index c299b746cf04..5e11df228ccb 100644 --- a/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts @@ -74,7 +74,6 @@ export class KibanaFrameworkAdapter implements FrameworkAdapter { enabled: license.getFeature('security').isEnabled, available: license.getFeature('security').isAvailable, }, - // TODO: this really has nothing to do with licensing, but should be server config settings: this.config, }; } catch (e) { @@ -104,15 +103,13 @@ export class KibanaFrameworkAdapter implements FrameworkAdapter { } public registerManagementSection(settings: { - id?: string; + id: string; name: string; iconName: string; order?: number; }) { - const sectionId = settings.id || this.PLUGIN_ID; - this.management.sections.register({ - id: sectionId, + id: settings.id, title: settings.name, euiIconType: settings.iconName, order: settings.order || 30, @@ -120,25 +117,24 @@ export class KibanaFrameworkAdapter implements FrameworkAdapter { } public registerManagementUI(settings: { - sectionId?: string; + sectionId: string; + appId: string; name: string; basePath: string; visable?: boolean; order?: number; mount: RegisterManagementAppArgs['mount']; }) { - const sectionId = settings.sectionId || this.PLUGIN_ID; - - const section = this.management.sections.getSection(sectionId); + const section = this.management.sections.getSection(settings.sectionId); if (!section) { throw new Error( - `registerManagementUI was called with a sectionId of ${sectionId}, and that is is not yet regestered as a section` + `registerManagementUI was called with a sectionId of ${settings.sectionId}, and that is is not yet regestered as a section` ); } section.registerApp({ - id: sectionId, + id: settings.appId, title: settings.name, order: settings.order || 30, mount: settings.mount,