From 2c22ec594b7a343486c32f26f755f97a89eb27fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chantal=20Bel=C3=A9n=20kelm?= <99441266+chantal-kelm@users.noreply.github.com> Date: Mon, 13 Jun 2022 12:29:09 -0300 Subject: [PATCH] Fix type error on the Agents main view (#4233) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update CHANGELOG.md * Update kibana-vis.js Co-authored-by: Álex (cherry picked from commit 7536c05a7986d55a4435eb42bfbd8a8b39733984) --- CHANGELOG.md | 5 +++++ public/kibana-integrations/kibana-vis.js | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bea099aad..4e38b88370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to the Wazuh app project will be documented in this file. ## Wazuh v4.3.5 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4306 +### Fixed + +- Fixed type error when changing screen size in agents section [#4233](https://github.com/wazuh/wazuh-kibana-app/pull/4233) +- Fixed an error when generating a module report after changing the selected agent [#4240](https://github.com/wazuh/wazuh-kibana-app/pull/4240) + ### Changed - Changed the word Manager to Wazuh server from the phrases that appeared in "Deploy a new agent". [#4239](https://github.com/wazuh/wazuh-kibana-app/pull/4239) diff --git a/public/kibana-integrations/kibana-vis.js b/public/kibana-integrations/kibana-vis.js index 99062957d6..210b4915b6 100644 --- a/public/kibana-integrations/kibana-vis.js +++ b/public/kibana-integrations/kibana-vis.js @@ -108,7 +108,17 @@ class KibanaVis extends Component { componentWillUnmount() { if (this._isMounted) { this._isMounted = false; - this.updateVis(); + // It would be good to continue investigating if it is + // necessary for the renderComplete() to be in the + // componentWillUnmount. + // In the renderComplete() the value of the $rootScope + // is changed, which affects the entire application. + // + // Related issue: + // https://github.com/wazuh/wazuh-kibana-app/issues/4158 + if (this.deadField) { + return this.renderComplete(); + } this.destroyAll(); } }