diff --git a/src/core/public/chrome/ui/header/header.tsx b/src/core/public/chrome/ui/header/header.tsx index 6445f522fc75e..460169756eae4 100644 --- a/src/core/public/chrome/ui/header/header.tsx +++ b/src/core/public/chrome/ui/header/header.tsx @@ -59,7 +59,6 @@ import { import { HttpStart } from '../../../http'; import { ChromeHelpExtension } from '../../chrome_service'; import { ApplicationStart, InternalApplicationStart } from '../../../application/types'; -import { NavLinkWrapper } from '../../nav_links/nav_link'; // Providing a buffer between the limit and the cut off index // protects from truncating just the last couple (6) characters @@ -191,6 +190,7 @@ const categoryIcon = { }; function getGroupIcon(groupName: string) { + // @ts-ignore TODO@myasonik return categoryIcon[groupName]; } @@ -366,7 +366,8 @@ class HeaderUI extends Component { public renderNavLinks() { const isOSS = false; // TODO@myasonik - if (isOSS || this.state.navLinks.length < 7) { + const disableGroupedNavSetting = false; // TODO@myasonik + if (isOSS || disableGroupedNavSetting || this.state.navLinks.length < 7) { return ( ; user?: Record; diff --git a/src/legacy/ui/ui_exports/ui_export_types/ui_apps.js b/src/legacy/ui/ui_exports/ui_export_types/ui_apps.js index d7ac49d9d49a3..639a5a7c58e18 100644 --- a/src/legacy/ui/ui_exports/ui_export_types/ui_apps.js +++ b/src/legacy/ui/ui_exports/ui_export_types/ui_apps.js @@ -34,6 +34,7 @@ function applySpecDefaults(spec, type, pluginSpec) { linkToLastSubUrl = true, listed = !hidden, url = `/app/${id}`, + category, } = spec; if (spec.injectVars) { @@ -61,6 +62,7 @@ function applySpecDefaults(spec, type, pluginSpec) { linkToLastSubUrl, listed, url, + category, }; } diff --git a/x-pack/legacy/plugins/canvas/index.js b/x-pack/legacy/plugins/canvas/index.js index 8e742de6de944..20e6c5a0d01b7 100644 --- a/x-pack/legacy/plugins/canvas/index.js +++ b/x-pack/legacy/plugins/canvas/index.js @@ -10,6 +10,13 @@ import { mappings } from './server/mappings'; import { CANVAS_APP, CANVAS_TYPE, CUSTOM_ELEMENT_TYPE } from './common/lib'; import { migrations } from './migrations'; +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; + export function canvas(kibana) { return new kibana.Plugin({ id: CANVAS_APP, @@ -23,6 +30,7 @@ export function canvas(kibana) { icon: 'plugins/canvas/icon.svg', euiIconType: 'canvasApp', main: 'plugins/canvas/legacy_start', + category: AppCategoryObj.analyze, }, interpreter: [ 'plugins/canvas/browser_functions', diff --git a/x-pack/legacy/plugins/dashboard_mode/index.js b/x-pack/legacy/plugins/dashboard_mode/index.js index 4a04249844322..0c589cb9027a8 100644 --- a/x-pack/legacy/plugins/dashboard_mode/index.js +++ b/x-pack/legacy/plugins/dashboard_mode/index.js @@ -12,8 +12,15 @@ import { createDashboardModeRequestInterceptor } from './server'; import { i18n } from '@kbn/i18n'; +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; + // Copied largely from plugins/kibana/index.js. The dashboard viewer includes just the dashboard section of -// the standard kibana plugin. We don't want to include code for the other links (visualize, dev tools, etc) +// the standard kibana plugin. We don't want to include code for the other links (visualize, dev tools, etc) // since it's view only, but we want the urls to be the same, so we are using largely the same setup. export function dashboardMode(kibana) { const kbnBaseUrl = '/app/kibana'; @@ -64,6 +71,7 @@ export function dashboardMode(kibana) { } ), icon: 'plugins/kibana/dashboard/assets/dashboard.svg', + category: AppCategoryObj.analyze, }, ], }, diff --git a/x-pack/legacy/plugins/graph/index.ts b/x-pack/legacy/plugins/graph/index.ts index 601a239574e6b..f0eedb0fe9dc6 100644 --- a/x-pack/legacy/plugins/graph/index.ts +++ b/x-pack/legacy/plugins/graph/index.ts @@ -12,6 +12,13 @@ import migrations from './migrations'; import mappings from './mappings.json'; import { LegacyPluginInitializer } from '../../../../src/legacy/plugin_discovery/types'; +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; + export const graph: LegacyPluginInitializer = kibana => { return new kibana.Plugin({ id: 'graph', @@ -25,6 +32,7 @@ export const graph: LegacyPluginInitializer = kibana => { icon: 'plugins/graph/icon.png', euiIconType: 'graphApp', main: 'plugins/graph/index', + category: AppCategoryObj.analyze, }, styleSheetPaths: resolve(__dirname, 'public/index.scss'), mappings, diff --git a/x-pack/legacy/plugins/maps/index.js b/x-pack/legacy/plugins/maps/index.js index 83362e73fb314..5f713c95b167c 100644 --- a/x-pack/legacy/plugins/maps/index.js +++ b/x-pack/legacy/plugins/maps/index.js @@ -14,6 +14,13 @@ import _ from 'lodash'; import { MapPlugin } from './server/plugin'; import { APP_ID, APP_ICON, createMapPath, MAP_SAVED_OBJECT_TYPE } from './common/constants'; +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; + export function maps(kibana) { return new kibana.Plugin({ // task_manager could be required, but is only used for telemetry @@ -30,6 +37,7 @@ export function maps(kibana) { main: 'plugins/maps/legacy', icon: 'plugins/maps/icon.svg', euiIconType: APP_ICON, + category: AppCategoryObj.analyze, }, injectDefaultVars(server) { const serverConfig = server.config(); diff --git a/x-pack/legacy/plugins/ml/index.ts b/x-pack/legacy/plugins/ml/index.ts index 0a716f8742b52..bdc4830d75c1b 100755 --- a/x-pack/legacy/plugins/ml/index.ts +++ b/x-pack/legacy/plugins/ml/index.ts @@ -23,12 +23,12 @@ interface MlServer extends Server { addAppLinksToSampleDataset: () => {}; } -enum AppCategory { - analyze, - observability, - security, - management, -} +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; export const ml = (kibana: any) => { return new kibana.Plugin({ @@ -49,7 +49,7 @@ export const ml = (kibana: any) => { icon: 'plugins/ml/application/ml.svg', euiIconType: 'machineLearningApp', main: 'plugins/ml/legacy', - category: AppCategory.management, + category: AppCategoryObj.management, }, styleSheetPaths: resolve(__dirname, 'public/application/index.scss'), hacks: ['plugins/ml/application/hacks/toggle_app_link_in_nav'], diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index cf9fffc6a1455..d5b1a104c47b6 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -31,6 +31,13 @@ import { import { defaultIndexPattern } from './default_index_pattern'; import { initServerWithKibana } from './server/kibana.index'; +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; + // eslint-disable-next-line @typescript-eslint/no-explicit-any export const siem = (kibana: any) => { return new kibana.Plugin({ @@ -60,6 +67,7 @@ export const siem = (kibana: any) => { order: 9000, title: APP_NAME, url: `/app/${APP_ID}`, + // category: AppCategoryObj.security, }, ], uiSettingDefaults: { diff --git a/x-pack/legacy/plugins/uptime/index.ts b/x-pack/legacy/plugins/uptime/index.ts index e090a2c85e136..92541436729a5 100644 --- a/x-pack/legacy/plugins/uptime/index.ts +++ b/x-pack/legacy/plugins/uptime/index.ts @@ -10,6 +10,13 @@ import { PluginInitializerContext } from 'src/core/server'; import { PLUGIN } from './common/constants'; import { KibanaServer, plugin } from './server'; +export const AppCategoryObj = { + analyze: 'analyze', + observability: 'observability', + security: 'security', + management: 'management', +}; + export const uptime = (kibana: any) => new kibana.Plugin({ configPrefix: 'xpack.uptime', @@ -30,6 +37,7 @@ export const uptime = (kibana: any) => main: 'plugins/uptime/app', order: 8900, url: '/app/uptime#/', + category: AppCategoryObj.observability, }, home: ['plugins/uptime/register_feature'], },