-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new o11y nav hierarchy for serverless #193510
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c80d225
change o11y nav hierarchy for serverless
mgiota b030a64
Merge branch 'main' into change_navigation_serverless
elasticmachine 8d5bd8f
add machine learning menu item
mgiota 5664ed7
add AI assistant
mgiota b080ee8
fix i18n check
mgiota 1edc895
more i18n fixes
mgiota 832322b
Merge branch 'main' into change_navigation_serverless
elasticmachine e1f730d
fix i18n checks
mgiota 3d995f2
fix failing tests
mgiota c4e9e30
Merge branch 'main' into change_navigation_serverless
elasticmachine 38a6d9d
fix ml failing tests
mgiota 11cd7ad
Merge branch 'main' into change_navigation_serverless
elasticmachine 292a8e7
Merge branch 'main' of github.com:elastic/kibana into change_navigati…
mgiota File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,147 +70,258 @@ export const navigationTree: NavigationTreeDefinition = { | |
link: 'slo', | ||
}, | ||
{ | ||
id: 'aiops', | ||
title: 'AIOps', | ||
link: 'ml:anomalyDetection', | ||
renderAs: 'accordion', | ||
spaceBefore: null, | ||
link: 'observabilityAIAssistant', | ||
title: i18n.translate('xpack.serverlessObservability.nav.aiAssistant', { | ||
defaultMessage: 'AI Assistant', | ||
}), | ||
}, | ||
{ link: 'inventory', spaceBefore: 'm' }, | ||
{ | ||
id: 'apm', | ||
title: i18n.translate('xpack.serverlessObservability.nav.applications', { | ||
defaultMessage: 'Applications', | ||
}), | ||
renderAs: 'panelOpener', | ||
children: [ | ||
{ | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.jobs', { | ||
defaultMessage: 'Anomaly detection', | ||
}), | ||
link: 'ml:anomalyDetection', | ||
id: 'ml:anomalyDetection', | ||
renderAs: 'item', | ||
children: [ | ||
{ | ||
link: 'ml:singleMetricViewer', | ||
}, | ||
{ | ||
link: 'ml:anomalyExplorer', | ||
link: 'apm:services', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this link work? |
||
title: i18n.translate('xpack.serverlessObservability.nav.apm.services', { | ||
defaultMessage: 'Service inventory', | ||
}), | ||
}, | ||
{ link: 'apm:traces' }, | ||
{ link: 'apm:dependencies' }, | ||
{ link: 'apm:settings' }, | ||
{ | ||
link: 'ml:settings', | ||
id: 'synthetics', | ||
title: i18n.translate('xpack.serverlessObservability.nav.synthetics', { | ||
defaultMessage: 'Synthetics', | ||
}), | ||
children: [ | ||
{ | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.synthetics.overviewItem', | ||
{ | ||
defaultMessage: 'Overview', | ||
} | ||
), | ||
id: 'synthetics-overview', | ||
link: 'synthetics:overview', | ||
breadcrumbStatus: 'hidden', | ||
}, | ||
{ | ||
link: 'synthetics:certificates', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.synthetics.certificatesItem', | ||
{ | ||
defaultMessage: 'TLS certificates', | ||
} | ||
), | ||
id: 'synthetics-certificates', | ||
breadcrumbStatus: 'hidden', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
title: i18n.translate('xpack.serverlessObservability.ml.logRateAnalysis', { | ||
defaultMessage: 'Log rate analysis', | ||
}), | ||
link: 'ml:logRateAnalysis', | ||
getIsActive: ({ pathNameSerialized, prepend }) => { | ||
return pathNameSerialized.includes(prepend('/app/ml/aiops/log_rate_analysis')); | ||
}, | ||
}, | ||
{ | ||
title: i18n.translate('xpack.serverlessObservability.ml.changePointDetection', { | ||
defaultMessage: 'Change point detection', | ||
}), | ||
link: 'ml:changePointDetections', | ||
getIsActive: ({ pathNameSerialized, prepend }) => { | ||
return pathNameSerialized.includes(prepend('/app/ml/aiops/change_point_detection')); | ||
}, | ||
}, | ||
{ | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.job.notifications', { | ||
defaultMessage: 'Job notifications', | ||
}), | ||
link: 'ml:notifications', | ||
}, | ||
], | ||
}, | ||
{ link: 'inventory', spaceBefore: 'm' }, | ||
{ | ||
id: 'apm', | ||
title: i18n.translate('xpack.serverlessObservability.nav.applications', { | ||
defaultMessage: 'Applications', | ||
id: 'metrics', | ||
title: i18n.translate('xpack.serverlessObservability.nav.infrastructure', { | ||
defaultMessage: 'Infrastructure', | ||
}), | ||
link: 'apm:services', | ||
renderAs: 'accordion', | ||
renderAs: 'panelOpener', | ||
children: [ | ||
{ | ||
link: 'apm:services', | ||
getIsActive: ({ pathNameSerialized }) => { | ||
const regex = /app\/apm\/.*service.*/; | ||
return regex.test(pathNameSerialized); | ||
}, | ||
}, | ||
{ | ||
link: 'apm:traces', | ||
getIsActive: ({ pathNameSerialized, prepend }) => { | ||
return pathNameSerialized.startsWith(prepend('/app/apm/traces')); | ||
}, | ||
}, | ||
{ | ||
link: 'apm:dependencies', | ||
getIsActive: ({ pathNameSerialized, prepend }) => { | ||
return pathNameSerialized.startsWith(prepend('/app/apm/dependencies')); | ||
}, | ||
}, | ||
{ | ||
link: 'apm:settings', | ||
sideNavStatus: 'hidden', // only to be considered in the breadcrumbs | ||
children: [ | ||
{ | ||
link: 'metrics:inventory', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.infrastructureInventory', | ||
{ | ||
defaultMessage: 'Infrastructure inventory', | ||
} | ||
), | ||
}, | ||
{ link: 'metrics:hosts' }, | ||
{ link: 'metrics:settings' }, | ||
{ link: 'metrics:assetDetails' }, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
id: 'metrics', | ||
title: i18n.translate('xpack.serverlessObservability.nav.infrastructure', { | ||
defaultMessage: 'Infrastructure', | ||
id: 'machine_learning-landing', | ||
renderAs: 'panelOpener', | ||
title: i18n.translate('xpack.serverlessObservability.nav.machineLearning', { | ||
defaultMessage: 'Machine learning', | ||
}), | ||
link: 'metrics:inventory', | ||
renderAs: 'accordion', | ||
children: [ | ||
{ | ||
link: 'metrics:inventory', | ||
getIsActive: ({ pathNameSerialized, prepend }) => { | ||
return pathNameSerialized.startsWith(prepend('/app/metrics/inventory')); | ||
}, | ||
children: [ | ||
{ | ||
link: 'ml:overview', | ||
}, | ||
{ | ||
link: 'ml:notifications', | ||
}, | ||
{ | ||
link: 'ml:memoryUsage', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.machineLearning.memoryUsage', | ||
{ | ||
defaultMessage: 'Memory usage', | ||
} | ||
), | ||
}, | ||
], | ||
}, | ||
{ | ||
link: 'metrics:hosts', | ||
getIsActive: ({ pathNameSerialized, prepend }) => { | ||
return pathNameSerialized.startsWith(prepend('/app/metrics/hosts')); | ||
}, | ||
id: 'category-anomaly_detection', | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.anomaly_detection', { | ||
defaultMessage: 'Anomaly detection', | ||
}), | ||
breadcrumbStatus: 'hidden', | ||
children: [ | ||
{ | ||
link: 'ml:anomalyDetection', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.anomaly_detection.jobs', | ||
{ | ||
defaultMessage: 'Jobs', | ||
} | ||
), | ||
}, | ||
{ | ||
link: 'ml:anomalyExplorer', | ||
}, | ||
{ | ||
link: 'ml:singleMetricViewer', | ||
}, | ||
{ | ||
link: 'ml:settings', | ||
}, | ||
{ | ||
link: 'ml:suppliedConfigurations', | ||
}, | ||
], | ||
}, | ||
{ | ||
link: 'metrics:settings', | ||
sideNavStatus: 'hidden', // only to be considered in the breadcrumbs | ||
id: 'category-data_frame analytics', | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.data_frame_analytics', { | ||
defaultMessage: 'Data frame analytics', | ||
}), | ||
breadcrumbStatus: 'hidden', | ||
children: [ | ||
{ | ||
link: 'ml:dataFrameAnalytics', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.data_frame_analytics.jobs', | ||
{ | ||
defaultMessage: 'Jobs', | ||
} | ||
), | ||
}, | ||
{ | ||
link: 'ml:resultExplorer', | ||
}, | ||
{ | ||
link: 'ml:analyticsMap', | ||
}, | ||
], | ||
}, | ||
{ | ||
link: 'metrics:assetDetails', | ||
sideNavStatus: 'hidden', // only to be considered in the breadcrumbs | ||
id: 'category-model_management', | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.model_management', { | ||
defaultMessage: 'Model management', | ||
}), | ||
breadcrumbStatus: 'hidden', | ||
children: [ | ||
{ | ||
link: 'ml:nodesOverview', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.model_management.trainedModels', | ||
{ | ||
defaultMessage: 'Trained models', | ||
} | ||
), | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
id: 'synthetics', | ||
title: i18n.translate('xpack.serverlessObservability.nav.synthetics', { | ||
defaultMessage: 'Synthetics', | ||
}), | ||
renderAs: 'accordion', | ||
breadcrumbStatus: 'hidden', | ||
children: [ | ||
{ | ||
title: i18n.translate('xpack.serverlessObservability.nav.synthetics.overviewItem', { | ||
defaultMessage: 'Overview', | ||
id: 'category-data_visualizer', | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.data_visualizer', { | ||
defaultMessage: 'Data visualizer', | ||
}), | ||
id: 'synthetics-overview', | ||
link: 'synthetics:overview', | ||
breadcrumbStatus: 'hidden', | ||
children: [ | ||
{ | ||
link: 'ml:fileUpload', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.data_visualizer.file_data_visualizer', | ||
{ | ||
defaultMessage: 'File data visualizer', | ||
} | ||
), | ||
}, | ||
{ | ||
link: 'ml:indexDataVisualizer', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.data_visualizer.data_view_data_visualizer', | ||
{ | ||
defaultMessage: 'Data view data visualizer', | ||
} | ||
), | ||
}, | ||
{ | ||
link: 'ml:dataDrift', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.data_visualizer.data_drift', | ||
{ | ||
defaultMessage: 'Data drift', | ||
} | ||
), | ||
}, | ||
], | ||
}, | ||
{ | ||
link: 'synthetics:certificates', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.synthetics.certificatesItem', | ||
{ | ||
defaultMessage: 'TLS Certificates', | ||
} | ||
), | ||
id: 'synthetics-certificates', | ||
id: 'category-aiops_labs', | ||
title: i18n.translate('xpack.serverlessObservability.nav.ml.aiops_labs', { | ||
defaultMessage: 'Aiops labs', | ||
}), | ||
breadcrumbStatus: 'hidden', | ||
children: [ | ||
{ | ||
link: 'ml:logRateAnalysis', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.aiops_labs.log_rate_analysis', | ||
{ | ||
defaultMessage: 'Log rate analysis', | ||
} | ||
), | ||
}, | ||
{ | ||
link: 'ml:logPatternAnalysis', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.aiops_labs.log_pattern_analysis', | ||
{ | ||
defaultMessage: 'Log pattern analysis', | ||
} | ||
), | ||
}, | ||
{ | ||
link: 'ml:changePointDetections', | ||
title: i18n.translate( | ||
'xpack.serverlessObservability.nav.ml.aiops_labs.change_point_detection', | ||
{ | ||
defaultMessage: 'Change point detection', | ||
} | ||
), | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very familiar with nav menu, what is this
id
used for? When do we need to have anid
for a navigation item?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't provide the
id
, thelink
will be the id. If there are nolink
like here as it is the parent group, the defaultid
is auto generated based on the position of the node in the tree (e.g. group_0_child_1_group3), which is not very human friendly. You might want to override that by a clearerid
that you can use in your tests.