[Actionable Observability] Update links to Observability rule management (#140009)

* [Actionable Observability] Update links to Observability rule management

* Use path config file for links
This commit is contained in:
Coen Warmer 2022-09-05 14:32:22 +02:00 committed by GitHub
parent 4d15bb1d34
commit 6559bfbc71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,7 @@
import { i18n } from '@kbn/i18n';
import { HttpSetup, DocLinksStart } from '@kbn/core/public';
import { ObservabilityFetchDataPlugins } from '../../../typings/fetch_overview_data';
import { paths } from '../../../config/paths';
export interface ObservabilityStatusContent {
id: ObservabilityFetchDataPlugins | 'alert';
@ -135,7 +136,7 @@ export const getContent = (
addTitle: i18n.translate('xpack.observability.statusVisualization.alert.link', {
defaultMessage: 'Create rules',
}),
addLink: http.basePath.prepend('/app/management/insightsAndAlerting/triggersActions/rules'),
addLink: http.basePath.prepend(paths.observability.rules),
learnMoreLink: docLinks.links.observability.createAlerts,
goToAppTitle: i18n.translate('xpack.observability.statusVisualization.alert.goToAppTitle', {
defaultMessage: 'Show alerts',

View file

@ -8,6 +8,7 @@
import { i18n } from '@kbn/i18n';
import { HttpSetup } from '@kbn/core/public';
import { ISection } from '../../typings/section';
import { paths } from '../../config/paths';
export const getEmptySections = ({ http }: { http: HttpSetup }): ISection[] => {
return [
@ -97,7 +98,7 @@ export const getEmptySections = ({ http }: { http: HttpSetup }): ISection[] => {
linkTitle: i18n.translate('xpack.observability.emptySection.apps.alert.link', {
defaultMessage: 'Create rule',
}),
href: http.basePath.prepend('/app/management/insightsAndAlerting/triggersActions/alerts'),
href: http.basePath.prepend(paths.observability.rules),
},
];
};