Skip to content

Commit 9282f19

Browse files
authored
Management - New platform api (#52579)
* implement management new platform api
1 parent e1e1d96 commit 9282f19

File tree

43 files changed

+1296
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1296
-212
lines changed

src/legacy/core_plugins/kibana/public/management/index.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import { I18nContext } from 'ui/i18n';
2828
import { uiModules } from 'ui/modules';
2929
import appTemplate from './app.html';
3030
import landingTemplate from './landing.html';
31-
import { management, SidebarNav, MANAGEMENT_BREADCRUMB } from 'ui/management';
31+
import { management, MANAGEMENT_BREADCRUMB } from 'ui/management';
32+
import { ManagementSidebarNav } from '../../../../../plugins/management/public';
3233
import {
3334
FeatureCatalogueRegistryProvider,
3435
FeatureCatalogueCategory,
@@ -42,6 +43,7 @@ import {
4243
EuiIcon,
4344
EuiHorizontalRule,
4445
} from '@elastic/eui';
46+
import { npStart } from 'ui/new_platform';
4547

4648
const SIDENAV_ID = 'management-sidenav';
4749
const LANDING_ID = 'management-landing';
@@ -102,15 +104,20 @@ export function updateLandingPage(version) {
102104
);
103105
}
104106

105-
export function updateSidebar(items, id) {
107+
export function updateSidebar(legacySections, id) {
106108
const node = document.getElementById(SIDENAV_ID);
107109
if (!node) {
108110
return;
109111
}
110112

111113
render(
112114
<I18nContext>
113-
<SidebarNav sections={items} selectedId={id} className="mgtSideNav" />
115+
<ManagementSidebarNav
116+
getSections={npStart.plugins.management.sections.getSectionsEnabled}
117+
legacySections={legacySections}
118+
selectedId={id}
119+
className="mgtSideNav"
120+
/>
114121
</I18nContext>,
115122
node
116123
);

src/legacy/ui/public/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@import './saved_objects/index';
2121
@import './share/index';
2222
@import './style_compile/index';
23+
@import '../../../plugins/management/public/components/index';
2324

2425
// The following are prefixed with "vis"
2526

src/legacy/ui/public/management/_index.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/legacy/ui/public/management/components/__snapshots__/sidebar_nav.test.ts.snap

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/legacy/ui/public/management/components/sidebar_nav.tsx

Lines changed: 0 additions & 107 deletions
This file was deleted.

src/legacy/ui/public/management/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export {
2323
PAGE_FOOTER_COMPONENT,
2424
} from '../../../core_plugins/kibana/public/management/sections/settings/components/default_component_registry';
2525
export { registerSettingsComponent } from '../../../core_plugins/kibana/public/management/sections/settings/components/component_registry';
26-
export { SidebarNav } from './components';
2726
export { MANAGEMENT_BREADCRUMB } from './breadcrumbs';
28-
2927
import { npStart } from 'ui/new_platform';
3028
export const management = npStart.plugins.management.legacy;

src/plugins/management/kibana.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"version": "kibana",
44
"server": false,
55
"ui": true,
6-
"requiredPlugins": []
6+
"requiredPlugins": ["kibana_legacy"]
77
}

src/plugins/management/public/__snapshots__/management_app.test.tsx.snap

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import './management_sidebar_nav/index';
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export { ManagementSidebarNav } from './management_sidebar_nav';
21+
export { ManagementChrome } from './management_chrome';

0 commit comments

Comments
 (0)