From fdd958b0e921f448bf8e7aed28d0b81a1b5374a3 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 18 Mar 2025 12:48:44 -0700 Subject: [PATCH 01/12] Add link for publicBaseUrl setting --- .../apps/browser-internal/src/errors/public_base_url.tsx | 2 +- src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts | 1 + src/platform/packages/shared/kbn-doc-links/src/types.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx b/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx index a0b8baf8e815c..17afd543b1ee8 100644 --- a/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx +++ b/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx @@ -71,7 +71,7 @@ export const setupPublicBaseUrlConfigWarning = ({ }} />{' '} diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 005d5fba9fd68..c3855196a8a20 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -416,6 +416,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D }, server: { protocol: `${KIBANA_DOCS}settings.html#server-protocol`, + publicBaseUrl: `${KIBANA_DOCS}settings.html#server-publicBaseUrl`, }, logging: { enableDeprecationHttpDebugLogs: `${KIBANA_DOCS}logging-settings.html#enable-http-debug-logs`, diff --git a/src/platform/packages/shared/kbn-doc-links/src/types.ts b/src/platform/packages/shared/kbn-doc-links/src/types.ts index d1f7f3a2a7930..4a4164fe86509 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/types.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/types.ts @@ -281,6 +281,7 @@ export interface DocLinks { }; readonly server: { readonly protocol: string; + readonly publicBaseUrl: string; }; readonly logging: { readonly enableDeprecationHttpDebugLogs: string; From d8a8523974b52f8274761dbbfdc739e15db8f533 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 18 Mar 2025 21:10:38 -0700 Subject: [PATCH 02/12] Update API links in doc link service --- .../shared/kbn-doc-links/src/get_doc_links.ts | 103 ++++++++++++------ .../shared/kbn-doc-links/src/types.ts | 1 - 2 files changed, 71 insertions(+), 33 deletions(-) diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index c3855196a8a20..11b7c65920aed 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -705,41 +705,80 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D skippingDisconnectedClusters: `${ELASTICSEARCH_DOCS}modules-cross-cluster-search.html#skip-unavailable-clusters`, }, apis: { - bulkIndexAlias: `${ELASTICSEARCH_DOCS}indices-aliases.html`, - indexStats: `${ELASTICSEARCH_DOCS}indices-stats.html`, + bulkIndexAlias: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-update-aliases` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases`, + indexStats: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-update-aliases` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats`, byteSizeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#byte-units`, - createAutoFollowPattern: `${ELASTICSEARCH_DOCS}ccr-put-auto-follow-pattern.html`, - createFollower: `${ELASTICSEARCH_DOCS}ccr-put-follow.html`, - createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`, - createSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`, - createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`, - createRoleMappingTemplates: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html#_role_templates`, - createRollupJobsRequest: `${ELASTICSEARCH_DOCS}rollup-put-job.html#rollup-put-job-api-request-body`, - createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`, - createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`, - createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`, + createAutoFollowPattern: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern`, + createFollower: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow`, + createIndex: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-create` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create`, + createSnapshotLifecyclePolicy: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle`, + createRoleMapping: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping`, + createRoleMappingTemplates: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping`, + createRollupJobsRequest: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-put-job#operation-rollup-put-job-body-application-json`, + createApiKey: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-security-create-api-key` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key`, + createPipeline: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ingest-put-pipeline` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-pipeline`, + createTransformRequest: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json`, cronExpressions: `${ELASTICSEARCH_DOCS}cron-expressions.html`, - executeWatchActionModes: `${ELASTICSEARCH_DOCS}watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode`, - indexExists: `${ELASTICSEARCH_DOCS}indices-exists.html`, - inferTrainedModel: `${ELASTICSEARCH_DOCS}infer-trained-model.html`, - multiSearch: `${ELASTICSEARCH_DOCS}search-multi-search.html`, - openIndex: `${ELASTICSEARCH_DOCS}indices-open-close.html`, - putComponentTemplate: `${ELASTICSEARCH_DOCS}indices-component-template.html`, - painlessExecute: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html`, - painlessExecuteAPIContexts: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html#_contexts`, - putComponentTemplateMetadata: `${ELASTICSEARCH_DOCS}indices-component-template.html#component-templates-metadata`, - putEnrichPolicy: `${ELASTICSEARCH_DOCS}put-enrich-policy-api.html`, - putIndexTemplateV1: `${ELASTICSEARCH_DOCS}indices-templates-v1.html`, - putSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`, - putWatch: `${ELASTICSEARCH_DOCS}watcher-api-put-watch.html`, - restApis: `${ELASTICSEARCH_DOCS}rest-apis.html`, - searchPreference: `${ELASTICSEARCH_DOCS}search-search.html#search-preference`, - securityApis: `${ELASTICSEARCH_DOCS}security-api.html`, - simulatePipeline: `${ELASTICSEARCH_DOCS}simulate-pipeline-api.html`, - tasks: `${ELASTICSEARCH_DOCS}tasks.html`, + executeWatchActionModes: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json`, + indexExists: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-exists` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists`, + inferTrainedModel: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ml-infer-trained-model` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model`, + multiSearch: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-msearch` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch`, + openIndex: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open`, + putComponentTemplate: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-cluster-put-component-template` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template`, + painlessExecute: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-scripts-painless-execute` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scripts-painless-execute`, + painlessExecuteAPIContexts: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`, + putComponentTemplateMetadata: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`, + putEnrichPolicy: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-enrich-put-policy` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy`, + putIndexTemplateV1: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template`, + putSnapshotLifecyclePolicy: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle`, + putWatch: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch`, + restApis: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/` + : `https://www.elastic.co/docs/api/doc/elasticsearch/`, + searchPreference: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-search#operation-search-preference` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-preference`, + securityApis: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/group/endpoint-security` + : `https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-security`, + simulatePipeline: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ingest-simulate` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate`, + tasks: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/group/endpoint-tasks` + : `https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks`, timeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#time-units`, - unfreezeIndex: `${ELASTICSEARCH_DOCS}unfreeze-index-api.html`, - updateTransform: `${ELASTICSEARCH_DOCS}update-transform.html`, + updateTransform: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-transform-update-transform` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform`, }, plugins: { azureRepo: `${ELASTICSEARCH_DOCS}repository-azure.html`, diff --git a/src/platform/packages/shared/kbn-doc-links/src/types.ts b/src/platform/packages/shared/kbn-doc-links/src/types.ts index 4a4164fe86509..5266fbf43cc24 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/types.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/types.ts @@ -380,7 +380,6 @@ export interface DocLinks { simulatePipeline: string; tasks: string; timeUnits: string; - unfreezeIndex: string; updateTransform: string; }>; readonly observability: Readonly<{ From 78da063652a8fdb50e9f862d6384b412c953759a Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 18 Mar 2025 21:38:46 -0700 Subject: [PATCH 03/12] Add API link variables --- .../shared/kbn-doc-links/src/get_doc_links.ts | 119 +++++++++--------- .../shared/kbn-doc-links/src/get_doc_meta.ts | 1 + .../shared/kbn-doc-links/src/types.ts | 1 + 3 files changed, 65 insertions(+), 56 deletions(-) diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 11b7c65920aed..c7fbb28785872 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -24,8 +24,11 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D const ELASTIC_WEBSITE_URL = meta.elasticWebsiteUrl; const ELASTIC_GITHUB = meta.elasticGithubUrl; const SEARCH_LABS_URL = meta.searchLabsUrl; + const API_DOCS = meta.apiDocsUrl; const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`; + const ELASTICSEARCH_APIS = `${API_DOCS}doc/elasticsearch/` + const ELASTICSEARCH_SERVERLESS_APIS = `${API_DOCS}doc/elasticsearch-serverless/`; const KIBANA_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/`; const FLEET_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/fleet/${DOC_LINK_VERSION}/`; const INTEGRATIONS_DEV_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/integrations-developer/current/`; @@ -171,7 +174,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D elser: `${ELASTICSEARCH_DOCS}semantic-search-semantic-text.html`, engines: `${ENTERPRISE_SEARCH_DOCS}engines.html`, indexApi: `${ELASTICSEARCH_DOCS}docs-index_.html`, - inferenceApiCreate: `${ELASTICSEARCH_DOCS}put-inference-api.html`, + inferenceApiCreate: isServerless + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-inference-put` + : `${ELASTICSEARCH_APIS}operation/operation-inference-put`, inferenceApisConfigureChunking: `${ELASTICSEARCH_DOCS}inference-apis.html#infer-chunking-config`, ingestionApis: `${ELASTICSEARCH_DOCS}search-with-elasticsearch.html`, ingestPipelines: `${ELASTICSEARCH_DOCS}ingest-pipeline-search.html`, @@ -706,79 +711,79 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D }, apis: { bulkIndexAlias: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-update-aliases` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases` + : `${ELASTICSEARCH_APIS}operation/operation-indices-update-aliases`, indexStats: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-update-aliases` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases` + : `${ELASTICSEARCH_APIS}operation/operation-indices-stats`, byteSizeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#byte-units`, - createAutoFollowPattern: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern`, - createFollower: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow`, + createAutoFollowPattern: `${ELASTICSEARCH_APIS}operation/operation-ccr-put-auto-follow-pattern`, + createFollower: `${ELASTICSEARCH_APIS}operation/operation-ccr-follow`, createIndex: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-create` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create`, - createSnapshotLifecyclePolicy: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle`, - createRoleMapping: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping`, - createRoleMappingTemplates: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping`, - createRollupJobsRequest: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-put-job#operation-rollup-put-job-body-application-json`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-create` + : `${ELASTICSEARCH_APIS}operation/operation-indices-create`, + createSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`, + createRoleMapping: `${ELASTICSEARCH_APIS}operation/operation-security-put-role-mapping`, + createRoleMappingTemplates: `${ELASTICSEARCH_APIS}operation/operation-security-put-role-mapping`, + createRollupJobsRequest: `${ELASTICSEARCH_APIS}operation/operation-rollup-put-job#operation-rollup-put-job-body-application-json`, createApiKey: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-security-create-api-key` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-security-create-api-key` + : `${ELASTICSEARCH_APIS}operation/operation-security-create-api-key`, createPipeline: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ingest-put-pipeline` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-pipeline`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-put-pipeline` + : `${ELASTICSEARCH_APIS}operation/operation-ingest-put-pipeline`, createTransformRequest: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json` + : `${ELASTICSEARCH_APIS}operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json`, cronExpressions: `${ELASTICSEARCH_DOCS}cron-expressions.html`, - executeWatchActionModes: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json`, + executeWatchActionModes: `${ELASTICSEARCH_APIS}operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json`, indexExists: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-exists` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-exists` + : `${ELASTICSEARCH_APIS}operation/operation-indices-exists`, inferTrainedModel: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ml-infer-trained-model` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ml-infer-trained-model` + : `${ELASTICSEARCH_APIS}operation/operation-ml-infer-trained-model`, multiSearch: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-msearch` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch`, - openIndex: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-msearch` + : `${ELASTICSEARCH_APIS}operation/operation-msearch`, + openIndex: `${ELASTICSEARCH_APIS}operation/operation-indices-open`, putComponentTemplate: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-cluster-put-component-template` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-cluster-put-component-template` + : `${ELASTICSEARCH_APIS}operation/operation-cluster-put-component-template`, painlessExecute: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-scripts-painless-execute` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scripts-painless-execute`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-scripts-painless-execute` + : `${ELASTICSEARCH_APIS}operation/operation-scripts-painless-execute`, painlessExecuteAPIContexts: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json` + : `${ELASTICSEARCH_APIS}operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`, putComponentTemplateMetadata: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta` + : `${ELASTICSEARCH_APIS}operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`, putEnrichPolicy: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-enrich-put-policy` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy`, - putIndexTemplateV1: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template`, - putSnapshotLifecyclePolicy: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle`, - putWatch: `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-enrich-put-policy` + : `${ELASTICSEARCH_APIS}operation/operation-enrich-put-policy`, + putIndexTemplateV1: `${ELASTICSEARCH_APIS}operation/operation-indices-put-template`, + putSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`, + putWatch: `${ELASTICSEARCH_APIS}operation/operation-watcher-put-watch`, restApis: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/` - : `https://www.elastic.co/docs/api/doc/elasticsearch/`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}` + : `${ELASTICSEARCH_APIS}`, searchPreference: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-search#operation-search-preference` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-preference`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-search#operation-search-preference` + : `${ELASTICSEARCH_APIS}operation/operation-search#operation-search-preference`, securityApis: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/group/endpoint-security` - : `https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-security`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-security` + : `${ELASTICSEARCH_APIS}group/endpoint-security`, simulatePipeline: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ingest-simulate` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-simulate` + : `${ELASTICSEARCH_APIS}operation/operation-ingest-simulate`, tasks: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/group/endpoint-tasks` - : `https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-tasks` + : `${ELASTICSEARCH_APIS}group/endpoint-tasks`, timeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#time-units`, updateTransform: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-transform-update-transform` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-update-transform` + : `${ELASTICSEARCH_APIS}operation/operation-transform-update-transform`, }, plugins: { azureRepo: `${ELASTICSEARCH_DOCS}repository-azure.html`, @@ -793,14 +798,14 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D guide: `${ELASTICSEARCH_DOCS}snapshot-restore.html`, changeIndexSettings: `${ELASTICSEARCH_DOCS}index-modules.html`, createSnapshot: `${ELASTICSEARCH_DOCS}snapshots-take-snapshot.html`, - getSnapshot: `${ELASTICSEARCH_DOCS}get-snapshot-api.html`, + getSnapshot: `${ELASTICSEARCH_APIS}operation/operation-snapshot-get`, registerSharedFileSystem: `${ELASTICSEARCH_DOCS}snapshots-filesystem-repository.html#filesystem-repository-settings`, registerSourceOnly: `${ELASTICSEARCH_DOCS}snapshots-source-only-repository.html#source-only-repository-settings`, registerUrl: `${ELASTICSEARCH_DOCS}snapshots-read-only-repository.html#read-only-url-repository-settings`, restoreSnapshot: `${ELASTICSEARCH_DOCS}snapshots-restore-snapshot.html`, - restoreSnapshotApi: `${ELASTICSEARCH_DOCS}restore-snapshot-api.html#restore-snapshot-api-request-body`, + restoreSnapshotApi: `${ELASTICSEARCH_APIS}operation/operation-snapshot-restore`, searchableSnapshotSharedCache: `${ELASTICSEARCH_DOCS}searchable-snapshots.html#searchable-snapshots-shared-cache`, - slmStart: `${ELASTICSEARCH_DOCS}slm-api-start.html`, + slmStart: `${ELASTICSEARCH_APIS}operation/operation-slm-start`, }, ingest: { append: `${ELASTICSEARCH_DOCS}append-processor.html`, @@ -1012,7 +1017,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D hiddenFields: `${KIBANA_DOCS}playground-query.html#playground-hidden-fields`, }, inferenceManagement: { - inferenceAPIDocumentation: `${ELASTIC_WEBSITE_URL}docs/api/doc/elasticsearch/operation/operation-inference-put`, + inferenceAPIDocumentation: isServerless + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-inference-put` + : `${ELASTICSEARCH_APIS}operation/operation-inference-put`, }, cases: { legacyApiDeprecations: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-201004`, diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts index df7861918cc43..89cf33234dda6 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts @@ -25,5 +25,6 @@ export const getDocLinksMeta = ({ elasticGithubUrl: 'https://github.com/elastic/', docsWebsiteUrl: 'https://docs.elastic.co/', searchLabsUrl: 'https://search-labs.elastic.co/', + apiDocsUrl: 'https://www.elastic.co/docs/api/', }; }; diff --git a/src/platform/packages/shared/kbn-doc-links/src/types.ts b/src/platform/packages/shared/kbn-doc-links/src/types.ts index 5266fbf43cc24..706192eb8d549 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/types.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/types.ts @@ -17,6 +17,7 @@ export interface DocLinksMeta { elasticGithubUrl: string; docsWebsiteUrl: string; searchLabsUrl: string; + apiDocsUrl: string; } /** From 7d40e78ba3efb06c99d2615a4a7cd74ca7304d24 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 19 Mar 2025 05:36:34 +0000 Subject: [PATCH 04/12] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../packages/shared/kbn-doc-links/src/get_doc_links.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index c7fbb28785872..65bc0a841e4fe 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -27,7 +27,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D const API_DOCS = meta.apiDocsUrl; const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`; - const ELASTICSEARCH_APIS = `${API_DOCS}doc/elasticsearch/` + const ELASTICSEARCH_APIS = `${API_DOCS}doc/elasticsearch/`; const ELASTICSEARCH_SERVERLESS_APIS = `${API_DOCS}doc/elasticsearch-serverless/`; const KIBANA_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/`; const FLEET_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/fleet/${DOC_LINK_VERSION}/`; @@ -765,9 +765,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D putIndexTemplateV1: `${ELASTICSEARCH_APIS}operation/operation-indices-put-template`, putSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`, putWatch: `${ELASTICSEARCH_APIS}operation/operation-watcher-put-watch`, - restApis: isServerless - ? `${ELASTICSEARCH_SERVERLESS_APIS}` - : `${ELASTICSEARCH_APIS}`, + restApis: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}` : `${ELASTICSEARCH_APIS}`, searchPreference: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-search#operation-search-preference` : `${ELASTICSEARCH_APIS}operation/operation-search#operation-search-preference`, From e47fc392460ce56ed6b2ba3e04fdeb75531e583f Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 19 Mar 2025 07:56:27 -0700 Subject: [PATCH 05/12] Comment out hard-coded URL test in index_details_page.test.tsx --- .../index_details_page.test.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index d2c8f7bdad3ff..2b2c868475019 100644 --- a/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -222,14 +222,14 @@ describe('', () => { expect(tabContent).toEqual(JSON.stringify(testIndexStats, null, 2)); }); - it('sets the docs link href from the documenation service', async () => { - await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats); - const docsLinkHref = testBed.actions.stats.getDocsLinkHref(); - // the url from the mocked docs mock - expect(docsLinkHref).toEqual( - 'https://www.elastic.co/guide/en/elasticsearch/reference/mocked-test-branch/indices-stats.html' - ); - }); + // it('sets the docs link href from the documenation service', async () => { + // await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats); + // const docsLinkHref = testBed.actions.stats.getDocsLinkHref(); + // // the url from the mocked docs mock + // expect(docsLinkHref).toEqual( + // 'https://www.elastic.co/guide/en/elasticsearch/reference/mocked-test-branch/indices-stats.html' + // ); + // }); it('renders a warning message if an index is not open', async () => { const testIndexMockWithClosedStatus = { From a55c007ee42b18fafb353802230734783a59cfd0 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 19 Mar 2025 14:17:01 -0700 Subject: [PATCH 06/12] Update apiReference link, revert changes to public_base_url.tsx --- .../apps/browser-internal/src/errors/public_base_url.tsx | 2 +- .../packages/shared/kbn-doc-links/src/get_doc_links.ts | 3 +-- src/platform/packages/shared/kbn-doc-links/src/types.ts | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx b/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx index 17afd543b1ee8..a0b8baf8e815c 100644 --- a/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx +++ b/src/core/packages/apps/browser-internal/src/errors/public_base_url.tsx @@ -71,7 +71,7 @@ export const setupPublicBaseUrlConfigWarning = ({ }} />{' '} diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 65bc0a841e4fe..7da9c9b588454 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -49,7 +49,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D elasticStackGetStarted: isServerless ? `${SERVERLESS_DOCS}intro.html` : `${ELASTIC_WEBSITE_URL}guide/en/index.html`, - apiReference: `${ELASTIC_WEBSITE_URL}guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current/api-reference.html`, + apiReference: `${API_DOCS}`, upgrade: { upgradingStackOnPrem: `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/current/upgrading-elastic-stack-on-prem.html`, upgradingStackOnCloud: `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/current/upgrade-elastic-stack-for-elastic-cloud.html`, @@ -421,7 +421,6 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D }, server: { protocol: `${KIBANA_DOCS}settings.html#server-protocol`, - publicBaseUrl: `${KIBANA_DOCS}settings.html#server-publicBaseUrl`, }, logging: { enableDeprecationHttpDebugLogs: `${KIBANA_DOCS}logging-settings.html#enable-http-debug-logs`, diff --git a/src/platform/packages/shared/kbn-doc-links/src/types.ts b/src/platform/packages/shared/kbn-doc-links/src/types.ts index 706192eb8d549..fa9fd426b2e59 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/types.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/types.ts @@ -282,7 +282,6 @@ export interface DocLinks { }; readonly server: { readonly protocol: string; - readonly publicBaseUrl: string; }; readonly logging: { readonly enableDeprecationHttpDebugLogs: string; From 44868234c13302b80c4884e82581fe8947728efe Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 19 Mar 2025 14:31:08 -0700 Subject: [PATCH 07/12] Update URL for upgradeAssistant.unfreezeApi --- src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 7da9c9b588454..97a0641371ece 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -306,7 +306,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D overview: `${KIBANA_DOCS}upgrade-assistant.html`, batchReindex: `${KIBANA_DOCS}batch-start-resume-reindex.html`, remoteReindex: `${ELASTICSEARCH_DOCS}docs-reindex.html#reindex-from-remote`, - unfreezeApi: `${ELASTICSEARCH_DOCS}unfreeze-index-api.html`, + unfreezeApi: `https://www.elastic.co/guide/en/elastic-stack/9.0/release-notes-elasticsearch-9.0.0.html#remove_unfreeze_rest_endpoint`, reindexWithPipeline: `${ELASTICSEARCH_DOCS}docs-reindex.html#reindex-with-an-ingest-pipeline`, }, rollupJobs: `${KIBANA_DOCS}data-rollups.html`, From 94d4437838d10e67c88b68996e7d4729a4702c04 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Thu, 20 Mar 2025 14:31:24 -0700 Subject: [PATCH 08/12] Update x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx Co-authored-by: Ignacio Rivas --- .../index_details_page.test.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index 2b2c868475019..4f461174350ec 100644 --- a/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -222,14 +222,13 @@ describe('', () => { expect(tabContent).toEqual(JSON.stringify(testIndexStats, null, 2)); }); - // it('sets the docs link href from the documenation service', async () => { - // await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats); - // const docsLinkHref = testBed.actions.stats.getDocsLinkHref(); - // // the url from the mocked docs mock - // expect(docsLinkHref).toEqual( - // 'https://www.elastic.co/guide/en/elasticsearch/reference/mocked-test-branch/indices-stats.html' - // ); - // }); + it('sets the docs link href from the documentation service', async () => { + await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats); + const docsLinkHref = testBed.actions.stats.getDocsLinkHref(); + + expect(docsLinkHref).toMatch(/^https:\/\/www\.elastic\.co\//); + expect(docsLinkHref).toContain('indices-stats'); + }); it('renders a warning message if an index is not open', async () => { const testIndexMockWithClosedStatus = { From a580201cb9a2ec5ec3fed6d5000f3aee71a6a481 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 20 Mar 2025 21:53:38 +0000 Subject: [PATCH 09/12] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../index_details_page/index_details_page.test.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index 4f461174350ec..65cb46ece576b 100644 --- a/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -222,13 +222,13 @@ describe('', () => { expect(tabContent).toEqual(JSON.stringify(testIndexStats, null, 2)); }); - it('sets the docs link href from the documentation service', async () => { - await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats); - const docsLinkHref = testBed.actions.stats.getDocsLinkHref(); - - expect(docsLinkHref).toMatch(/^https:\/\/www\.elastic\.co\//); - expect(docsLinkHref).toContain('indices-stats'); - }); + it('sets the docs link href from the documentation service', async () => { + await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats); + const docsLinkHref = testBed.actions.stats.getDocsLinkHref(); + + expect(docsLinkHref).toMatch(/^https:\/\/www\.elastic\.co\//); + expect(docsLinkHref).toContain('indices-stats'); + }); it('renders a warning message if an index is not open', async () => { const testIndexMockWithClosedStatus = { From 6c67573e89281dacebe36f69c8f2bae3523ce6bf Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 8 Apr 2025 18:46:00 -0700 Subject: [PATCH 10/12] Update more API URLs --- .../shared/kbn-doc-links/src/get_doc_links.ts | 29 ++++++++++++------- .../shared/kbn-doc-links/src/get_doc_meta.ts | 2 +- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 0e16749bcd810..2ec00c65d810b 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -25,11 +25,14 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D const ELASTIC_GITHUB = meta.elasticGithubUrl; const SEARCH_LABS_URL = meta.searchLabsUrl; const API_DOCS = meta.apiDocsUrl; + const ELASTIC_DOCS = meta.docsWebsiteUrl; const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`; const ELASTICSEARCH_APIS = `${API_DOCS}doc/elasticsearch/`; const ELASTICSEARCH_SERVERLESS_APIS = `${API_DOCS}doc/elasticsearch-serverless/`; const KIBANA_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/`; + const KIBANA_APIS = `${API_DOCS}doc/kibana/`; + const KIBANA_SERVERLESS_APIS = `{$API_DOCS}doc/serverless/`; const FLEET_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/fleet/${DOC_LINK_VERSION}/`; const INTEGRATIONS_DEV_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/integrations-developer/current/`; const PLUGIN_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/plugins/${DOC_LINK_VERSION}/`; @@ -131,7 +134,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D behavioralAnalyticsCORS: `${ELASTICSEARCH_DOCS}behavioral-analytics-cors.html`, behavioralAnalyticsEvents: `${ELASTICSEARCH_DOCS}behavioral-analytics-event.html`, buildConnector: `${ELASTICSEARCH_DOCS}es-build-connector.html`, - bulkApi: `${ELASTICSEARCH_DOCS}docs-bulk.html`, + bulkApi: isServerless + ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-bulk` + : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk`, configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`, connectors: `${ELASTICSEARCH_DOCS}es-connectors.html`, connectorsClientDeploy: `${ELASTICSEARCH_DOCS}es-build-connector.html#es-connectors-deploy-connector-service`, @@ -174,11 +179,13 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D e5Model: `${MACHINE_LEARNING_DOCS}ml-nlp-e5.html`, elser: `${ELASTICSEARCH_DOCS}semantic-search-semantic-text.html`, engines: `${ENTERPRISE_SEARCH_DOCS}engines.html`, - indexApi: `${ELASTICSEARCH_DOCS}docs-index_.html`, + indexApi: isServerless + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-create` + : `${ELASTICSEARCH_APIS}operation/operation-create`, inferenceApiCreate: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-inference-put` : `${ELASTICSEARCH_APIS}operation/operation-inference-put`, - inferenceApisConfigureChunking: `${ELASTICSEARCH_DOCS}inference-apis.html#infer-chunking-config`, + inferenceApisConfigureChunking: `${ELASTIC_DOCS}explore-analyze/elastic-inference/inference-api#infer-chunking-config`, ingestionApis: `${ELASTICSEARCH_DOCS}search-with-elasticsearch.html`, ingestPipelines: `${ELASTICSEARCH_DOCS}ingest-pipeline-search.html`, knnSearch: `${ELASTICSEARCH_DOCS}knn-search.html`, @@ -300,7 +307,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D autocompleteSuggestions: `${KIBANA_DOCS}kibana-concepts-analysts.html#autocomplete-suggestions`, secureSavedObject: `${KIBANA_DOCS}xpack-security-secure-saved-objects.html`, xpackSecurity: `${KIBANA_DOCS}xpack-security.html`, - restApis: `${KIBANA_DOCS}api.html`, + restApis: isServerless ? `${KIBANA_SERVERLESS_APIS}` : `${KIBANA_APIS}`, dashboardImportExport: `${KIBANA_DOCS}dashboard-api.html`, upgradeNotes: `${KIBANA_DOCS}breaking-changes-summary.html`, }, @@ -504,7 +511,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`, timelionSettings: `${KIBANA_DOCS}advanced-options.html#kibana-timelion-settings`, generalSettings: `${KIBANA_DOCS}advanced-options.html#kibana-general-settings`, - savedObjectsApiList: `${KIBANA_DOCS}saved-objects-api.html#saved-objects-api`, + savedObjectsApiList: isServerless + ? `${KIBANA_SERVERLESS_APIS}group/endpoint-saved-objects` + : `${KIBANA_APIS}group/endpoint-saved-objects`, apiKeys: `${KIBANA_DOCS}api-keys.html`, }, ml: { @@ -719,7 +728,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D indexStats: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases` : `${ELASTICSEARCH_APIS}operation/operation-indices-stats`, - byteSizeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#byte-units`, + byteSizeUnits: `https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#byte-units`, createAutoFollowPattern: `${ELASTICSEARCH_APIS}operation/operation-ccr-put-auto-follow-pattern`, createFollower: `${ELASTICSEARCH_APIS}operation/operation-ccr-follow`, createIndex: isServerless @@ -736,9 +745,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-put-pipeline` : `${ELASTICSEARCH_APIS}operation/operation-ingest-put-pipeline`, createTransformRequest: isServerless - ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json` - : `${ELASTICSEARCH_APIS}operation/operation-transform-put-transform#operation-transform-put-transform-body-application-json`, - cronExpressions: `${ELASTICSEARCH_DOCS}cron-expressions.html`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-put-transform` + : `${ELASTICSEARCH_APIS}operation/operation-transform-put-transform`, + cronExpressions: `${ELASTIC_DOCS}reference/elasticsearch/rest-apis/api-conventions#api-cron-expressions`, executeWatchActionModes: `${ELASTICSEARCH_APIS}operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json`, indexExists: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-exists` @@ -781,7 +790,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D tasks: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-tasks` : `${ELASTICSEARCH_APIS}group/endpoint-tasks`, - timeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#time-units`, + timeUnits: `${ELASTIC_DOCS}reference/elasticsearch/rest-apis/api-conventions#time-units`, updateTransform: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-update-transform` : `${ELASTICSEARCH_APIS}operation/operation-transform-update-transform`, diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts index 89cf33234dda6..80da5190e0cfc 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts @@ -23,7 +23,7 @@ export const getDocLinksMeta = ({ ecs_version: 'current', elasticWebsiteUrl: 'https://www.elastic.co/', elasticGithubUrl: 'https://github.com/elastic/', - docsWebsiteUrl: 'https://docs.elastic.co/', + docsWebsiteUrl: 'https://www.elastic.co/docs/', searchLabsUrl: 'https://search-labs.elastic.co/', apiDocsUrl: 'https://www.elastic.co/docs/api/', }; From 1073524b64313dea4d5d8c87dbd7e612d8aa9302 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 8 Apr 2025 18:50:30 -0700 Subject: [PATCH 11/12] Use more shared variables --- .../packages/shared/kbn-doc-links/src/get_doc_links.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 2ec00c65d810b..ed8d01216b41c 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -135,8 +135,8 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D behavioralAnalyticsEvents: `${ELASTICSEARCH_DOCS}behavioral-analytics-event.html`, buildConnector: `${ELASTICSEARCH_DOCS}es-build-connector.html`, bulkApi: isServerless - ? `https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-bulk` - : `https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk`, + ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-bulk` + : `${ELASTICSEARCH_APIS}operation/operation-bulk`, configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`, connectors: `${ELASTICSEARCH_DOCS}es-connectors.html`, connectorsClientDeploy: `${ELASTICSEARCH_DOCS}es-build-connector.html#es-connectors-deploy-connector-service`, @@ -728,7 +728,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D indexStats: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases` : `${ELASTICSEARCH_APIS}operation/operation-indices-stats`, - byteSizeUnits: `https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#byte-units`, + byteSizeUnits: `${ELASTIC_DOCS}reference/elasticsearch/rest-apis/api-conventions#byte-units`, createAutoFollowPattern: `${ELASTICSEARCH_APIS}operation/operation-ccr-put-auto-follow-pattern`, createFollower: `${ELASTICSEARCH_APIS}operation/operation-ccr-follow`, createIndex: isServerless From e05251b6c845033996498f9010e21a2c1290b910 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Wed, 9 Apr 2025 09:55:00 +0200 Subject: [PATCH 12/12] update snapshots --- .../__snapshots__/not_found_errors.test.tsx.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/plugins/shared/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap b/src/platform/plugins/shared/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap index 6e96c51be7be3..72d9862c3f9cf 100644 --- a/src/platform/plugins/shared/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap +++ b/src/platform/plugins/shared/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap @@ -29,7 +29,7 @@ exports[`NotFoundErrors component renders correctly for index-pattern type 1`] = @@ -80,7 +80,7 @@ exports[`NotFoundErrors component renders correctly for index-pattern-field type @@ -131,7 +131,7 @@ exports[`NotFoundErrors component renders correctly for search type 1`] = ` @@ -180,7 +180,7 @@ exports[`NotFoundErrors component renders correctly for unknown type 1`] = `