Skip to content
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
249467d
management new platform api - work in progress
mattkime Dec 9, 2019
0082362
sidebar pulling items from both registries
mattkime Dec 11, 2019
d24bd6d
fix import
mattkime Dec 11, 2019
9d3ef21
restore data-test-subj
mattkime Dec 11, 2019
43ffa97
remove getAvailable from setup - capabiltiies unavailable
mattkime Dec 12, 2019
c47ce1e
sidebar nav in new and old management apps, need to wire up old manag…
mattkime Dec 12, 2019
b5825a1
Merge branch 'master' into management_new_platform_api
mattkime Dec 12, 2019
a1a2b63
Merge branch 'master' into management_new_platform_api
mattkime Dec 15, 2019
e4cb014
Merge branch 'master' into management_new_platform_api
mattkime Dec 16, 2019
b42cbae
Merge branch 'master' into management_new_platform_api
mattkime Dec 17, 2019
b2d1a92
partial work - loading both legacy and np management apps
mattkime Dec 18, 2019
9da91b7
add components dir, forgot with last commit
mattkime Dec 18, 2019
04b33aa
i18n fix
mattkime Dec 19, 2019
60da3ae
Merge branch 'master' into management_new_platform_api
mattkime Dec 19, 2019
6ef6072
minor fixes, don't allow double registration of management section
mattkime Dec 19, 2019
f8ddba1
management app rendering implemented
mattkime Dec 19, 2019
54cc094
type cleanup
mattkime Dec 19, 2019
50fea18
refactor - create management app class, provide enable/disable methods
mattkime Dec 19, 2019
9d8457b
Merge branch 'master' into management_new_platform_api
mattkime Dec 19, 2019
bf31abd
remove capabilities api integration
mattkime Dec 19, 2019
fc9b1e3
remove unneeded types
mattkime Dec 20, 2019
360eb34
implement breadcrumbs for management apps
mattkime Dec 20, 2019
cf30a01
legacyManagementAdapter => LegacyManagementAdapter
mattkime Dec 20, 2019
7b1499f
initial navigateToApp functionality
mattkime Dec 20, 2019
d7bbafd
support for icon url, still need to import scss content
mattkime Dec 20, 2019
dfb2eb3
support for icon url, still need to import scss content
mattkime Dec 20, 2019
f1bde42
Merge branch 'master' into management_new_platform_api
mattkime Dec 20, 2019
80d4f46
css fix
mattkime Dec 21, 2019
52db153
Merge branch 'master' into management_new_platform_api
mattkime Dec 22, 2019
9131e9d
fix basePath
mattkime Dec 23, 2019
c3bfc86
fix basePath
mattkime Dec 24, 2019
c870f1a
fix basePath
mattkime Dec 24, 2019
aea8117
remove comment
mattkime Dec 25, 2019
52b3904
fix test
mattkime Dec 25, 2019
ddaa172
oops, need to export sidebar nav
mattkime Dec 25, 2019
3fd02af
update snapshop
mattkime Dec 25, 2019
f69f4b4
add test
mattkime Dec 25, 2019
f90ef79
Merge branch 'master' into management_new_platform_api
mattkime Dec 26, 2019
f61c25d
Merge branch 'master' into management_new_platform_api
mattkime Jan 3, 2020
1f3eb67
Merge branch 'master' into management_new_platform_api
elasticmachine Jan 3, 2020
eb2c1d9
add management section test
mattkime Jan 3, 2020
f21e83c
throw when registering two apps with same id
mattkime Jan 3, 2020
a6717e6
more unit tests
mattkime Jan 4, 2020
00ec7e7
use getStartServices
mattkime Jan 4, 2020
928c19b
update snapshot
mattkime Jan 4, 2020
f0cb867
Merge branch 'master' into management_new_platform_api
elasticmachine Jan 5, 2020
0e46652
Merge branch 'master' into management_new_platform_api
mattkime Jan 6, 2020
ef25134
Merge branch 'management_new_platform_api' of github.com:mattkime/kib…
mattkime Jan 6, 2020
95cd1e5
SidebarNav -> ManagementSidebarNav, 16px -> euiSize, pass management …
mattkime Jan 6, 2020
f7df3b4
use getSectionsEnabled
mattkime Jan 6, 2020
2b51b2a
update snapshot
mattkime Jan 7, 2020
fd6bed1
Merge branch 'master' into management_new_platform_api
mattkime Jan 7, 2020
e67a115
remove test code
mattkime Jan 7, 2020
22c721c
fix ts, add test plugin
mattkime Jan 7, 2020
b76ed14
css reference cleanup
mattkime Jan 7, 2020
e4f1181
Merge branch 'master' into management_new_platform_api
mattkime Jan 7, 2020
6cbe2da
snapshot update
mattkime Jan 7, 2020
cd83753
add plugin functional test
mattkime Jan 7, 2020
c795447
add sidebar nav test
mattkime Jan 7, 2020
d3d7a7b
components to own directories, type improvements
mattkime Jan 8, 2020
7a48b8b
provide empty icon if none provided
mattkime Jan 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/legacy/core_plugins/kibana/public/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import { I18nContext } from 'ui/i18n';
import { uiModules } from 'ui/modules';
import appTemplate from './app.html';
import landingTemplate from './landing.html';
import { management, SidebarNav, MANAGEMENT_BREADCRUMB } from 'ui/management';
import { management, MANAGEMENT_BREADCRUMB } from 'ui/management';
import { ManagementSidebarNav } from '../../../../../plugins/management/public';
import {
FeatureCatalogueRegistryProvider,
FeatureCatalogueCategory,
Expand All @@ -42,6 +43,7 @@ import {
EuiIcon,
EuiHorizontalRule,
} from '@elastic/eui';
import { npStart } from 'ui/new_platform';

const SIDENAV_ID = 'management-sidenav';
const LANDING_ID = 'management-landing';
Expand Down Expand Up @@ -102,15 +104,20 @@ export function updateLandingPage(version) {
);
}

export function updateSidebar(items, id) {
export function updateSidebar(legacySections, id) {
const node = document.getElementById(SIDENAV_ID);
if (!node) {
return;
}

render(
<I18nContext>
<SidebarNav sections={items} selectedId={id} className="mgtSideNav" />
<ManagementSidebarNav
getSections={npStart.plugins.management.sections.getSectionsEnabled}
legacySections={legacySections}
selectedId={id}
className="mgtSideNav"
/>
</I18nContext>,
node
);
Expand Down
1 change: 1 addition & 0 deletions src/legacy/ui/public/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@import './saved_objects/index';
@import './share/index';
@import './style_compile/index';
@import '../../../plugins/management/public/components/index';

// The following are prefixed with "vis"

Expand Down
1 change: 0 additions & 1 deletion src/legacy/ui/public/management/_index.scss

This file was deleted.

This file was deleted.

107 changes: 0 additions & 107 deletions src/legacy/ui/public/management/components/sidebar_nav.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/legacy/ui/public/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export {
PAGE_FOOTER_COMPONENT,
} from '../../../core_plugins/kibana/public/management/sections/settings/components/default_component_registry';
export { registerSettingsComponent } from '../../../core_plugins/kibana/public/management/sections/settings/components/component_registry';
export { SidebarNav } from './components';
export { MANAGEMENT_BREADCRUMB } from './breadcrumbs';

import { npStart } from 'ui/new_platform';
export const management = npStart.plugins.management.legacy;
2 changes: 1 addition & 1 deletion src/plugins/management/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"version": "kibana",
"server": false,
"ui": true,
"requiredPlugins": []
"requiredPlugins": ["kibana_legacy"]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/plugins/management/public/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './components/index';

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.mgtSidebarNav {
.mgtSideBarNav {
width: 192px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* under the License.
*/

export { SidebarNav } from './sidebar_nav';
export { ManagementSidebarNav } from './management_sidebar_nav';
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/

import { IndexedArray } from '../../indexed_array';
import { sideNavItems } from '../components/sidebar_nav';
import { IndexedArray } from '../../../../legacy/ui/public/indexed_array';
import { mergeLegacyItems } from '../components/management_sidebar_nav';

const toIndexedArray = (initialSet: any[]) =>
new IndexedArray({
Expand All @@ -30,30 +30,33 @@ const toIndexedArray = (initialSet: any[]) =>
const activeProps = { visible: true, disabled: false };
const disabledProps = { visible: true, disabled: true };
const notVisibleProps = { visible: false, disabled: false };

const visibleItem = { display: 'item', id: 'item', ...activeProps };

const notVisibleSection = {
display: 'Not visible',
id: 'not-visible',
order: 10,
visibleItems: toIndexedArray([visibleItem]),
...notVisibleProps,
};
const disabledSection = {
display: 'Disabled',
id: 'disabled',
order: 10,
visibleItems: toIndexedArray([visibleItem]),
...disabledProps,
};
const noItemsSection = {
display: 'No items',
id: 'no-items',
order: 10,
visibleItems: toIndexedArray([]),
...activeProps,
};
const noActiveItemsSection = {
display: 'No active items',
id: 'no-active-items',
order: 10,
visibleItems: toIndexedArray([
{ display: 'disabled', id: 'disabled', ...disabledProps },
{ display: 'notVisible', id: 'notVisible', ...notVisibleProps },
Expand All @@ -63,6 +66,7 @@ const noActiveItemsSection = {
const activeSection = {
display: 'activeSection',
id: 'activeSection',
order: 10,
visibleItems: toIndexedArray([visibleItem]),
...activeProps,
};
Expand All @@ -76,7 +80,9 @@ const managementSections = [
];

describe('Management', () => {
it('filters and filters and maps section objects into SidebarNav items', () => {
expect(sideNavItems(managementSections, 'active-item-id')).toMatchSnapshot();
it('maps legacy sections and apps into SidebarNav items', () => {
expect(mergeLegacyItems([], managementSections, 'active-item-id')).toMatchSnapshot();
});
});

// todo - itetrate through various inputs and test outputs
Loading