From 3a528465336335b8f52bfde68f95ff3fd824e533 Mon Sep 17 00:00:00 2001 From: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com> Date: Tue, 27 Jun 2023 09:31:49 +0200 Subject: [PATCH] Change the method to make the redirect (#5539) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change the metod to make the redirect * Remove unused code * Add changelog --------- Co-authored-by: Álex Ruiz (cherry picked from commit 74927fb7726886dac5fae34f590183497d28d74e) --- CHANGELOG.md | 1 + public/controllers/agent/components/agents-preview.js | 1 - public/controllers/agent/components/agents-table.js | 11 ++++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fa34b3ca8..e9360e5a04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to the Wazuh app project will be documented in this file. ### Changed +- Changed method to perform redirection on agent table buttons [#5539](https://github.com/wazuh/wazuh-kibana-app/pull/5539) - Changed windows agent service name in the deploy agent wizard [#5538](https://github.com/wazuh/wazuh-kibana-app/pull/5538) ## Wazuh v4.5.0 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 01 diff --git a/public/controllers/agent/components/agents-preview.js b/public/controllers/agent/components/agents-preview.js index f031ba471c..6344836aa6 100644 --- a/public/controllers/agent/components/agents-preview.js +++ b/public/controllers/agent/components/agents-preview.js @@ -332,7 +332,6 @@ export const AgentsPreview = compose( wzReq={this.props.tableProps.wzReq} addingNewAgent={this.props.tableProps.addingNewAgent} downloadCsv={this.props.tableProps.downloadCsv} - clickAction={this.props.tableProps.clickAction} formatUIDate={(date) => formatUIDate(date)} reload={() => this.fetchAgentStatusDetailsData()} /> diff --git a/public/controllers/agent/components/agents-table.js b/public/controllers/agent/components/agents-table.js index 828db0afd6..e517f99a7b 100644 --- a/public/controllers/agent/components/agents-table.js +++ b/public/controllers/agent/components/agents-table.js @@ -348,7 +348,10 @@ export const AgentsTable = withErrorBoundary( { ev.stopPropagation(); - this.props.clickAction(agent, 'default'); + AppNavigate.navigateToModule(ev, 'agents', { + tab: 'welcome', + agent: agent.id, + }); }} iconType='eye' color={'primary'} @@ -364,7 +367,10 @@ export const AgentsTable = withErrorBoundary( { ev.stopPropagation(); - this.props.clickAction(agent, 'configuration'); + AppNavigate.navigateToModule(ev, 'agents', { + tab: 'configuration', + agent: agent.id, + }); }} color={'primary'} iconType='wrench' @@ -857,7 +863,6 @@ AgentsTable.propTypes = { wzReq: PropTypes.func, addingNewAgent: PropTypes.func, downloadCsv: PropTypes.func, - clickAction: PropTypes.func, timeService: PropTypes.func, reload: PropTypes.func, };