mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Serverless] Add deployment URL (#163925)
## Summary This adds a link to the concrete project in Serverless ES3. We can't link to performance directly because that has been descoped for now.
This commit is contained in:
parent
9da44e3571
commit
d5a3ed1dee
3 changed files with 21 additions and 2 deletions
|
@ -45,7 +45,7 @@ export type AppDeepLinkId =
|
|||
| ObservabilityLink;
|
||||
|
||||
/** @public */
|
||||
export type CloudLinkId = 'userAndRoles' | 'performance' | 'billingAndSub';
|
||||
export type CloudLinkId = 'userAndRoles' | 'performance' | 'billingAndSub' | 'deployment';
|
||||
|
||||
export type GetIsActiveFn = (params: {
|
||||
/** The current path name including the basePath + hash value but **without** any query params */
|
||||
|
|
|
@ -17,7 +17,7 @@ export type CloudLinks = {
|
|||
};
|
||||
|
||||
export const getCloudLinks = (cloud: CloudStart): CloudLinks => {
|
||||
const { billingUrl, performanceUrl, usersAndRolesUrl } = cloud;
|
||||
const { billingUrl, deploymentUrl, performanceUrl, usersAndRolesUrl } = cloud;
|
||||
|
||||
const links: CloudLinks = {};
|
||||
|
||||
|
@ -54,5 +54,17 @@ export const getCloudLinks = (cloud: CloudStart): CloudLinks => {
|
|||
};
|
||||
}
|
||||
|
||||
if (deploymentUrl) {
|
||||
links.deployment = {
|
||||
title: i18n.translate(
|
||||
'sharedUXPackages.chrome.sideNavigation.cloudLinks.deploymentLinkText',
|
||||
{
|
||||
defaultMessage: 'Project',
|
||||
}
|
||||
),
|
||||
href: deploymentUrl,
|
||||
};
|
||||
}
|
||||
|
||||
return links;
|
||||
};
|
||||
|
|
|
@ -134,6 +134,13 @@ const navigationTree: NavigationTreeDefinition = {
|
|||
defaultMessage: 'Management',
|
||||
}),
|
||||
},
|
||||
{
|
||||
id: 'cloudLinkDeployment',
|
||||
cloudLink: 'deployment',
|
||||
title: i18n.translate('xpack.serverlessSearch.nav.performance', {
|
||||
defaultMessage: 'Performance',
|
||||
}),
|
||||
},
|
||||
{
|
||||
id: 'cloudLinkUserAndRoles',
|
||||
cloudLink: 'userAndRoles',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue