From 262ef0e064a12b6508c05d2a19df21f1bec035e5 Mon Sep 17 00:00:00 2001 From: Antonio <34042064+Desvelao@users.noreply.github.com> Date: Tue, 20 Dec 2022 11:55:28 +0100 Subject: [PATCH] Remove duplicated buttons in SCA inventory (#5010) * fix: remove unused buttons in sca inventory * changelog: add pull request entry to the changelog (cherry picked from commit 442c45a65746156a96ea980e46b8148ba4470983) --- CHANGELOG.md | 4 +- public/components/agents/sca/inventory.tsx | 43 ---------------------- 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71cb707794..f9daa89df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,8 +43,8 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed a bug where the Wazuh logo was used instead of the custom one [#4539](https://github.com/wazuh/wazuh-kibana-app/pull/4539) - Fixed rendering problems of the `Agent Overview` section in low resolutions [#4516](https://github.com/wazuh/wazuh-kibana-app/pull/4516) - Fixed issue when logging out from Wazuh when SAML is enabled [#4595](https://github.com/wazuh/wazuh-kibana-app/issues/4595) -- Fixed server errors with code 500 when the Wazuh API is not reachable / up. [#4710](https://github.com/wazuh/wazuh-kibana-app/pull/4710) [#4728](https://github.com/wazuh/wazuh-kibana-app/pull/4728) [#4998](https://github.com/wazuh/wazuh-kibana-app/pull/4998) -- Fixed pagination to SCA table [#4653](https://github.com/wazuh/wazuh-kibana-app/issues/4653) +- Fixed server errors with code 500 when the Wazuh API is not reachable / up. [#4710](https://github.com/wazuh/wazuh-kibana-app/pull/4710) [#4728](https://github.com/wazuh/wazuh-kibana-app/pull/4728) [#4971](https://github.com/wazuh/wazuh-kibana-app/pull/4971) +- Fixed pagination to SCA table [#4653](https://github.com/wazuh/wazuh-kibana-app/issues/4653) [#5010](https://github.com/wazuh/wazuh-kibana-app/pull/5010) - Fixed WAZUH_PROTOCOL param suggestion [#4849](https://github.com/wazuh/wazuh-kibana-app/pull/4849) - Raspbian OS, Ubuntu, Amazon Linux and Amazon Linux 2 commands in the wizard deploy agent now change when a different architecture is selected [#4876](https://github.com/wazuh/wazuh-kibana-app/pull/4876) [#4880](https://github.com/wazuh/wazuh-kibana-app/pull/4880) - Fixed commands in the deploy new agent section(most of the commands are missing '-1') [#4962](https://github.com/wazuh/wazuh-kibana-app/pull/4962) diff --git a/public/components/agents/sca/inventory.tsx b/public/components/agents/sca/inventory.tsx index 45db9d3725..4d8160f245 100644 --- a/public/components/agents/sca/inventory.tsx +++ b/public/components/agents/sca/inventory.tsx @@ -31,7 +31,6 @@ import { } from '@elastic/eui'; import { WzRequest } from '../../../react-services/wz-request'; import { formatUIDate } from '../../../react-services/time-service'; -import exportCsv from '../../../react-services/wz-csv'; import { getToasts } from '../../../kibana-services'; import _ from 'lodash'; import { @@ -325,32 +324,6 @@ export class Inventory extends Component { }); }; - /** - * - */ - async downloadCsv() { - try { - this.showToast('success', 'Your download should begin automatically...', 3000); - await exportCsv( - '/sca/' + this.props.agent.id + '/checks/' + this.state.lookingPolicy.policy_id, - [], - this.state.lookingPolicy.policy_id - ); - } catch (error) { - const options: UIErrorLog = { - context: `${Inventory.name}.downloadCsv`, - level: UI_LOGGER_LEVELS.ERROR as UILogLevel, - severity: UI_ERROR_SEVERITIES.BUSINESS as UIErrorSeverity, - error: { - error: error, - message: error.message || error, - title: error.name, - }, - }; - getErrorOrchestrator().handleError(options); - } - } - buttonStat(text, field, value) { return ; } @@ -503,22 +476,6 @@ export class Inventory extends Component { - - await this.downloadCsv()} - > - Export formatted - - - - this.loadScaPolicy(this.state.lookingPolicy.policy_id)} - > - Refresh - -