Skip to content

Commit

Permalink
Merge branch '4.9.0' into feat/6536-remove-angularjs-controller-blank…
Browse files Browse the repository at this point in the history
…-screen
  • Loading branch information
Desvelao committed Mar 26, 2024
2 parents 00b02ae + ef51ca4 commit fa8dca8
Show file tree
Hide file tree
Showing 47 changed files with 1,728 additions and 799 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Expand Up @@ -10,19 +10,21 @@ All notable changes to the Wazuh app project will be documented in this file.
- Added AngularJS dependencies [#6145](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6145)
- Added a migration task to setup the configuration using a configuration file [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Added the ability to manage the API hosts from the Server APIs [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337) [#6519](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6519)
- Added edit agent groups and upgrade agents actions to Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) [#6476](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6476) [#6274](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6274) [#6501](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6501)
- Improve fleet management by adding 'Edit Agent Groups' and 'Upgrade Agents' actions, as well as a filter to show only outdated agents [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) [#6476](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6476) [#6274](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6274) [#6501](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6501) [#6529](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6529)
- Added propagation of updates from the table to dashboard visualizations in Endpoints summary [#6460](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6460)
- Handle index pattern selector on new discover [#6499](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6499)

### Changed

- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/#6459)
- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434)
- Develop logic of a new index for the fim module [#6227](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6227)
- Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250)
- Changed as the configuration is defined and stored [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Change the view of API is down and check connection to Server APIs application [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Changed the usage of the endpoint GET /groups/{group_id}/files/{file_name} [#6385](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6385)
- Refactoring and redesign endpoints summary visualizations [#6268](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6268)
- Move the AngularJS controller and template of blank screen to ReactJS component [#6538](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6538)
- Remove AngularJS controller for manage groups [#6543](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6543)

### Fixed

Expand Down
Expand Up @@ -141,7 +141,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -544,7 +544,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -897,7 +897,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -1303,7 +1303,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -1711,7 +1711,7 @@ exports[`Inventory component A Apple agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -2289,7 +2289,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -2691,7 +2691,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -3075,7 +3075,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -3480,7 +3480,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -3888,7 +3888,7 @@ exports[`Inventory component A Linux agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -4587,7 +4587,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -4990,7 +4990,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -5367,7 +5367,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -5770,7 +5770,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -6080,7 +6080,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down Expand Up @@ -6464,7 +6464,7 @@ exports[`Inventory component A Windows agent should be well rendered. 1`] = `
class="euiFlexItem"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero wz-flex-basis-auto"
Expand Down
51 changes: 26 additions & 25 deletions plugins/main/public/components/common/buttons/button.tsx
Expand Up @@ -15,38 +15,39 @@ import {
EuiButtonEmpty,
EuiButtonIcon,
EuiLink,
EuiToolTip
EuiToolTip,
EuiSwitch,
} from '@elastic/eui';

enum WzButtonType{
enum WzButtonType {
default = 'default',
empty = 'empty',
icon = 'icon',
link = 'link'
link = 'link',
switch = 'switch',
}

interface WzButtonProps{
buttonType?: WzButtonType
tooltip?: any
rest?: any
};

const WzButtons: {[key in WzButtonType]: React.FunctionComponent} = {
'default': EuiButton,
'empty': EuiButtonEmpty,
'icon': EuiButtonIcon,
'link': EuiLink,
interface WzButtonProps {
buttonType?: WzButtonType;
tooltip?: any;
rest?: any;
}

export const WzButton = ({buttonType = WzButtonType.default, tooltip, ...rest}: WzButtonProps) => {
const WzButtons: { [key in WzButtonType]: React.FunctionComponent } = {
default: EuiButton,
empty: EuiButtonEmpty,
icon: EuiButtonIcon,
link: EuiLink,
switch: EuiSwitch,
};

export const WzButton = ({
buttonType = WzButtonType.default,
tooltip,
...rest
}: WzButtonProps) => {
const Button = WzButtons[buttonType];

const button = <Button {...rest} />
return tooltip ?
<EuiToolTip
{...tooltip}
>
{button}
</EuiToolTip>
: button
}

const button = <Button {...rest} />;
return tooltip ? <EuiToolTip {...tooltip}>{button}</EuiToolTip> : button;
};
@@ -0,0 +1,5 @@
import { tDataSource } from './index'
export type tDataSourceFactory = {
create(item: tDataSource): tDataSource;
createAll(items: tDataSource[]): tDataSource[];
}
@@ -0,0 +1,8 @@
import { tDataSource } from "./data-source";

export interface DataSourceRepository {
get(id: string): Promise<tDataSource>;
getAll(): Promise<tDataSource[]>;
setDefault(dataSource: tDataSource): Promise<void> | void;
getDefault(): Promise<tDataSource | null> | tDataSource | null;
}

0 comments on commit fa8dca8

Please sign in to comment.