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

Merge last changes into cloud/4.0-7.9 #2715

Merged
merged 49 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
99ca2e5
Create Index Pattern without available indices
pablomarga Dec 2, 2020
23ec9fc
Fixed fullscreen visualizations overlayed
frankeros Dec 2, 2020
b949bbf
Merge remote-tracking branch 'origin/4.0-7.9' into fix/CreateIndexPat…
pablomarga Dec 3, 2020
a176a8e
CHANGELOG updated
pablomarga Dec 3, 2020
7cad7e5
Remove wrong line from CHANGELOG
pablomarga Dec 3, 2020
5c7e098
Changed wrong request
pablomarga Dec 3, 2020
350041b
Update Changelog
frankeros Dec 3, 2020
edd37d8
Fix revision changelog
frankeros Dec 3, 2020
cb3da26
Merge pull request #2672 from wazuh/bugfix/2667-fullscreen-visualizat…
jsanchez91 Dec 3, 2020
f8efd30
Merge branch '4.0-7.9' into fix/CreateIndexPattern
jsanchez91 Dec 4, 2020
eed3101
Merge pull request #2671 from wazuh/fix/CreateIndexPattern
jsanchez91 Dec 4, 2020
69fd41b
Modified agent registration adding groups and arch
pablomarga Dec 4, 2020
50ab372
Merge remote-tracking branch 'origin/4.0-7.9' into feature/add-option…
pablomarga Dec 4, 2020
3b9f1d1
CHANGELOG modified
pablomarga Dec 4, 2020
4b42f5b
Added architectures and fixed errors
pablomarga Dec 9, 2020
bcdd3a4
Requested changes
pablomarga Dec 9, 2020
02c3c6d
Typerror fixed and added default architectures
pablomarga Dec 10, 2020
b43a27b
Errors fixed
pablomarga Dec 10, 2020
17f63b6
[Fix] Empty inventory data in Solaris agents (#2680)
gabiwassan Dec 11, 2020
040a597
Remove filter
pablomarga Dec 14, 2020
4f5e0d7
Fixed Dev Tools hints
pablomarga Dec 15, 2020
8778083
Requested changes
pablomarga Dec 16, 2020
1ae8732
Added blank space in commentaries
pablomarga Dec 16, 2020
4df6d4a
[Fix] Wrong permissions on edit CDB (#2665)
gabiwassan Dec 18, 2020
8483058
feat(): Add message to show information about OS options are missing:
Desvelao Dec 18, 2020
fd0d124
fix: fix text in input to select group on the deploy agent section
Desvelao Dec 18, 2020
e8a2bc2
fix(frontend): add the metafields when refreshing the index pattern (…
Desvelao Dec 18, 2020
746d0ec
Added tag wazuh-wui in role mapping
CPAlejandro Dec 24, 2020
4f49e7e
Added tag wazuh-wui in role mapping
CPAlejandro Dec 24, 2020
4c504af
Added tag wazuh-wui in role mapping
CPAlejandro Dec 24, 2020
ac2ef10
Added tag wazuh-wui in role mapping and fixed Handler.error
CPAlejandro Dec 24, 2020
de9bec9
Adding change in if, string change to int
CPAlejandro Dec 28, 2020
40bfb29
Added updated CHANGELOG.md
CPAlejandro Dec 28, 2020
9c2d453
Fixed error that search internal users without security
CPAlejandro Dec 28, 2020
2b85159
Adding CHANGELOG.md
CPAlejandro Dec 28, 2020
6efb22e
Changing == to ===
Dec 29, 2020
7ebe1af
Fixed message in reserved users actions
CPAlejandro Dec 29, 2020
314338d
Merge branch '4.0-7.9' into bugfixed/dev-tools-recommendations
frankeros Dec 29, 2020
860f2de
Merge pull request #2691 from wazuh/bugfixed/dev-tools-recommendations
frankeros Dec 29, 2020
f0e4594
Merge pull request #2677 from wazuh/feature/add-option-register-agent
frankeros Dec 29, 2020
7a9b760
Merge pull request #2708 from wazuh/feature/2702/wui_rules
frankeros Dec 29, 2020
beaa951
Merge branch '4.0-7.9' into feature/2713-Error-toast-is-showing-about…
frankeros Dec 29, 2020
aef8a8a
Merge pull request #2714 from wazuh/feature/2713-Error-toast-is-showi…
frankeros Dec 29, 2020
e5600bf
Fixed error due to new use of path in the export of lists
CPAlejandro Dec 30, 2020
cb00bc9
Merge branch '4.0-7.9' into feature/2692-Error-500-on-Export-formatte…
Dec 30, 2020
5e18539
Setting variables as value object key
CPAlejandro Dec 30, 2020
0a08203
Merge pull request #2717 from wazuh/feature/2692-Error-500-on-Export-…
frankeros Jan 4, 2021
6a708af
Fixed validation and return on checkMissingUserPermissions.
gabiwassan Jan 4, 2021
cd56392
Merge branch 'cloud/4.0-7.9' into 4.0-7.9
Desvelao Jan 4, 2021
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
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,38 @@

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

## Wazuh v4.0.3 - Kibana v7.9.1, v7.9.2, v7.9.3 - Revision 4015

### Added

- Show the wui_ rules belong to wazuh-wui API user [#2702](https://github.com/wazuh/wazuh-kibana-app/issues/2702)
- Modified agent registration adding groups and architecture [#2666](https://github.com/wazuh/wazuh-kibana-app/issues/2666)[#2652](https://github.com/wazuh/wazuh-kibana-app/issues/2652)

### Fixed

- Create index pattern even if there aren´t available indices [#2620](https://github.com/wazuh/wazuh-kibana-app/issues/2620)
- Top bar overlayed over expanded visualizations [#2667](https://github.com/wazuh/wazuh-kibana-app/issues/2667)
- Empty inventory data in Solaris agents [#2680](https://github.com/wazuh/wazuh-kibana-app/pull/2680)
- Wrong parameters in the dev-tools autocomplete section [#2675](https://github.com/wazuh/wazuh-kibana-app/issues/2675)
- Wrong permissions on edit CDB list [#2665](https://github.com/wazuh/wazuh-kibana-app/pull/2665)
- fix(frontend): add the metafields when refreshing the index pattern [#2681](https://github.com/wazuh/wazuh-kibana-app/pull/2681)
- Error toast is showing about Elasticsearch users for environments without security [#2713](https://github.com/wazuh/wazuh-kibana-app/issues/2713)
- Error about Handler.error in Role Mapping fixed [#2702](https://github.com/wazuh/wazuh-kibana-app/issues/2702)
- Fixed message in reserved users actions [#2702](https://github.com/wazuh/wazuh-kibana-app/issues/2702)

## Wazuh v4.0.3 - Kibana v7.9.1, v7.9.2, v7.9.3 - Revision 4014

### Added

- Improved management of index-pattern fields [#2630] (https://github.com/wazuh/wazuh-kibana-app/issues/2630)
- Improved management of index-pattern fields [#2630](https://github.com/wazuh/wazuh-kibana-app/issues/2630)

### Fixed

- fix(fronted): fixed the check of API and APP version in health check [#2655](https://github.com/wazuh/wazuh-kibana-app/pull/2655)
- Replace user by username key in the monitoring logic [#2654](https://github.com/wazuh/wazuh-kibana-app/pull/2654)
- Security alerts and reporting issues when using private tenants [#2639](https://github.com/wazuh/wazuh-kibana-app/issues/2639)
- Manager restart in rule editor does not work with Wazuh cluster enabled [#2640](https://github.com/wazuh/wazuh-kibana-app/issues/2640)
- fix(frontend): Empty inventory data in Solaris agents [#2680](https://github.com/wazuh/wazuh-kibana-app/pull/2680)

## Wazuh v4.0.3 - Kibana v7.9.1, v7.9.2, v7.9.3 - Revision 4013

Expand Down Expand Up @@ -1760,4 +1780,4 @@ All notable changes to the Wazuh app project will be documented in this file.
### Fixed

- Search bar across panels now support parenthesis grouping
- Several CSS fixes for IE browser
- Several CSS fixes for IE browser
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from "react";
import {EuiPanel, EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingSpinner, EuiIcon} from "@elastic/eui";
import mapValues from 'lodash';
import {useGenericRequest} from '../../../common/hooks/useGenericRequest';
import { TimeService } from '../../../../react-services/time-service';


export function InventoryMetrics({agent}) {
const [params, setParams] = useState({});
const offsetTimestamp = (text, time) => {
Expand All @@ -14,13 +14,18 @@ export function InventoryMetrics({agent}) {
}
}
const syscollector = useGenericRequest('GET', `/api/syscollector/${agent.id}`, params, (result) => {return (result || {}).data || {};});

if(!syscollector.isLoading && (!syscollector.data.hardware || !syscollector.data.os)){
return <EuiPanel paddingSize="s" style={{margin: 16, textAlign: "center"}}>
<EuiIcon type="iInCircle" /> Not enough hardware or operating system information
</EuiPanel>
}


if (
!syscollector.isLoading &&
(mapValues.isEmpty(syscollector.data.hardware) || mapValues.isEmpty(syscollector.data.os))
) {
return (
<EuiPanel paddingSize="s" style={{ margin: 16, textAlign: 'center' }}>
<EuiIcon type="iInCircle" /> Not enough hardware or operating system information
</EuiPanel>
);
}

return (
<EuiPanel paddingSize="s" style={{margin: 16}}>
<EuiFlexGroup>
Expand All @@ -45,6 +50,6 @@ export function InventoryMetrics({agent}) {
</EuiFlexGroup>
</EuiPanel>
);


}
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ export function SyscollectorTable({ tableParams }) {
};

const buildColumns = () => {
const columns = tableParams.columns.map(item => {
return (tableParams.columns || []).map(item => {
return {
field: item.id,
name: KeyEquivalence[item.id] || item.id,
sortable: typeof item.sortable !== 'undefined' ? item.sortable : true,
width: item.width || undefined,
}
};
});
return columns;
}
};

const columns = buildColumns();

Expand Down Expand Up @@ -82,6 +81,13 @@ export function SyscollectorTable({ tableParams }) {
return `(${data.total_affected_items})`;
}

const downloadCsv = async () => {
await AppState.downloadCsv(
tableParams.path,
tableParams.exportFormatted,
!!params.search ? [{ name: 'search', value: params.search }] : []
)
}

return (
<EuiPanel paddingSize="m" style={{ margin: '12px 16px 12px 16px' }}>
Expand Down Expand Up @@ -117,19 +123,19 @@ export function SyscollectorTable({ tableParams }) {
/>
</EuiFlexItem>
</EuiFlexGroup>
{tableParams.exportFormatted &&
<EuiFlexGroup >
<EuiFlexItem grow={true} > </EuiFlexItem>
<EuiFlexItem grow={false} >
{tableParams.exportFormatted && tableParams.columns && (
<EuiFlexGroup>
<EuiFlexItem grow={true} />
<EuiFlexItem grow={false}>
<EuiButtonEmpty
onClick={async () => await AppState.downloadCsv(tableParams.path, tableParams.exportFormatted, !!params.search ? [{ name: 'search', value: params.search }] : [])}
iconType="importAction">
onClick={downloadCsv}
iconType="importAction"
>
Download CSV
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>
}

)}
</EuiPanel>
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {
EuiSpacer,
EuiToolTip,
EuiInMemoryTable,
EuiBadge,
EuiFlexItem,
Expand Down Expand Up @@ -58,10 +60,23 @@ export const RolesMappingTable = ({ rolesEquivalences, rules, loading, editRule,
{
field: 'id',
name: 'Status',
render: item => {
return WzAPIUtils.isReservedID(item) && <EuiBadge color="primary">Reserved</EuiBadge>;
render (item, obj){
if(WzAPIUtils.isReservedID(item)){
if( (obj.id === 1 || obj.id === 2)){
return(
<EuiFlexGroup>
<EuiBadge color="primary">Reserved</EuiBadge>
<EuiToolTip position="top" content="wui_ rules belong to wazuh-wui API user">
<EuiBadge color="accent" style={{ marginLeft: 10 }}>wazuh-wui</EuiBadge>
</EuiToolTip>
</EuiFlexGroup>
);
}
else
return <EuiBadge color="primary">Reserved</EuiBadge>;
}
},
width: '150',
width: '300',
sortable: false,
},
{
Expand Down
10 changes: 6 additions & 4 deletions public/components/security/roles-mapping/roles-mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const RolesMapping = () => {
setRolesEquivalences(_rolesObject);
}
if (rolesError) {
ErrorHandler.error('There was an error loading roles');
ErrorHandler.handle('There was an error loading roles');
}
}, [rolesLoading]);

Expand All @@ -63,7 +63,7 @@ export const RolesMapping = () => {
}).sort((a, b) => (a.user > b.user) ? 1 : (a.user < b.user) ? -1 : 0);
setInternalUsers(_users);
} catch (error) {
ErrorHandler.error('There was an error loading internal users');
ErrorHandler.handle('There was an error loading internal users');
}
};

Expand All @@ -72,14 +72,16 @@ export const RolesMapping = () => {
const _rules = await RulesServices.GetRules();
setRules(_rules);
} catch (error) {
ErrorHandler.error('There was an error loading rules');
ErrorHandler.handle('There was an error loading rules');
}
};

const initData = async () => {
setLoadingTable(true);
await getRules();
await getInternalUsers();
if(currentPlatform !== "elastic"){
await getInternalUsers();
}
setLoadingTable(false);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const UsersTable = ({ users, editUserFlyover, rolesLoading, roles, onSave
<WzButtonModalConfirm
buttonType="icon"
tooltip={{
content: WzAPIUtils.isReservedID(item.id) ? "Reserved users mapping can't be deleted" : 'Delete user',
content: WzAPIUtils.isReservedID(item.id) ? "Reserved users can't be deleted" : 'Delete user',
position: 'left',
}}
isDisabled={WzAPIUtils.isReservedID(item.id)}
Expand Down
Loading