SKA: Update broken references and URLs (#206836)

## Summary

Updates a number of broken file references and broken links.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
This commit is contained in:
Gerard Soldevila 2025-01-28 04:32:48 +01:00 committed by GitHub
parent 0bbea50917
commit fb26c1c683
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
106 changed files with 336 additions and 302 deletions

View file

@ -44,7 +44,7 @@ This documentation is being automatically generated using an
There is one extra step required to have your API docs show up in the _navigation_ of the docs system. Follow
the instructions <DocLink id="docsSetup" section="configure-the-nav-for-your-content" text="here" /> to learn how to
configure the navigation menu. The nav file you need to
edit is: [https://github.com/elastic/elastic-docs/blob/main/config/nav-kibana-dev.ts](https://github.com/elastic/elastic-docs/blob/main/config/nav-kibana-dev.ts)
edit is: [https://github.com/elastic/elastic-docs-prototype/blob/master/config/nav-kibana-dev.ts](https://github.com/elastic/elastic-docs-prototype/blob/master/config/nav-kibana-dev.ts)
Your API docs will exist in the top level [`api_docs` folder](https://github.com/elastic/kibana/tree/main/api_docs) and will use a doc id of the pattern `kib${PluginName}PluginApi`.
@ -70,7 +70,7 @@ In the short term, the best thing you can do is avoid deeply nested API items. U
adding `serviceFolders` in your kibana.jsonc. This will automatically split your docs up based on which APIs are defined within the service folders.
They will get built into a doc with an id of
`kib${PluginName}${ServiceName}PluginApi`. The data plugin does this, so you
can [check that out as an example](https://github.com/elastic/kibana/blob/main/src/plugins/data/kibana.json#L13).
can [check that out as an example](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/data/kibana.jsonc#L11-L15).
If that isn't the case and you are still experiencing performance issues, please file an issue!
@ -78,4 +78,3 @@ They will get built into a doc with an id of
If you have any questions or issues, please reach out to the Kibana Tech Leads or create an issue [here](https://github.com/elastic/kibana/issues)
and use the label `APIDocs`.

View file

@ -42,7 +42,7 @@ all of our apps are accessible.
## Localization
Kibana is translated into other languages. Use our i18n utilities to ensure your public facing strings will be translated to ensure all Kibana apps are localized. Read and adhere to our [i18n guidelines](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/GUIDELINE.md)
Kibana is translated into other languages. Use our i18n utilities to ensure your public facing strings will be translated to ensure all Kibana apps are localized. Read and adhere to our [i18n guidelines](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/GUIDELINE.md)
<DocCallOut title="Internal only">
Elasticians, check out the #kibana-localization channel to ask questions and receive guidance.

View file

@ -35,7 +35,7 @@ Internal plugin details can be kept alongside the code it describes. Information
<DocCallOut title="Internal only">
Only `mdx` files with the appropriate <DocLink id="docsSyntax" section="frontmatter" text="frontmatter"/> are rendered inside the Developer Guide. Read about the syntax <DocLink id="docsSyntax" text="here"/>. Edit [kibana/nav-kibana-dev.docnav.json](https://github.com/elastic/kibana/blob/main/nav-kibana-dev.docnav.json) to have a link to your document appear in the navigation menu. Read <DocLink id="kibDevDocsBestPractices" text="these instructions" /> for more details on how to add new content and test locally.
Only `mdx` files with the appropriate <DocLink id="docsSyntax" section="frontmatter" text="frontmatter"/> are rendered inside the Developer Guide. Read about the syntax <DocLink id="docsSyntax" text="here"/>. Edit [kibana/nav-kibana-dev.docnav.json](https://github.com/elastic/kibana/blob/main/dev_docs/nav-kibana-dev.docnav.json) to have a link to your document appear in the navigation menu. Read <DocLink id="kibDevDocsBestPractices" text="these instructions" /> for more details on how to add new content and test locally.
</DocCallOut>
@ -171,7 +171,7 @@ There are three great ways to debug issues with the API infrastructure.
1. Write a test
[api_doc_suite.test.ts](https://github.com/elastic/kibana/blob/main/packages/kbn-docs-utils/src/tests/api_doc_suite.test.ts) is a pretty comprehensive test suite that builds the test docs inside the [**fixtures** folder](https://github.com/elastic/kibana/tree/main/packages/kbn-docs-utils/src/tests/__fixtures__/src).
[api_doc_suite.test.ts](https://github.com/elastic/kibana/blob/main/packages/kbn-docs-utils/src/integration_tests/api_doc_suite.test.ts) is a pretty comprehensive test suite that builds the test docs inside the [**fixtures** folder](https://github.com/elastic/kibana/tree/main/packages/kbn-docs-utils/src/integration_tests/__fixtures__/src).
Edit the code inside `__fixtures__` to replicate the bug, write a test to track what should happen, then run `yarn jest api_doc_suite`.

View file

@ -40,6 +40,6 @@ node scripts/makelogs --auth <username>:<password>
<DocCallOut color="warning" title="Internal only">
Security and Observability solution applications only work if data exists in particularly named indices, abiding by our [ECS format](https://www.elastic.co/guide/en/ecs/current/index.html). If you would like to use these applications with realistic data, check out the [oblt_cli tool](https://github.com/elastic/observability-test-environments/blob/master/tools/oblt_cli/README.md). This tool sets you up to connect to a remote Elasticsearch cluster that contains the appropriate data via CCS.
Security and Observability solution applications only work if data exists in particularly named indices, abiding by our [ECS format](https://www.elastic.co/guide/en/ecs/current/index.html). If you would like to use these applications with realistic data, check out the [oblt_cli tool](https://github.com/elastic/observability-test-environments/blob/main/docs/tools/oblt-cli/CONTRIBUTING.md). This tool sets you up to connect to a remote Elasticsearch cluster that contains the appropriate data via CCS.
</DocCallOut>

View file

@ -7,4 +7,4 @@ date: 2024-05-09
tags: ['kibana', 'dev', 'contributor', 'api docs']
---
Embeddable documentation available at [/src/plugins/embeddable/README.md](https://github.com/elastic/kibana/blob/main/src/plugins/embeddable/README.md)
Embeddable documentation available at [@kbn/embeddable-plugin/README.md](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/embeddable/README.md)

View file

@ -30,7 +30,7 @@ Assuming you want to link from your app to *Discover*. When building such URL th
### Prepending a proper `basePath`
To prepend Kibana's `basePath` use the [core.http.basePath.prepend](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.ibasepath.prepend.md) helper:
To prepend Kibana's `basePath` use the [core.http.basePath.prepend](https://github.com/elastic/kibana/blob/main/src/core/packages/http/browser-internal/src/base_path.ts) helper:
```tsx
const discoverUrl = core.http.basePath.prepend(`/discover`);
@ -50,7 +50,7 @@ console.log(discoverUrl); // http://localhost:5601/bpr/s/space/app/discover
const discoverUrlWithSomeState = core.http.basePath.prepend(`/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-10T11:39:50.203Z',to:'2020-09-10T11:40:20.249Z'))&_a=(columns:!(_source),filters:!(),index:'90943e30-9a47-11e8-b64d-95841ca0b247',interval:auto,query:(language:kuery,query:''),sort:!())`);
```
Instead, each app should expose [a locator](https://github.com/elastic/kibana/blob/main/src/plugins/share/common/url_service/locators/README.md).
Instead, each app should expose [a locator](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/share/common/url_service/locators/README.md).
Other apps should use those locators for navigation or URL creation.
```tsx
@ -60,7 +60,7 @@ const discoverUrl = await plugins.discover.locator.getUrl({filters, timeRange});
await plugins.discover.locator.navigate({filters, timeRange});
```
To get a better idea, take a look at *Discover* locator [implementation](https://github.com/elastic/kibana/blob/main/src/plugins/discover/public/locator.ts).
To get a better idea, take a look at *Discover* locator [implementation](src/platform/plugins/shared/discover/public/application/context/services/locator.ts).
It allows specifying various **Discover** app state pieces like: index pattern, filters, query, time range and more.
There are two ways to access locators of other apps:
@ -86,12 +86,12 @@ window.location.href = urlToADashboard;
To navigate between different Kibana apps without a page reload there are APIs in `core`:
* [core.application.navigateToApp](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md)
* [core.application.navigateToUrl](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md)
* [core.application.navigateToApp](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetoapp.md)
* [core.application.navigateToUrl](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md)
Both methods offer customization such as opening the target in a new page, with an `options` parameter. All the options are optional be default.
* [core.application.navigateToApp options](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md)
* [core.application.navigateToUrl options](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.navigatetourloptions.md)
* [core.application.navigateToApp options](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md)
* [core.application.navigateToUrl options](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/docs/development/core/public/kibana-plugin-core-public.navigatetourloptions.md)
*Rendering a link to a different app on its own would also cause a full page reload:*
@ -156,9 +156,9 @@ Common rules to follow in this scenario:
This is required to make sure `core` is aware of navigations triggered inside your app, so it could act accordingly when needed.
* `Core`'s [ScopedHistory](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md) instance.
* [Example usage](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md)
* [Example plugin](https://github.com/elastic/kibana/blob/main/test/plugin_functional/plugins/core_plugin_a/public/application.tsx#L120)
* `Core`'s [ScopedHistory](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md) instance.
* [Example usage](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/docs/development/core/public/kibana-plugin-core-public.appmountparameters.history.md)
* [Example plugin](https://github.com/elastic/kibana/blob/005a1121cc2b50bfd931838592456716e5eb0bff/test/plugin_functional/plugins/core_plugin_a/public/application.tsx#L120)
Relative links will be resolved relative to your app's route (e.g.: `http://localhost5601/app/{your-app-id}`)
and setting up internal links in your app in SPA friendly way would look something like:
@ -212,7 +212,7 @@ There are utils to help you to implement such kind of state syncing.
- Adding a query param flag or simple key/value to the URL.
<DocCallOut>
Follow [these docs](https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/docs/state_sync#state-syncing-utilities) to learn more.
Follow [these docs](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/kibana_utils/docs/state_sync/README.md) to learn more.
</DocCallOut>
## Preserving state between navigations
@ -234,7 +234,7 @@ you'd notice that state is stored inside that link, and it also gets updated whe
![image](../assets/state_inside_the_link.png)
This is where separation into `_a` and `_g` query params comes into play. What is considered a *global* state gets constantly updated in those navigation links. In the example above it was a time filter.
This is backed by [KbnUrlTracker](https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/public/state_management/url/kbn_url_tracker.ts#L57) util. You can use it to achieve similar behavior.
This is backed by [KbnUrlTracker](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/kibana_utils/public/state_management/url/kbn_url_tracker.ts#L57) util. You can use it to achieve similar behavior.
NOTE: After migrating to KP navigation works without page reloads and all plugins are loaded simultaneously.
Hence, likely there are simpler ways to preserve state of your application, unless you want to do it through URL.

View file

@ -35,7 +35,7 @@ By filtering the network tab in Chrome for `console`, I was able to see the chun
The embedded console consisted of two parts, each being loaded asynchronously in React: the black bottom bar that expands upward to reveal the console, and the console itself:
[![Network tab of Chrome showing the console chunks](./assets/async_too_early_before.png)](./async_too_early_before.png)
[![Network tab of Chrome showing the console chunks](./assets/async_too_early_before.png)](./assets/async_too_early_before.png)
The console portion was quite large-- `181k`-- and, given the conditional nature of showing that console, this was a sure sign that _a great deal of code_ was being loaded too early.

View file

@ -50,7 +50,7 @@ First, I looked at `ml.visualizer.html` in the `target/public` directory of the
From there, we can see there's a great deal of `node_modules` being loaded, (the portions in green). While this visualization is useful in determining the size of a chunk relative to others, another visualization tool, [Statoscope](https://statoscope.tech/), is better at showing what as well as _why_ things are included in a chunk:
[![Statoscope showing the contents of the ml.chunk.23.js file](./assets/top_level_imports_stato_modules.png)](./assets/top_level_imports_stato_modules_.png)
[![Statoscope showing the contents of the ml.chunk.23.js file](./assets/top_level_imports_stato_modules.png)](./assets/top_level_imports_stato_modules.png)
Knowing what and why the module is large, now we need to find why it's being loaded.

View file

@ -49,7 +49,7 @@ If the state your plugin is storing can be provided by other plugins (your plugi
Any plugin that stores any persistable state as part of their saved object should make sure that its saved object migration
and reference extraction and injection methods correctly use the matching `PersistableStateService` implementation for the state they are storing.
Take a look at [example saved object](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/server/searchable_list_saved_object.ts#L32) which stores an embeddable state. Note how the `migrations`, `extractReferences` and `injectReferences` are defined.
Take a look at [example saved object](https://github.com/elastic/kibana/blob/8.9/examples/embeddable_examples/server/searchable_list_saved_object.ts#L32) which stores an embeddable state. Note how the `migrations`, `extractReferences` and `injectReferences` are defined.
## Storing persistable state as part of URL
@ -71,7 +71,7 @@ To support persisting your state in saved objects owned by another plugin, the <
text="Learn how to define Saved Object references"
/>
[See example embeddable providing extract/inject functions](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts)
[See example embeddable providing extract/inject functions](https://github.com/elastic/kibana/blob/8.9/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts)
### Migrations and Backward compatibility
@ -79,9 +79,9 @@ As your plugin evolves, you may need to change your state in a breaking way. If
<DocLink id="kibDevTutorialSavedObject" section="migrations" text="How to write a migration" />.
[See an example saved object storing embeddable state implementing saved object migration function](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/server/searchable_list_saved_object.ts)
[See an example saved object storing embeddable state implementing saved object migration function](https://github.com/elastic/kibana/blob/8.9/examples/embeddable_examples/server/searchable_list_saved_object.ts)
[See example embeddable providing migration functions](https://github.com/elastic/kibana/blob/main/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts)
[See example embeddable providing migration functions](https://github.com/elastic/kibana/blob/8.9/examples/embeddable_examples/public/migrations/migrations_embeddable_factory.ts)
## Telemetry

View file

@ -19,7 +19,7 @@ Here is a basic example for using the `data.search` service from a custom plugin
```ts
import { CoreStart, Plugin } from '@kbn/core/public';
import { DataPublicPluginStart, isCompleteResponse, isErrorResponse } from import { DataPublicPluginStart, isCompleteResponse, isErrorResponse } from '../../src/plugins/data';
import { DataPublicPluginStart, isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/public';
export interface MyPluginStartDependencies {
data: DataPublicPluginStart;
@ -103,7 +103,7 @@ data.search.search(req).subscribe({
The search service `search` method supports a second argument called `options`. One of these options provides an `abortSignal` to stop searches from running to completion, if the result is no longer needed.
```ts
import { AbortError } from '../../src/data/public';
import { AbortError } from '@kbn/kibana-utils-plugin/common';
const abortController = new AbortController();
data.search