Skip to content

Commit

Permalink
Merge branch '4.10.0' into bug/25617-the-automatic-page-refresh-is-no…
Browse files Browse the repository at this point in the history
…t-working
  • Loading branch information
guidomodarelli authored Oct 10, 2024
2 parents 8fe70f9 + f9784c8 commit 49e772b
Show file tree
Hide file tree
Showing 20 changed files with 68 additions and 54 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to the Wazuh app project will be documented in this file.

## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 01
## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 02

## Fixed

Expand Down Expand Up @@ -37,7 +37,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Removed agent RBAC filters from dashboard queries [#6945](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6945)
- Removed GET /elastic/statistics API endpoint [#7001](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7001)

## Wazuh v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 01
## Wazuh v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 03

### Added

Expand All @@ -56,6 +56,10 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed missing options depending on agent operating system in the agent configuration report [#6983](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6983)
- Fixed an style that affected the Discover plugin [#6989](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6989)
- Fixed a problem updating the API host registry in the GET /api/check-stored-api [#6995](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6995)
- Fixed the `Open report` button of the toast and the `Download report` icon of the reporting table in Safari [#7019](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7019)
- Fixed style when unnpinned an agent in endpoint summary section [#7015](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7015)
- Fixed overflow style on a long value filter [#7021](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7021)
- Fixed buttons enabled for a readonly user in `Endpoint groups` section [#7056](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7056)

### Changed

Expand All @@ -69,6 +73,7 @@ All notable changes to the Wazuh app project will be documented in this file.

### Removed

- Removed the PDF report footer year [#7023](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7023)
- Removed the XML autoformat function group configuration due to performance [#6999](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6999)

## Wazuh v4.9.0 - OpenSearch Dashboards 2.13.0 - Revision 07
Expand Down
20 changes: 10 additions & 10 deletions plugins/main/common/api-info/security-actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,16 @@
"DELETE /decoders/files/{filename}"
]
},
"event:ingest": {
"description": "Ingest events",
"resources": ["*:*"],
"example": {
"actions": ["event:ingest"],
"resources": ["*:*:*"],
"effect": "allow"
},
"related_endpoints": ["POST /events"]
},
"syscollector:read": {
"description": "Access agents syscollector information",
"resources": ["agent:id", "agent:group"],
Expand Down Expand Up @@ -694,15 +704,5 @@
"effect": "deny"
},
"related_endpoints": ["GET /tasks/status"]
},
"event:ingest": {
"description": "Ingest events",
"resources": ["*:*"],
"example": {
"actions": ["event:ingest"],
"resources": ["*:*:*"],
"effect": "allow"
},
"related_endpoints": ["POST /events"]
}
}
2 changes: 1 addition & 1 deletion plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export const ASSETS_PUBLIC_URL = '/plugins/wazuh/public/assets/';
export const REPORTS_LOGO_IMAGE_ASSETS_RELATIVE_PATH =
'images/logo_reports.png';
export const REPORTS_PRIMARY_COLOR = '#256BD1';
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © 2024 Wazuh, Inc.';
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © Wazuh, Inc.';
export const REPORTS_PAGE_HEADER_TEXT = '[email protected]\nhttps://wazuh.com';

// Plugin platform
Expand Down
2 changes: 1 addition & 1 deletion plugins/main/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuh",
"version": "4.10.0-01",
"version": "4.10.0-02",
"opensearchDashboardsVersion": "opensearchDashboards",
"configPath": ["wazuh"],
"requiredPlugins": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/main/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh",
"version": "4.10.0",
"revision": "01",
"revision": "02",
"pluginPlatform": {
"version": "2.16.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ exports[`AgentStatus component Renders status indicator with the its color and t
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 14A6 6 0 1 1 8 2a6 6 0 0 1 0 12Zm0-1A5 5 0 1 0 8 3a5 5 0 0 0 0 10Zm-.186-1.065A.785.785 0 0 1 7 11.12c0-.48.34-.82.814-.82.475 0 .809.34.809.82 0 .475-.334.815-.809.815ZM5.9 6.317C5.96 5.168 6.755 4.4 8.048 4.4c1.218 0 2.091.759 2.091 1.8 0 .736-.36 1.304-1.03 1.707-.56.33-.717.56-.717 1.022v.305l-.1.1H7.47l-.1-.1v-.431c-.005-.646.302-1.104.987-1.514.527-.322.708-.59.708-1.047 0-.536-.416-.91-1.05-.91-.652 0-1.064.374-1.112.998l-.1.092H6l-.1-.105Z"
d="M7.5 11.508 7.468 8H6.25V7h2.401l.03 3.508H9.8v1H7.5Zm-.25-6.202a.83.83 0 0 1 .207-.577c.137-.153.334-.229.59-.229.256 0 .454.076.594.23.14.152.209.345.209.576 0 .228-.07.417-.21.568-.14.15-.337.226-.593.226-.256 0-.453-.075-.59-.226a.81.81 0 0 1-.207-.568ZM8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10Zm0 1A6 6 0 1 1 8 2a6 6 0 0 1 0 12Z"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down Expand Up @@ -193,7 +194,8 @@ exports[`AgentStatus component Renders status indicator with the its color and t
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 14A6 6 0 1 1 8 2a6 6 0 0 1 0 12Zm0-1A5 5 0 1 0 8 3a5 5 0 0 0 0 10Zm-.186-1.065A.785.785 0 0 1 7 11.12c0-.48.34-.82.814-.82.475 0 .809.34.809.82 0 .475-.334.815-.809.815ZM5.9 6.317C5.96 5.168 6.755 4.4 8.048 4.4c1.218 0 2.091.759 2.091 1.8 0 .736-.36 1.304-1.03 1.707-.56.33-.717.56-.717 1.022v.305l-.1.1H7.47l-.1-.1v-.431c-.005-.646.302-1.104.987-1.514.527-.322.708-.59.708-1.047 0-.536-.416-.91-1.05-.91-.652 0-1.064.374-1.112.998l-.1.092H6l-.1-.105Z"
d="M7.5 11.508 7.468 8H6.25V7h2.401l.03 3.508H9.8v1H7.5Zm-.25-6.202a.83.83 0 0 1 .207-.577c.137-.153.334-.229.59-.229.256 0 .454.076.594.23.14.152.209.345.209.576 0 .228-.07.417-.21.568-.14.15-.337.226-.593.226-.256 0-.453-.075-.59-.226a.81.81 0 0 1-.207-.568ZM8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10Zm0 1A6 6 0 1 1 8 2a6 6 0 0 1 0 12Z"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down Expand Up @@ -260,7 +262,8 @@ exports[`AgentStatus component Renders status indicator with the its color and t
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 14A6 6 0 1 1 8 2a6 6 0 0 1 0 12Zm0-1A5 5 0 1 0 8 3a5 5 0 0 0 0 10Zm-.186-1.065A.785.785 0 0 1 7 11.12c0-.48.34-.82.814-.82.475 0 .809.34.809.82 0 .475-.334.815-.809.815ZM5.9 6.317C5.96 5.168 6.755 4.4 8.048 4.4c1.218 0 2.091.759 2.091 1.8 0 .736-.36 1.304-1.03 1.707-.56.33-.717.56-.717 1.022v.305l-.1.1H7.47l-.1-.1v-.431c-.005-.646.302-1.104.987-1.514.527-.322.708-.59.708-1.047 0-.536-.416-.91-1.05-.91-.652 0-1.064.374-1.112.998l-.1.092H6l-.1-.105Z"
d="M7.5 11.508 7.468 8H6.25V7h2.401l.03 3.508H9.8v1H7.5Zm-.25-6.202a.83.83 0 0 1 .207-.577c.137-.153.334-.229.59-.229.256 0 .454.076.594.23.14.152.209.345.209.576 0 .228-.07.417-.21.568-.14.15-.337.226-.593.226-.256 0-.453-.075-.59-.226a.81.81 0 0 1-.207-.568ZM8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10Zm0 1A6 6 0 1 1 8 2a6 6 0 0 1 0 12Z"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down
2 changes: 1 addition & 1 deletion plugins/main/public/components/agents/agent-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const AgentStatus = ({ status, children = null, style = {}, agent }) => {
anchorClassName='wz-margin-left-10'
aria-label='Description'
size='m'
type='questionInCircle'
type='iInCircle'
color='primary'
content={statusCodeAgent?.STATUS_DESCRIPTION ?? 'Without information'}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const AgentView = compose(
You need to select an agent or return to
<RedirectAppLinks application={getCore().application}>
<EuiLink
className='eui-textCenter'
aria-label='go to Endpoint summary'
href={`${endpointSummary.id}#/agents-preview`}
onClick={() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
import React, { Component, Fragment } from 'react';
// Eui components
import { EuiFlexItem, EuiButtonEmpty } from '@elastic/eui';
import { EuiFlexItem } from '@elastic/eui';

import { connect } from 'react-redux';

Expand All @@ -20,6 +20,7 @@ import { updateShowAddAgents } from '../../../../../redux/actions/groupsActions'
import GroupsHandler from './utils/groups-handler';
import { ExportConfiguration } from '../../../../../components/agents/export-configuration';
import { ReportingService } from '../../../../../react-services/reporting';
import { WzButtonPermissions } from '../../../../../components/common/permissions/button';

class WzGroupsActionButtonsAgents extends Component {
_isMounted = false;
Expand All @@ -38,13 +39,21 @@ class WzGroupsActionButtonsAgents extends Component {
render() {
// Add new group button
const manageAgentsButton = (
<EuiButtonEmpty
<WzButtonPermissions
buttonType='empty'
permissions={[
{
action: 'group:update_config',
resource: `group:id:${this.props.state.itemDetail.name}`,
},
{ action: 'cluster:status', resource: '*:*:*' },
]}
iconSide='left'
iconType='folderOpen'
onClick={() => this.showManageAgents()}
>
Manage agents
</EuiButtonEmpty>
</WzButtonPermissions>
);

// Export PDF button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ class WzGroupsActionButtonsFiles extends Component {
buttonType='empty'
permissions={[
{
action: 'group:read',
action: 'group:update_config',
resource: `group:id:${this.props.state.itemDetail.name}`,
},
{ action: 'cluster:status', resource: '*:*:*' },
]}
iconSide='left'
iconType='documentEdit'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ class WzGroupAgentsTable extends Component {
align: 'left',
searchable: true,
sortable: true,
render: status => (
render: (status, agent) => (
<AgentStatus
status={status}
agent={agent}
labelProps={{ className: 'hide-agent-status' }}
/>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export class WzGroupsOverview extends Component {
<WzButtonPermissions
buttonType='icon'
permissions={[
{ action: 'group:read', resource: `group:id:${item.name}` },
{
action: 'group:update_config',
resource: `group:id:${item.name}`,
},
{ action: 'cluster:status', resource: '*:*:*' },
]}
tooltip={{
position: 'top',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ export default class GroupsFilesColumns {
iconType='pencil'
permissions={[
{
action: 'group:read',
action: 'group:update_config',
resource: `group:id:${itemDetail.name}`,
},
{ action: 'cluster:status', resource: '*:*:*' },
]}
tooltip={{
position: 'top',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import { EuiToolTip, EuiButtonIcon } from '@elastic/eui';
import { EuiToolTip, EuiButtonEmpty } from '@elastic/eui';
import ReportingHandler from './reporting-handler';
import moment from 'moment-timezone';
import { WzButton } from '../../../../../../components/common/buttons';
import { getHttp, getUiSettings } from '../../../../../../kibana-services';
import { formatUIDate } from '../../../../../../react-services/time-service';
export default class ReportingColums {
Expand Down Expand Up @@ -41,15 +40,17 @@ export default class ReportingColums {
return (
<div>
<EuiToolTip position='top' content={`Download report`}>
<EuiButtonIcon
<EuiButtonEmpty
aria-label='Dowload report'
iconType='importAction'
onClick={() => this.goReport(item.name)}
href={getHttp().basePath.prepend(`/reports/${item.name}`)}
target='_blank'
color='primary'
contentProps={{ className: 'wz-no-padding' }}
/>
</EuiToolTip>

<WzButton
<EuiButtonEmpty
buttonType='icon'
aria-label='Delete report'
iconType='trash'
Expand All @@ -60,6 +61,7 @@ export default class ReportingColums {
}}
color='danger'
isDisabled={item.name === 'default'}
contentProps={{ className: 'wz-no-padding' }}
/>
</div>
);
Expand All @@ -70,14 +72,6 @@ export default class ReportingColums {
this.buildColumns();
}

/**
* Downloads the report
* @param {*} name The name of the report
*/
goReport(name) {
window.open(getHttp().basePath.prepend(`/reports/${name}`), '_blank');
}

/**
* Returns given date adding the timezone offset
* @param {string} date Date
Expand Down
15 changes: 5 additions & 10 deletions plugins/main/public/react-services/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import store from '../redux/store';
import domtoimage from '../utils/dom-to-image-more';
import dateMath from '@elastic/datemath';
import React from 'react';
import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiLink } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui';
import { reporting } from '../utils/applications';
import { RedirectAppLinks } from '../../../../src/plugins/opensearch_dashboards_react/public';
import {
Expand Down Expand Up @@ -93,17 +93,12 @@ export class ReportingService {
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
onClick={() =>
window.open(
getHttp().basePath.prepend(`/reports/${filename}`),
'_blank',
)
}
size='s'
<EuiLink
href={getHttp().basePath.prepend(`/reports/${filename}`)}
target='_blank'
>
Open report
</EuiButton>
</EuiLink>
</EuiFlexItem>
</EuiFlexGroup>
</>,
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-check-updates/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuhCheckUpdates",
"version": "4.10.0-01",
"version": "4.10.0-02",
"opensearchDashboardsVersion": "opensearchDashboards",
"server": true,
"ui": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-check-updates/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh-check-updates",
"version": "4.10.0",
"revision": "01",
"revision": "02",
"pluginPlatform": {
"version": "2.16.0"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export const ASSETS_PUBLIC_URL = '/plugins/wazuh/public/assets/';
export const REPORTS_LOGO_IMAGE_ASSETS_RELATIVE_PATH =
'images/logo_reports.png';
export const REPORTS_PRIMARY_COLOR = '#256BD1';
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © 2023 Wazuh, Inc.';
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © Wazuh, Inc.';
export const REPORTS_PAGE_HEADER_TEXT = '[email protected]\nhttps://wazuh.com';

// Plugin platform
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuhCore",
"version": "4.10.0-01",
"version": "4.10.0-02",
"opensearchDashboardsVersion": "opensearchDashboards",
"server": true,
"ui": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh-core",
"version": "4.10.0",
"revision": "01",
"revision": "02",
"pluginPlatform": {
"version": "2.16.0"
},
Expand Down

0 comments on commit 49e772b

Please sign in to comment.