Skip to content

Commit

Permalink
Add documentation links for serverless management apps (elastic#173343)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Dec 18, 2023
1 parent 13f2779 commit 296e69a
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
const SERVERLESS_DOCS = `${DOCS_WEBSITE_URL}serverless/`;
const SERVERLESS_ELASTICSEARCH_DOCS = `${SERVERLESS_DOCS}elasticsearch/`;
const SEARCH_LABS_REPO = `${ELASTIC_GITHUB}elasticsearch-labs/`;
const isServerless = buildFlavor === 'serverless';

return deepFreeze({
settings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/settings.html`,
Expand Down Expand Up @@ -316,7 +317,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
luceneExpressions: `${ELASTICSEARCH_DOCS}modules-scripting-expression.html`,
},
indexPatterns: {
introduction: `${KIBANA_DOCS}data-views.html`,
introduction: isServerless ? `${SERVERLESS_DOCS}data-views` : `${KIBANA_DOCS}data-views.html`,
fieldFormattersNumber: `${KIBANA_DOCS}numeral.html`,
fieldFormattersString: `${KIBANA_DOCS}managing-data-views.html#string-field-formatters`,
runtimeFields: `${KIBANA_DOCS}managing-data-views.html#runtime-fields`,
Expand Down Expand Up @@ -486,7 +487,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
},
management: {
dashboardSettings: `${KIBANA_DOCS}advanced-options.html#kibana-dashboard-settings`,
indexManagement: `${ELASTICSEARCH_DOCS}index-mgmt.html`,
indexManagement: isServerless
? `${SERVERLESS_DOCS}index-management`
: `${ELASTICSEARCH_DOCS}index-mgmt.html`,
kibanaSearchSettings: `${KIBANA_DOCS}advanced-options.html#kibana-search-settings`,
discoverSettings: `${KIBANA_DOCS}advanced-options.html#kibana-discover-settings`,
visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`,
Expand Down Expand Up @@ -529,7 +532,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
nlpImportModel: `${MACHINE_LEARNING_DOCS}ml-nlp-import-model.html`,
},
transforms: {
guide: `${ELASTICSEARCH_DOCS}transforms.html`,
guide: isServerless ? `${SERVERLESS_DOCS}transforms` : `${ELASTICSEARCH_DOCS}transforms.html`,
alertingRules: `${ELASTICSEARCH_DOCS}transform-alerts.html`,
},
visualize: {
Expand Down Expand Up @@ -562,8 +565,12 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
sloBurnRateRule: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/slo-burn-rate-alert.html`,
},
alerting: {
guide: `${KIBANA_DOCS}create-and-manage-rules.html`,
actionTypes: `${KIBANA_DOCS}action-types.html`,
guide: isServerless
? `${SERVERLESS_DOCS}rules`
: `${KIBANA_DOCS}create-and-manage-rules.html`,
actionTypes: isServerless
? `${SERVERLESS_DOCS}action-connectors`
: `${KIBANA_DOCS}action-types.html`,
apmRules: `${KIBANA_DOCS}apm-alerts.html`,
emailAction: `${KIBANA_DOCS}email-action-type.html`,
emailActionConfig: `${KIBANA_DOCS}email-action-type.html`,
Expand All @@ -573,7 +580,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
indexAction: `${KIBANA_DOCS}index-action-type.html`,
esQuery: `${KIBANA_DOCS}rule-type-es-query.html`,
indexThreshold: `${KIBANA_DOCS}rule-type-index-threshold.html`,
maintenanceWindows: `${KIBANA_DOCS}maintenance-windows.html`,
maintenanceWindows: isServerless
? `${SERVERLESS_DOCS}maintenance-windows`
: `${KIBANA_DOCS}maintenance-windows.html`,
pagerDutyAction: `${KIBANA_DOCS}pagerduty-action-type.html`,
preconfiguredConnectors: `${KIBANA_DOCS}pre-configured-connectors.html`,
preconfiguredAlertHistoryConnector: `${KIBANA_DOCS}pre-configured-connectors.html#preconfigured-connector-alert-history`,
Expand All @@ -590,7 +599,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
},
maps: {
connectToEms: `${KIBANA_DOCS}maps-connect-to-ems.html`,
guide: `${KIBANA_DOCS}maps.html`,
guide: isServerless ? `${SERVERLESS_DOCS}maps` : `${KIBANA_DOCS}maps.html`,
importGeospatialPrivileges: `${KIBANA_DOCS}import-geospatial-data.html#import-geospatial-privileges`,
gdalTutorial: `${ELASTIC_WEBSITE_URL}blog/how-to-ingest-geospatial-data-into-elasticsearch-with-gdal`,
termJoinsExample: `${KIBANA_DOCS}terms-join.html#_example_term_join`,
Expand Down Expand Up @@ -730,7 +739,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
kv: `${ELASTICSEARCH_DOCS}kv-processor.html`,
lowercase: `${ELASTICSEARCH_DOCS}lowercase-processor.html`,
pipeline: `${ELASTICSEARCH_DOCS}pipeline-processor.html`,
pipelines: `${ELASTICSEARCH_DOCS}ingest.html`,
pipelines: isServerless
? `${SERVERLESS_DOCS}ingest-pipelines`
: `${ELASTICSEARCH_DOCS}ingest.html`,
csvPipelines: `${ELASTIC_WEBSITE_URL}guide/en/ecs/${DOC_LINK_VERSION}/ecs-converting.html`,
pipelineFailure: `${ELASTICSEARCH_DOCS}ingest.html#handling-pipeline-failures`,
processors: `${ELASTICSEARCH_DOCS}processors.html`,
Expand Down Expand Up @@ -770,7 +781,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
installElasticAgentStandalone: `${FLEET_DOCS}install-standalone-elastic-agent.html`,
upgradeElasticAgent: `${FLEET_DOCS}upgrade-elastic-agent.html`,
learnMoreBlog: `${ELASTIC_WEBSITE_URL}blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic`,
apiKeysLearnMore: `${KIBANA_DOCS}api-keys.html`,
apiKeysLearnMore: isServerless ? `${SERVERLESS_DOCS}api-keys` : `${KIBANA_DOCS}api-keys.html`,
onPremRegistry: `${FLEET_DOCS}air-gapped.html`,
packageSignatures: `${FLEET_DOCS}package-signatures.html`,
secureLogstash: `${FLEET_DOCS}secure-logstash-connections.html`,
Expand Down

0 comments on commit 296e69a

Please sign in to comment.