chore(slo): add link to slo details page from alert (#155320)

This commit is contained in:
Kevin Delemme 2023-04-20 06:56:19 -04:00 committed by GitHub
parent 4e8e6cd2f7
commit 79969fbf2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import { lazy } from 'react';
import { i18n } from '@kbn/i18n';
import { ALERT_REASON } from '@kbn/rule-data-utils';
import { SLO_ID_FIELD } from '../../common/field_names/infra_metrics';
import { ConfigSchema } from '../plugin';
import { ObservabilityRuleTypeRegistry } from './create_observability_rule_type_registry';
import { SLO_BURN_RATE_RULE_ID } from '../../common/constants';
@ -25,7 +26,7 @@ export const registerObservabilityRuleTypes = (
format: ({ fields }) => {
return {
reason: fields[ALERT_REASON] ?? '-',
link: '/app/observability/slos',
link: `/app/observability/slos/${fields[SLO_ID_FIELD]}`,
};
},
iconClass: 'bell',