Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/3673 fixing double flyout clicking in a policy #3676

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to the Wazuh app project will be documented in this file.

- Fixed compatibility wazuh 4.2 - kibana 7.13.4 [#3653](https:/wazuh/wazuh-kibana-app/pull/3653)
- Fixed interative register windows agent screen error [#3654](https:/wazuh/wazuh-kibana-app/pull/3654)
- Fixing double flyout clicking in a policy [#3676](https:/wazuh/wazuh-kibana-app/pull/3676)

## Wazuh v4.2.4 - Kibana 7.10.2, 7.11.2, 7.12.1 - Revision 4205

Expand Down
4 changes: 1 addition & 3 deletions public/components/security/policies/policies-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ import { WzRequest } from '../../../react-services/wz-request';
import { ErrorHandler } from '../../../react-services/error-handler';
import { WzAPIUtils } from '../../../react-services/wz-api-utils';
import { WzButtonModalConfirm } from '../../common/buttons';
import { CreatePolicyFlyout } from './create-policy';

export const PoliciesTable = ({policies, loading, editPolicy, createPolicy,updatePolicies}) => {
export const PoliciesTable = ({policies, loading, editPolicy, updatePolicies}) => {

const getRowProps = (item) => {
const { id } = item;
return {
'data-test-subj': `row-${id}`,
onClick: () => {
editPolicy(item);
createPolicy(item)
},
};
};
Expand Down
2 changes: 1 addition & 1 deletion public/components/security/policies/policies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const Policies = () => {
</EuiPageContentHeaderSection>
</EuiPageContentHeader>
<EuiPageContentBody>
<PoliciesTable loading={loading} policies={policies} editPolicy={editPolicy} createPolicy={createPolicy} updatePolicies={getPolicies}></PoliciesTable>
<PoliciesTable loading={loading} policies={policies} editPolicy={editPolicy} updatePolicies={getPolicies}></PoliciesTable>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These long lines could be splitted into several lines to improve readbility

<PoliciesTable 
  loading={loading} 
  policies={policies} 
  editPolicy={editPolicy} 
  updatePolicies={getPolicies}>
</PoliciesTable>

</EuiPageContentBody>
</EuiPageContent>
);
Expand Down
4 changes: 2 additions & 2 deletions public/components/wz-menu/wz-menu-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class WzMenuManagement extends Component {
name: this.managementSections.administration.text,
id: this.managementSections.administration.id,
id: 0,
disabled: true,
disabled: false,
icon: <EuiIcon type="managementApp" color="primary" />,
items: [
this.createItem(this.managementSections.rules),
Expand All @@ -154,7 +154,7 @@ class WzMenuManagement extends Component {
{
name: this.managementSections.statusReports.text,
id: this.managementSections.statusReports.id,
disabled: true,
disabled: false,
icon: <EuiIcon type="reportingApp" color="primary" />,
items: [
this.createItem(this.managementSections.status),
Expand Down
2 changes: 1 addition & 1 deletion public/components/wz-menu/wz-menu-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class WzMenuSettings extends Component {
{
name: availableSettings.settings.text,
id: availableSettings.settings.id,
disabled: true,
disabled: false,
icon: <EuiIcon type="gear" color="primary" />,
items: renderSettings
}
Expand Down