Replace hard-coded links in infra alerting (#111072)
This commit is contained in:
parent
de2cfd2e65
commit
4d933c7d98
|
@ -190,6 +190,9 @@ readonly links: {
|
|||
}>;
|
||||
readonly observability: Readonly<{
|
||||
guide: string;
|
||||
infrastructureThreshold: string;
|
||||
logsThreshold: string;
|
||||
metricsThreshold: string;
|
||||
monitorStatus: string;
|
||||
monitorUptime: string;
|
||||
tlsCertificate: string;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -282,6 +282,9 @@ export class DocLinksService {
|
|||
},
|
||||
observability: {
|
||||
guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.html`,
|
||||
infrastructureThreshold: `{ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/infrastructure-threshold-alert.html`,
|
||||
logsThreshold: `{ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/logs-threshold-alert.html`,
|
||||
metricsThreshold: `{ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/metrics-threshold-alert.html`,
|
||||
monitorStatus: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/monitor-status-alert.html`,
|
||||
monitorUptime: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/monitor-uptime.html`,
|
||||
tlsCertificate: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/tls-certificate-alert.html`,
|
||||
|
@ -645,6 +648,9 @@ export interface DocLinksStart {
|
|||
}>;
|
||||
readonly observability: Readonly<{
|
||||
guide: string;
|
||||
infrastructureThreshold: string;
|
||||
logsThreshold: string;
|
||||
metricsThreshold: string;
|
||||
monitorStatus: string;
|
||||
monitorUptime: string;
|
||||
tlsCertificate: string;
|
||||
|
|
|
@ -655,6 +655,9 @@ export interface DocLinksStart {
|
|||
}>;
|
||||
readonly observability: Readonly<{
|
||||
guide: string;
|
||||
infrastructureThreshold: string;
|
||||
logsThreshold: string;
|
||||
metricsThreshold: string;
|
||||
monitorStatus: string;
|
||||
monitorUptime: string;
|
||||
tlsCertificate: string;
|
||||
|
|
|
@ -31,7 +31,7 @@ export function createInventoryMetricAlertType(): ObservabilityRuleTypeModel<Inv
|
|||
}),
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/observability/${docLinks.DOC_LINK_VERSION}/infrastructure-threshold-alert.html`;
|
||||
return `${docLinks.links.observability.infrastructureThreshold}`;
|
||||
},
|
||||
alertParamsExpression: React.lazy(() => import('./components/expression')),
|
||||
validate: validateMetricThreshold,
|
||||
|
|
|
@ -23,7 +23,7 @@ export function createLogThresholdAlertType(): ObservabilityRuleTypeModel<Partia
|
|||
}),
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/observability/${docLinks.DOC_LINK_VERSION}/logs-threshold-alert.html`;
|
||||
return `${docLinks.links.observability.logsThreshold}`;
|
||||
},
|
||||
alertParamsExpression: React.lazy(() => import('./components/expression_editor/editor')),
|
||||
validate: validateExpression,
|
||||
|
|
|
@ -29,7 +29,7 @@ export function createMetricThresholdAlertType(): ObservabilityRuleTypeModel<Met
|
|||
}),
|
||||
iconClass: 'bell',
|
||||
documentationUrl(docLinks) {
|
||||
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/observability/${docLinks.DOC_LINK_VERSION}/metrics-threshold-alert.html`;
|
||||
return `${docLinks.links.observability.metricsThreshold}`;
|
||||
},
|
||||
alertParamsExpression: React.lazy(() => import('./components/expression')),
|
||||
validate: validateMetricThreshold,
|
||||
|
|
Loading…
Reference in a new issue