mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Serverless] Observability side navigation (#160620)
fixes: https://github.com/elastic/kibana/issues/159681
fixes: https://github.com/elastic/kibana/issues/153777
<img width="1470" alt="image"
src="eb810c65
-c780-4597-9570-4b30cf2e1b09">
### Related
ML deep links won't show until it's merged
https://github.com/elastic/kibana/pull/159433
### Test
- e2e will be covered https://github.com/elastic/kibana/pull/160674
This commit is contained in:
parent
0a6f5b88cf
commit
1a21965403
8 changed files with 64 additions and 31 deletions
|
@ -189,6 +189,8 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
'xpack.apm.featureFlags.migrationToFleetAvailable (any)',
|
||||
'xpack.apm.featureFlags.sourcemapApiAvailable (any)',
|
||||
'xpack.apm.featureFlags.storageExplorerAvailable (any)',
|
||||
'xpack.apm.serverless.enabled (any)', // It's a boolean (any because schema.conditional)
|
||||
'xpack.observability_onboarding.serverless.enabled (any)', // It's a boolean (any because schema.conditional)
|
||||
'xpack.cases.files.allowedMimeTypes (array)',
|
||||
'xpack.cases.files.maxSize (number)',
|
||||
'xpack.cases.markdownPlugins.lens (boolean)',
|
||||
|
|
|
@ -80,6 +80,7 @@ const mockConfig: ConfigSchema = {
|
|||
sourcemapApiAvailable: true,
|
||||
storageExplorerAvailable: true,
|
||||
},
|
||||
serverless: { enabled: false },
|
||||
};
|
||||
|
||||
const urlService = new UrlService({
|
||||
|
|
|
@ -25,6 +25,9 @@ export interface ConfigSchema {
|
|||
sourcemapApiAvailable: boolean;
|
||||
storageExplorerAvailable: boolean;
|
||||
};
|
||||
serverless: {
|
||||
enabled: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export const plugin: PluginInitializer<ApmPluginSetup, ApmPluginStart> = (
|
||||
|
|
|
@ -11,6 +11,7 @@ import { map } from 'rxjs/operators';
|
|||
import { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';
|
||||
import {
|
||||
AppMountParameters,
|
||||
AppNavLinkStatus,
|
||||
CoreSetup,
|
||||
CoreStart,
|
||||
DEFAULT_APP_CATEGORIES,
|
||||
|
@ -321,6 +322,7 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
|
|||
appRoute: '/app/apm',
|
||||
icon: 'plugins/apm/public/icon.svg',
|
||||
category: DEFAULT_APP_CATEGORIES.observability,
|
||||
navLinkStatus: AppNavLinkStatus.visible,
|
||||
deepLinks: [
|
||||
{
|
||||
id: 'service-groups-list',
|
||||
|
@ -331,13 +333,26 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
|
|||
id: 'services',
|
||||
title: servicesTitle,
|
||||
path: '/services',
|
||||
navLinkStatus: config.serverless.enabled
|
||||
? AppNavLinkStatus.visible
|
||||
: AppNavLinkStatus.default,
|
||||
},
|
||||
{
|
||||
id: 'traces',
|
||||
title: tracesTitle,
|
||||
path: '/traces',
|
||||
navLinkStatus: config.serverless.enabled
|
||||
? AppNavLinkStatus.visible
|
||||
: AppNavLinkStatus.default,
|
||||
},
|
||||
{ id: 'traces', title: tracesTitle, path: '/traces' },
|
||||
{ id: 'service-map', title: serviceMapTitle, path: '/service-map' },
|
||||
{
|
||||
id: 'dependencies',
|
||||
title: dependenciesTitle,
|
||||
path: '/dependencies/inventory',
|
||||
navLinkStatus: config.serverless.enabled
|
||||
? AppNavLinkStatus.visible
|
||||
: AppNavLinkStatus.default,
|
||||
},
|
||||
{ id: 'settings', title: apmSettingsTitle, path: '/settings' },
|
||||
{
|
||||
|
|
|
@ -89,6 +89,15 @@ const configSchema = schema.object({
|
|||
sourcemapApiAvailable: disabledOnServerless,
|
||||
storageExplorerAvailable: disabledOnServerless,
|
||||
}),
|
||||
serverless: schema.object({
|
||||
enabled: schema.conditional(
|
||||
schema.contextRef('serverless'),
|
||||
true,
|
||||
schema.literal(true),
|
||||
schema.never(),
|
||||
{ defaultValue: schema.contextRef('serverless') }
|
||||
),
|
||||
}),
|
||||
});
|
||||
|
||||
// plugin config
|
||||
|
@ -150,6 +159,7 @@ export const config: PluginConfigDescriptor<APMConfig> = {
|
|||
managedServiceUrl: true,
|
||||
serverlessOnboarding: true,
|
||||
featureFlags: true,
|
||||
serverless: true,
|
||||
},
|
||||
schema: configSchema,
|
||||
};
|
||||
|
|
|
@ -54,6 +54,7 @@ export class ObservabilityOnboardingPlugin
|
|||
) {
|
||||
const {
|
||||
ui: { enabled: isObservabilityOnboardingUiEnabled },
|
||||
serverless: { enabled: isServerlessEnabled },
|
||||
} = this.ctx.config.get<ObservabilityOnboardingConfig>();
|
||||
|
||||
const pluginSetupDeps = plugins;
|
||||
|
@ -62,7 +63,9 @@ export class ObservabilityOnboardingPlugin
|
|||
// and go to /app/observabilityOnboarding
|
||||
if (isObservabilityOnboardingUiEnabled) {
|
||||
core.application.register({
|
||||
navLinkStatus: AppNavLinkStatus.hidden,
|
||||
navLinkStatus: isServerlessEnabled
|
||||
? AppNavLinkStatus.visible
|
||||
: AppNavLinkStatus.hidden,
|
||||
id: 'observabilityOnboarding',
|
||||
title: 'Observability Onboarding',
|
||||
order: 8500,
|
||||
|
|
|
@ -16,6 +16,15 @@ const configSchema = schema.object({
|
|||
ui: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
}),
|
||||
serverless: schema.object({
|
||||
enabled: schema.conditional(
|
||||
schema.contextRef('serverless'),
|
||||
true,
|
||||
schema.literal(true),
|
||||
schema.never(),
|
||||
{ defaultValue: schema.contextRef('serverless') }
|
||||
),
|
||||
}),
|
||||
});
|
||||
|
||||
export type ObservabilityOnboardingConfig = TypeOf<typeof configSchema>;
|
||||
|
@ -24,6 +33,7 @@ export type ObservabilityOnboardingConfig = TypeOf<typeof configSchema>;
|
|||
export const config: PluginConfigDescriptor<ObservabilityOnboardingConfig> = {
|
||||
exposeToBrowser: {
|
||||
ui: true,
|
||||
serverless: true,
|
||||
},
|
||||
schema: configSchema,
|
||||
};
|
||||
|
|
|
@ -28,14 +28,22 @@ const navigationTree: NavigationTreeDefinition = {
|
|||
breadcrumbStatus: 'hidden',
|
||||
children: [
|
||||
{
|
||||
id: 'services-infra',
|
||||
id: 'discover-dashboard-viz',
|
||||
children: [
|
||||
{ link: 'apm:services' },
|
||||
{
|
||||
title: i18n.translate('xpack.serverlessObservability.nav.infrastructure', {
|
||||
defaultMessage: 'Infrastructure',
|
||||
link: 'discover',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.serverlessObservability.nav.dashboards', {
|
||||
defaultMessage: 'Dashboards',
|
||||
}),
|
||||
link: 'metrics:inventory',
|
||||
link: 'dashboards',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.serverlessObservability.nav.visualizations', {
|
||||
defaultMessage: 'Visualizations',
|
||||
}),
|
||||
link: 'visualize',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -54,32 +62,21 @@ const navigationTree: NavigationTreeDefinition = {
|
|||
],
|
||||
},
|
||||
{
|
||||
id: 'signals',
|
||||
title: 'Signals',
|
||||
id: 'apm',
|
||||
title: 'APM',
|
||||
children: [
|
||||
{ link: 'apm:services' },
|
||||
{
|
||||
link: 'apm:traces',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.serverlessObservability.nav.signalsLogs', {
|
||||
title: i18n.translate('xpack.serverlessObservability.nav.logs', {
|
||||
defaultMessage: 'Logs',
|
||||
}),
|
||||
link: 'logs:stream',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'toolbox',
|
||||
title: 'Toolbox',
|
||||
children: [
|
||||
{
|
||||
title: i18n.translate('xpack.serverlessObservability.nav.toolBoxVisualization', {
|
||||
defaultMessage: 'Visualization',
|
||||
}),
|
||||
link: 'visualize',
|
||||
},
|
||||
{
|
||||
link: 'dashboards',
|
||||
link: 'apm:dependencies',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -97,14 +94,6 @@ const navigationTree: NavigationTreeDefinition = {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'navGroup',
|
||||
...getPresets('analytics'),
|
||||
},
|
||||
{
|
||||
type: 'navGroup',
|
||||
...getPresets('ml'),
|
||||
},
|
||||
],
|
||||
footer: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue