mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Replace hard-coded doc links in uptime (#111075)
This commit is contained in:
parent
6f7d07c6e7
commit
e16736416a
8 changed files with 31 additions and 9 deletions
|
@ -188,7 +188,13 @@ readonly links: {
|
|||
timeUnits: string;
|
||||
updateTransform: string;
|
||||
}>;
|
||||
readonly observability: Record<string, string>;
|
||||
readonly observability: Readonly<{
|
||||
guide: string;
|
||||
monitorStatus: string;
|
||||
monitorUptime: string;
|
||||
tlsCertificate: string;
|
||||
uptimeDurationAnomaly: string;
|
||||
}>;
|
||||
readonly alerting: Record<string, string>;
|
||||
readonly maps: Record<string, string>;
|
||||
readonly monitoring: Record<string, string>;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -282,6 +282,10 @@ export class DocLinksService {
|
|||
},
|
||||
observability: {
|
||||
guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.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`,
|
||||
uptimeDurationAnomaly: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/duration-anomaly-alert.html`,
|
||||
},
|
||||
alerting: {
|
||||
guide: `${KIBANA_DOCS}create-and-manage-rules.html`,
|
||||
|
@ -639,7 +643,13 @@ export interface DocLinksStart {
|
|||
timeUnits: string;
|
||||
updateTransform: string;
|
||||
}>;
|
||||
readonly observability: Record<string, string>;
|
||||
readonly observability: Readonly<{
|
||||
guide: string;
|
||||
monitorStatus: string;
|
||||
monitorUptime: string;
|
||||
tlsCertificate: string;
|
||||
uptimeDurationAnomaly: string;
|
||||
}>;
|
||||
readonly alerting: Record<string, string>;
|
||||
readonly maps: Record<string, string>;
|
||||
readonly monitoring: Record<string, string>;
|
||||
|
|
|
@ -653,7 +653,13 @@ export interface DocLinksStart {
|
|||
timeUnits: string;
|
||||
updateTransform: string;
|
||||
}>;
|
||||
readonly observability: Record<string, string>;
|
||||
readonly observability: Readonly<{
|
||||
guide: string;
|
||||
monitorStatus: string;
|
||||
monitorUptime: string;
|
||||
tlsCertificate: string;
|
||||
uptimeDurationAnomaly: string;
|
||||
}>;
|
||||
readonly alerting: Record<string, string>;
|
||||
readonly maps: Record<string, string>;
|
||||
readonly monitoring: Record<string, string>;
|
||||
|
|
|
@ -27,7 +27,7 @@ export function renderApp(
|
|||
const {
|
||||
application: { capabilities },
|
||||
chrome: { setBadge, setHelpExtension },
|
||||
docLinks: { DOC_LINK_VERSION, ELASTIC_WEBSITE_URL },
|
||||
docLinks,
|
||||
http: { basePath },
|
||||
i18n,
|
||||
} = core;
|
||||
|
@ -59,7 +59,7 @@ export function renderApp(
|
|||
links: [
|
||||
{
|
||||
linkType: 'documentation',
|
||||
href: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/monitor-uptime.html`,
|
||||
href: `${docLinks.links.observability.monitorUptime}`,
|
||||
},
|
||||
{
|
||||
linkType: 'discuss',
|
||||
|
|
|
@ -26,7 +26,7 @@ export const initDurationAnomalyAlertType: AlertTypeInitializer = ({
|
|||
id: CLIENT_ALERT_TYPES.DURATION_ANOMALY,
|
||||
iconClass: 'uptimeApp',
|
||||
documentationUrl(docLinks) {
|
||||
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/observability/${docLinks.DOC_LINK_VERSION}/duration-anomaly-alert.html`;
|
||||
return `${docLinks.links.observability.uptimeDurationAnomaly}`;
|
||||
},
|
||||
alertParamsExpression: (params: unknown) => (
|
||||
<DurationAnomalyAlert core={core} plugins={plugins} params={params} />
|
||||
|
|
|
@ -37,7 +37,7 @@ export const initMonitorStatusAlertType: AlertTypeInitializer = ({
|
|||
description,
|
||||
iconClass: 'uptimeApp',
|
||||
documentationUrl(docLinks) {
|
||||
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/observability/${docLinks.DOC_LINK_VERSION}/monitor-status-alert.html`;
|
||||
return `${docLinks.links.observability.monitorStatus}`;
|
||||
},
|
||||
alertParamsExpression: (params: any) => (
|
||||
<MonitorStatusAlert core={core} plugins={plugins} params={params} />
|
||||
|
|
|
@ -23,7 +23,7 @@ export const initTlsAlertType: AlertTypeInitializer = ({
|
|||
id: CLIENT_ALERT_TYPES.TLS,
|
||||
iconClass: 'uptimeApp',
|
||||
documentationUrl(docLinks) {
|
||||
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/observability/${docLinks.DOC_LINK_VERSION}/tls-certificate-alert.html`;
|
||||
return `${docLinks.links.observability.tlsCertificate}`;
|
||||
},
|
||||
alertParamsExpression: (params: any) => (
|
||||
<TLSAlert core={core} plugins={plugins} params={params} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue