Your window into the Elastic Stack
Find a file
Hannah Mudge e5027f51e5
[8.13] [Dashboard] [Controls] Fix bug with drilldowns when source dashboard has no controls (#179485) (#179842)
# Backport

This will backport the following commits from `main` to `8.13`:
- [[Dashboard] [Controls] Fix bug with drilldowns when source dashboard
has no controls
(#179485)](https://github.com/elastic/kibana/pull/179485)

**Note:** This only fixes the "no controls" bug - the race condition
also fixed in that PR does not need to be backported, since the code
that caused it was not merged in 8.13.

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Hannah
Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-02T14:10:53Z","message":"[Dashboard]
[Controls] Fix bug with drilldowns when source dashboard has no controls
(#179485)\n\nCloses
https://github.com/elastic/kibana/issues/179391\r\n\r\n##
Summary\r\n\r\nWe were previously only calling `setSavedState` for the
control group on\r\ndashboard navigation **when the control group was
defined in the loaded\r\ndashboard** - however, if either the source or
destination dashboard had\r\nzero controls, this caused problems on
navigation:\r\n- If the source dashboard had at least one control and
the destination\r\ndashboard had zero, the destination dashboard's
control group\r\n`lastSavedInput` would **not** get set in
`navigateToDashboard` since it\r\nis undefined - i.e. the
`lastSavedInput` on the destination dashboard's\r\ncontrol group would
**still be equal to** the `lastSavedInput` of the\r\nsource dashboard's
control group after navigation. Therefore, hitting\r\n\"reset\" would
replace the destination dashboard's empty control group\r\nwith the
source's control group.\r\n- If the source dashboard had zero controls
and the destination\r\ndashboard had at least one, the first step in
navigation would work as\r\nexpected - the `lastSavedInput` of the
destination dashboard would be\r\nset appropriately. However, upon
hitting the browser back button and\r\ntriggering `navigateToDashboard`
a second time, the source dashboard's\r\ncontrol group's
`lastSavedInput` would **not** get set properly (since\r\nit is
undefined) and would therefore still be equal to the\r\n`lastSavedInput`
of the destination dashboard. Therefore, hitting\r\n\"reset\" would
replace the source's empty control group with the\r\ndestination
dashboard's controls.\r\n\r\nThis fixes the above scenarios by calling
`setSavedState` on the control\r\ngroup **even if** the last saved
control group state is undefined.\r\n\r\n### Race Condition
Fix\r\n\r\nIn my testing for this, I discovered **another** bug caused
by a race\r\ncondition where, on dashboard navigation, the subscription
to the\r\ncontrol group's `initialize# Backport

This will backport the following commits from `main` to `8.13`:
- [[Dashboard] [Controls] Fix bug with drilldowns when source dashboard
has no controls
(#179485)](https://github.com/elastic/kibana/pull/179485)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT subject was firing with the **wrong**\r\ninput, so the
`lastSavedFilters` would be calculated incorrectly. This\r\ncaused the
dashboard to get stuck in an unsaved changes state, like
so:\r\n\r\n\r\n\r\n14c553a9-21b3-40d0-96ac-0282e9e66911\r\n\r\n\r\n\r\nI
fixed this by removing this subscription (it was messy anyway 🙈)
and\r\nreplaced this logic with individual calls
to\r\n`calculateFiltersFromSelections` - this should be easier to
follow, and\r\nwe ensure that we are **always** doing this calculation
with the\r\nexpected input. Since we aren't `awaiting` these
calculations, it also\r\nshouldn't slow down the control group's
initialization (which was the\r\noriginal reason for using a
subscription).\r\n\r\n\r\n### Checklist\r\n\r\n\r\n- [x] This was
checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n-
[x] Flaky test runner
-\r\ncd8ce150-6104-4395-b70c-7309185cc04d)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [ ] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"507f09d0b69a99f03f0c0cb19f10f1ea8584cd47","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","loe:small","impact:high","backport:prev-minor","v8.14.0"],"number":179485,"url":"https://github.com/elastic/kibana/pull/179485","mergeCommit":{"message":"[Dashboard]
[Controls] Fix bug with drilldowns when source dashboard has no controls
(#179485)\n\nCloses
https://github.com/elastic/kibana/issues/179391\r\n\r\n##
Summary\r\n\r\nWe were previously only calling `setSavedState` for the
control group on\r\ndashboard navigation **when the control group was
defined in the loaded\r\ndashboard** - however, if either the source or
destination dashboard had\r\nzero controls, this caused problems on
navigation:\r\n- If the source dashboard had at least one control and
the destination\r\ndashboard had zero, the destination dashboard's
control group\r\n`lastSavedInput` would **not** get set in
`navigateToDashboard` since it\r\nis undefined - i.e. the
`lastSavedInput` on the destination dashboard's\r\ncontrol group would
**still be equal to** the `lastSavedInput` of the\r\nsource dashboard's
control group after navigation. Therefore, hitting\r\n\"reset\" would
replace the destination dashboard's empty control group\r\nwith the
source's control group.\r\n- If the source dashboard had zero controls
and the destination\r\ndashboard had at least one, the first step in
navigation would work as\r\nexpected - the `lastSavedInput` of the
destination dashboard would be\r\nset appropriately. However, upon
hitting the browser back button and\r\ntriggering `navigateToDashboard`
a second time, the source dashboard's\r\ncontrol group's
`lastSavedInput` would **not** get set properly (since\r\nit is
undefined) and would therefore still be equal to the\r\n`lastSavedInput`
of the destination dashboard. Therefore, hitting\r\n\"reset\" would
replace the source's empty control group with the\r\ndestination
dashboard's controls.\r\n\r\nThis fixes the above scenarios by calling
`setSavedState` on the control\r\ngroup **even if** the last saved
control group state is undefined.\r\n\r\n### Race Condition
Fix\r\n\r\nIn my testing for this, I discovered **another** bug caused
by a race\r\ncondition where, on dashboard navigation, the subscription
to the\r\ncontrol group's `initialize# Backport

This will backport the following commits from `main` to `8.13`:
- [[Dashboard] [Controls] Fix bug with drilldowns when source dashboard
has no controls
(#179485)](https://github.com/elastic/kibana/pull/179485)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT subject was firing with the **wrong**\r\ninput, so the
`lastSavedFilters` would be calculated incorrectly. This\r\ncaused the
dashboard to get stuck in an unsaved changes state, like
so:\r\n\r\n\r\n\r\n14c553a9-21b3-40d0-96ac-0282e9e66911\r\n\r\n\r\n\r\nI
fixed this by removing this subscription (it was messy anyway 🙈)
and\r\nreplaced this logic with individual calls
to\r\n`calculateFiltersFromSelections` - this should be easier to
follow, and\r\nwe ensure that we are **always** doing this calculation
with the\r\nexpected input. Since we aren't `awaiting` these
calculations, it also\r\nshouldn't slow down the control group's
initialization (which was the\r\noriginal reason for using a
subscription).\r\n\r\n\r\n### Checklist\r\n\r\n\r\n- [x] This was
checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n-
[x] Flaky test runner
-\r\ncd8ce150-6104-4395-b70c-7309185cc04d)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [ ] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"507f09d0b69a99f03f0c0cb19f10f1ea8584cd47"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/179485","number":179485,"mergeCommit":{"message":"[Dashboard]
[Controls] Fix bug with drilldowns when source dashboard has no controls
(#179485)\n\nCloses
https://github.com/elastic/kibana/issues/179391\r\n\r\n##
Summary\r\n\r\nWe were previously only calling `setSavedState` for the
control group on\r\ndashboard navigation **when the control group was
defined in the loaded\r\ndashboard** - however, if either the source or
destination dashboard had\r\nzero controls, this caused problems on
navigation:\r\n- If the source dashboard had at least one control and
the destination\r\ndashboard had zero, the destination dashboard's
control group\r\n`lastSavedInput` would **not** get set in
`navigateToDashboard` since it\r\nis undefined - i.e. the
`lastSavedInput` on the destination dashboard's\r\ncontrol group would
**still be equal to** the `lastSavedInput` of the\r\nsource dashboard's
control group after navigation. Therefore, hitting\r\n\"reset\" would
replace the destination dashboard's empty control group\r\nwith the
source's control group.\r\n- If the source dashboard had zero controls
and the destination\r\ndashboard had at least one, the first step in
navigation would work as\r\nexpected - the `lastSavedInput` of the
destination dashboard would be\r\nset appropriately. However, upon
hitting the browser back button and\r\ntriggering `navigateToDashboard`
a second time, the source dashboard's\r\ncontrol group's
`lastSavedInput` would **not** get set properly (since\r\nit is
undefined) and would therefore still be equal to the\r\n`lastSavedInput`
of the destination dashboard. Therefore, hitting\r\n\"reset\" would
replace the source's empty control group with the\r\ndestination
dashboard's controls.\r\n\r\nThis fixes the above scenarios by calling
`setSavedState` on the control\r\ngroup **even if** the last saved
control group state is undefined.\r\n\r\n### Race Condition
Fix\r\n\r\nIn my testing for this, I discovered **another** bug caused
by a race\r\ncondition where, on dashboard navigation, the subscription
to the\r\ncontrol group's `initialize# Backport

This will backport the following commits from `main` to `8.13`:
- [[Dashboard] [Controls] Fix bug with drilldowns when source dashboard
has no controls
(#179485)](https://github.com/elastic/kibana/pull/179485)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT subject was firing with the **wrong**\r\ninput, so the
`lastSavedFilters` would be calculated incorrectly. This\r\ncaused the
dashboard to get stuck in an unsaved changes state, like
so:\r\n\r\n\r\n\r\n14c553a9-21b3-40d0-96ac-0282e9e66911\r\n\r\n\r\n\r\nI
fixed this by removing this subscription (it was messy anyway 🙈)
and\r\nreplaced this logic with individual calls
to\r\n`calculateFiltersFromSelections` - this should be easier to
follow, and\r\nwe ensure that we are **always** doing this calculation
with the\r\nexpected input. Since we aren't `awaiting` these
calculations, it also\r\nshouldn't slow down the control group's
initialization (which was the\r\noriginal reason for using a
subscription).\r\n\r\n\r\n### Checklist\r\n\r\n\r\n- [x] This was
checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n-
[x] Flaky test runner
-\r\ncd8ce150-6104-4395-b70c-7309185cc04d)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [ ] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"507f09d0b69a99f03f0c0cb19f10f1ea8584cd47"}}]}]
BACKPORT-->
2024-04-02 17:06:29 -04:00
.buildkite [Ops] Add debug to manifest downloads @ trigger.sh (#179516) 2024-03-28 10:10:01 +01:00
.github chore(NA): prepare 8.13 branch 2024-02-14 19:47:31 +00:00
api_docs [8.13] chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340) (#178778) 2024-03-14 23:43:32 +00:00
config [browser logging] allow to configure root level (#176397) 2024-02-12 05:26:57 -07:00
dev_docs [8.13] chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340) (#178778) 2024-03-14 23:43:32 +00:00
docs [8.13] [DOCS] Adds the release notes for 8.13.1 (#179760) (#179779) 2024-04-01 23:10:43 +00:00
examples [8.13] [Visualizations] legacy vis behavior on serverless (#176935) (#177595) 2024-02-22 09:04:41 -07:00
kbn_pm Replace deprecated node-sass with sass #2 (#173942) 2023-12-28 10:35:17 -06:00
legacy_rfcs rename @elastic/* packages to @kbn/* (#138957) 2022-08-18 08:54:42 -07:00
licenses Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
packages [8.13] [Ent Search] Fix connector client UI copy (#179579) (#179799) 2024-04-02 03:32:22 -07:00
plugins
scripts [Ops] Create CLI for rewriting buildkite agent targeting rules (#174688) 2024-01-18 10:29:08 +01:00
src [8.13] [Dashboard] [Controls] Fix bug with drilldowns when source dashboard has no controls (#179485) (#179842) 2024-04-02 17:06:29 -04:00
test [8.13] [Discover] Unskip discover data grid row height functional test (#179453) (#179690) 2024-03-29 07:34:50 -07:00
typings Remove legacy kibana react code editor (#171047) 2024-01-05 14:35:09 +01:00
x-pack [8.13] [EDR Workflows] Fix automated process action field name behavior (#178727) (#179866) 2024-04-02 12:17:42 -07:00
.backportrc.json chore(NA): adds 8.13 into backportrc (#172748) 2023-12-07 05:00:59 +00:00
.bazelignore Bazel config maintenance (#135442) 2022-07-05 10:20:26 -05:00
.bazeliskversion chore(NA): upgrade bazelisk into v1.11.0 (#125070) 2022-02-09 20:43:57 +00:00
.bazelrc chore(NA): use new and more performant BuildBuddy servers (#130350) 2022-04-18 02:01:38 +01:00
.bazelrc.common Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
.bazelversion chore(NA): revert bazel upgrade for v5.2.0 (#135096) 2022-06-24 03:57:21 +01:00
.browserslistrc [browserslist] remove unnecessary browsers (#89186) 2021-01-25 16:30:18 -07:00
.editorconfig .editorconfig MDX files should follow the same rules as MD (#96942) 2021-04-13 11:40:42 -04:00
.eslintignore Remove Gainsight from cloud plugin (#172318) 2024-01-09 10:21:56 +00:00
.eslintrc.js [Security Solution] Data quality dashboard persistence (#173185) 2024-01-24 10:20:49 -07:00
.gitattributes
.gitignore [FTR] add service to test user roles on serverless (#170417) 2023-12-04 12:09:05 -07:00
.i18nrc.json [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00
.node-version [8.13] Upgrade Node.js to 20.11.1 (#177042) (#177371) 2024-02-20 14:25:40 -07:00
.npmrc [8.13] [npmrc] Fix puppeteer_skip_download configuration (#177673) (#177674) 2024-02-22 20:13:18 -07:00
.nvmrc [8.13] Upgrade Node.js to 20.11.1 (#177042) (#177371) 2024-02-20 14:25:40 -07:00
.prettierignore
.prettierrc
.stylelintignore chore(NA): stop grouping bazel out symlink folders (#96066) 2021-04-01 14:16:14 -05:00
.stylelintrc Bump stylelint to ^14 (#136693) 2022-07-20 10:11:00 -05:00
.telemetryrc.json [Telemetry] Fix telemetry-tools TS parser for packages (#149819) 2023-01-31 04:09:09 +03:00
.yarnrc chore(NA): manage npm dependencies within bazel (#92864) 2021-03-03 12:37:20 -05:00
BUILD.bazel Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
catalog-info.yaml [ci] Create kibana-emergency-release pipeline (#176101) 2024-02-02 15:11:11 -06:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md (#87439) 2021-02-23 09:01:51 +01:00
CONTRIBUTING.md Update doc slugs to improve analytic tracking, move to appropriate folders (#113630) 2021-10-04 13:36:45 -04:00
FAQ.md Fix small typos in the root md files (#134609) 2022-06-23 09:36:11 -05:00
fleet_packages.json [8.13] Sync bundled packages with Package Storage (#178228) 2024-03-07 09:56:45 -07:00
github_checks_reporter.json
kibana.d.ts fix all violations 2022-04-16 01:37:30 -05:00
LICENSE.txt Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
nav-kibana-dev.docnav.json Consolidate shared ux team dev docs (#172966) 2023-12-11 15:20:23 +01:00
NOTICE.txt Remove Gainsight from cloud plugin (#172318) 2024-01-09 10:21:56 +00:00
package.json chore(NA): bump version to 8.13.2 (#179856) 2024-04-02 17:54:32 +01:00
preinstall_check.js Always throw error objects - never strings (#171498) 2023-11-20 09:23:16 -05:00
README.md [README] Update version Compatibility with Elasticsearch (#116040) 2022-01-10 10:31:21 -05:00
renovate.json [8.13] Upgrade nodemailer dependency 6.6.2 -> 6.9.9 (#176487) (#179226) 2024-03-22 03:52:52 -07:00
RISK_MATRIX.mdx Add "Risk Matrix" section to the PR template (#100649) 2021-06-02 14:43:47 +02:00
SECURITY.md
sonar-project.properties [ci] Run sonarqube daily (#173961) 2024-01-03 15:43:29 -06:00
STYLEGUIDE.mdx [styleguide] update path to scss theme (#140742) 2022-09-15 10:41:14 -04:00
tsconfig.base.json replace kbn/ecs with official npm package holding ecs schema (#176128) 2024-02-13 22:03:30 +01:00
tsconfig.browser.json
tsconfig.browser_bazel.json [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
tsconfig.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
TYPESCRIPT.md Fix small typos in the root md files (#134609) 2022-06-23 09:36:11 -05:00
versions.json chore(NA): update versions after v8.12.2 bump (#176309) 2024-02-07 03:37:59 +00:00
WORKSPACE.bazel [8.13] Upgrade Node.js to 20.11.1 (#177042) (#177371) 2024-02-20 14:25:40 -07:00
yarn.lock [8.13] Upgrade webpack-dev-middleware@5.3.3→5.3.4 (#179738) (#179801) 2024-04-02 04:15:03 -07:00

Kibana

Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch.

Getting Started

If you just want to try Kibana out, check out the Elastic Stack Getting Started Page to give it a whirl.

If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the Kibana Getting Started Page.

Using a Kibana Release

If you want to use a Kibana release in production, give it a test run, or just play around:

Building and Running Kibana, and/or Contributing Code

You might want to build Kibana locally to contribute some code, test out the latest features, or try out an open PR:

Documentation

Visit Elastic.co for the full Kibana documentation.

For information about building the documentation, see the README in elastic/docs.

Version Compatibility with Elasticsearch

Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer major number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning.

Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers.

Situation Example Kibana version Example ES version Outcome
Versions are the same. 7.15.1 7.15.1 💚 OK
ES patch number is newer. 7.15.0 7.15.1 ⚠️ Logged warning
ES minor number is newer. 7.14.2 7.15.0 ⚠️ Logged warning
ES major number is newer. 7.15.1 8.0.0 🚫 Fatal error
ES patch number is older. 7.15.1 7.15.0 ⚠️ Logged warning
ES minor number is older. 7.15.1 7.14.2 🚫 Fatal error
ES major number is older. 8.0.0 7.15.1 🚫 Fatal error

Questions? Problems? Suggestions?

  • If you've found a bug or want to request a feature, please create a GitHub Issue. Please check to make sure someone else hasn't already created an issue for the same topic.
  • Need help using Kibana? Ask away on our Kibana Discuss Forum and a fellow community member or Elastic engineer will be glad to help you out.