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

Add applications to global menu #5840

Merged
merged 57 commits into from
Nov 3, 2023

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Sep 1, 2023

Description

This pull request adds the Wazuh applications to the global menu.

Changes:

Side changes

  • Remove some unwanted navigation by tabs

Issues Resolved

#5841

Evidence

image
image

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@Desvelao Desvelao self-assigned this Sep 1, 2023
@Desvelao Desvelao linked an issue Sep 1, 2023 that may be closed by this pull request
5 tasks
yenienserrano and others added 13 commits September 7, 2023 13:38
* Change Agents for Endpoints summary

* Remove unnecessary styles

* Remove deprecated code

* Remove deprecated code

* Revert changes in wz-menu.js

* Remove deprecated code

* Change some breadcrumbs

* Remove wazuh menu

* Change Management breadcrumbs

* Change setGlobalBreadcrumbs for withGlobalBreadcrumbs hoc

* Fix test

* Change href to agent

* Fix redirection breadcrumbs: inventory data, stats and configuration
* Add Tab into Configuration App to show Miscellaneous as a tab

* Change compareCurrentAppID: wz-configuration to configuration

---------

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
* Fix endpoint summary and server managment redirections

* fix: adapt the redirections to applications

- Endpoints summary
- IT Hygiene
- Groups

* fix(health-check): fix redirection to health check the removed the tab query parameter from URL and then the previous URL could not be rebuilt

* fix(redirections): redirection from Overview app to Endpoints summary

* fix(redirections): removed wz- prefix from the redirections to applications

* fix: renamed apps redirection URLs

* fix: app redirections URLs

* fix: test

* fix: tests

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
* Fix endpoint summary and server managment redirections

* fix: adapt the redirections to applications

- Endpoints summary
- IT Hygiene
- Groups

* fix(health-check): fix redirection to health check the removed the tab query parameter from URL and then the previous URL could not be rebuilt

* fix(redirections): redirection from Overview app to Endpoints summary

* fix(redirections): removed wz- prefix from the redirections to applications

* Change overview page, linked to the new menu estructure

* fix: move definitions of applications in the home application

* fix: application descriptions

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Merge master into feat/83-move-menu-items-to-applications
Fix redirection agents table
* Fix groups redirection

* Fix statistics redirection
* Remove wazuh in breadcrumb

* Change breadcrumb OSD

* Add comment

* Center the agent's name in the breadcrumb
JuanGarriuz and others added 2 commits October 20, 2023 16:10
* remove modules

* registry.json extension remove

* remove getExtension from menu-agent and wz-menu

* Delete extensions logic

* Fix wazuh version test

* remove disabled_roles extructure

* remove disabled_roles endpoint

* Add a migration to remove the extensions key in the host and add test for it

* mange-host and update-registry fixed

* fix: render tabs in Wazuh plugin settings application and minor enhancements

* feat: remove unused states in Redux store and minor fixes on breadcrumbs

- Remove managementReducers key from Redux store and related action
  creators and related usage
- Remove toolsReducers key from Redux store and related action
  creators and related usage
- Remove securityReducers key from Redux store and related action
  creators and related usage
- Fix some breadcrumbs

* fix: revert content of osquery.js files

* fix: revert configuration in .settings.json

* fix(test): fix test

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
* feat: add agent selector to IT Hygiene application

- Wrapped the IT Hygiene application with a required selection of agent
- Added a Explore agent button to the IT Hygiene application
- The Explore agent button of alert modules now display the global agent
  selector instead of the local one.
- Removed the local agent selector modal of Explore agent button on alert
  modules
- Removed the related action creator and reducer case for SHOW_EXPLORE_AGENT_MODAL

* feat: add reactivity to agent welcome view when changing the selected agent

- Refactor MITRE ATT&CK panel
  - Rename MITRE to MITRE ATT&CK in the panel
- Rename mitre_top to mitre-top according to the file naming convention
- Add reactivity to the FIM: Recent events table when changing the
  selected agent

* feat(it-hygiene): fix problems when selecting and agent and navigate

- Move prompt agent never connected to prompts directory
  - Remove duplicated and related components on agent welcome, inventory
    data and agent configuration
- Change button on prompt agent never connected to Select agent
- Change Explore agent button on agent welcome

* fix: imports on prompt and add clarification on agent welcome

* fix(it-hygiene): change mitre attack referecence

* Fix navbar agent styles

* Fix refresh page: inventory data and stats

---------

Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Desvelao and others added 18 commits October 25, 2023 10:32
* Fix change apis

* Change management label in menu
* Define the component properties in the controller constructor

* Delete redundant fetch in Events refresh button

* Prevent duplicate request on Events initial requests

* Revert "Prevent duplicate request on Events initial requests"

This reverts commit db721a1.

* Remove dulplicate request on changeTabView
### Description

Changes in the left menu order
Change of styles in Home > Overview
Changed left menu and breadcrumbs names
Redirects were changed so that it does not refresh the page and to have
it centralized in the applications file.
 
### Issues Resolved

- wazuh/wazuh-dashboard#94

### Evidence


![image](https://github.com/wazuh/wazuh-dashboard-plugins/assets/63758389/6915bad3-2a30-4313-9ddf-409a3ff1ba66)

![image](https://github.com/wazuh/wazuh-dashboard-plugins/assets/63758389/140ef5ad-7f89-4ddf-8f23-d8ec870888dc)

![image](https://github.com/wazuh/wazuh-dashboard-plugins/assets/63758389/b7b5fd51-17e3-4a6a-a990-621ff9f86a48)


### Test

Legend:
:black_circle:: none
:green_circle:: pass
:yellow_circle:: warning
:red_circle:: fail
:white_circle:: not applicable

## UI

| Test | Chrome |
| --- |  --- |
| See the menu titles without camel case and the sub sections in camel
case, in the breadcrumb it should look the same.| :black_circle: |
| The Home > Overview icon styles should be the same as those in the
menu (test it in dark and light mode) | :black_circle: |
| Breadcrumb redirect well to the agent | :black_circle: |
| In the agent view: The pinned applications should redirect to the
respective application without reloading the page and if you hover it
should show the url to which it redirects. | :black_circle: |
| In the agent view: When the menu is opened with the `More` button the
options should redirect to the respective application without reloading
the page and if hovered the url to which it redirects should appear. |
:black_circle: |
| In the agent view: The Open MITRE ATT&CK button should redirect to the
MITRE ATT&CK application without reloading the page and if hovered the
url to which it redirects should appear. | :black_circle: |
| In the agent view: On the `FIM` card the icon should redirect to `FIM`
without reloading the page and if hovered the url should appear. |
:black_circle: |
| In the agent view: On the `SCA: last scan` card the icon should
redirect to `SCA` without reloading the page and if the cursor is
hovered over the url it redirects to should appear. | :black_circle: |
| In the agent view: On the `SCA: last scan` card the title should
redirect to `SCA` without reloading the page and hovering over it should
display the url it redirects to. | :black_circle: |
| In the agent view: On the `SCA: last scan` card The caption should
redirect to `SCA` without reloading the page and if hovered over should
display the url to which it redirects. | :black_circle: |
| In the overview: Without agents the `Add agent` button should redirect
to the `Endpoint Summary` application without making a page reload and
if hovered the url to which it redirects should appear. | :black_circle:
|
| In the overview: The cards should redirect to their respective
application without reloading the page and if you hover on the title you
should see the url you are redirected to. | :black_circle: |
| In the healthcheck: The `Go to settings` button should redirect to the
`Server APIs` application without reloading the page and if you hover it
should show the url to which it redirects. | :black_circle: |
| Applications with sample data: The button that takes you to sample
data from the applications should redirect to the `Sample Data`
application without making a page reload and if you hover it should
appear the url to which it redirects. | :black_circle: |
| In Endpoint Summary: The action buttons of the table should redirect
to the `IT Hygiene` application without reloading the page and if
hovered the url to which it redirects should appear. | :black_circle: |
| In the configuration of an agent: The group buttons should redirect to
the `Endpoint Groups` application without reloading the page and if
hovered the url should be displayed. | :black_circle: |
| In statistics: The `Settings` button should redirect to the `App
Settings` application without a page reload and if hovered the url to
which it redirects should appear. | :black_circle: |


**Details**
<details>
<summary>:black_circle: See the menu titles without camel case and the
sub sections in camel case, in the breadcrumb it should look the same.
</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: The Home > Overview icon styles should be the
same as those in the menu (test it in dark and light mode)</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: Breadcrumb redirect well to the agent</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: The pinned applications
should redirect to the respective application without reloading the page
and if you hover it should show the url to which it redirects.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: When the menu is opened with
the `More` button the options should redirect to the respective
application without reloading the page and if hovered the url to which
it redirects should appear.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: The Open MITRE ATT&CK button
should redirect to the MITRE ATT&CK application without reloading the
page and if hovered the url to which it redirects should
appear.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: On the `FIM` card the icon
should redirect to `FIM` without reloading the page and if hovered the
url should appear.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: On the `SCA: last scan` card
the icon should redirect to `SCA` without reloading the page and if the
cursor is hovered over the url it redirects to should appear.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: On the `SCA: last scan` card
the title should redirect to `SCA` without reloading the page and
hovering over it should display the url it redirects to.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the agent view: On the `SCA: last scan` card
The caption should redirect to `SCA` without reloading the page and if
hovered over should display the url to which it redirects.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the overview: Without agents the `Add agent`
button should redirect to the `Endpoint Summary` application without
making a page reload and if hovered the url to which it redirects should
appear.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the overview: The cards should redirect to
their respective application without reloading the page and if you hover
on the title you should see the url you are redirected to.
</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: In the healthcheck: The `Go to settings` button
should redirect to the `Server APIs` application without reloading the
page and if you hover it should show the url to which it
redirects.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: - Applications with sample data: The button that
takes you to sample data from the applications should redirect to the
`Sample Data` application without making a page reload and if you hover
it should appear the url to which it redirects.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: - In Endpoint Summary: The action buttons of the
table should redirect to the `IT Hygiene` application without reloading
the page and if hovered the url to which it redirects should
appear.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: - In the configuration of an agent: The group
buttons should redirect to the `Endpoint Groups` application without
reloading the page and if hovered the url should be displayed.</summary>

Chrome - :black_circle:

</details>

<details>
<summary>:black_circle: - In statistics: The `Settings` button should
redirect to the `App Settings` application without a page reload and if
hovered the url to which it redirects should appear.</summary>

Chrome - :black_circle:

</details>






### Check List
- [ ] All tests pass
  - [ ] `yarn test:jest`
- [ ] New functionality includes testing.
- [ ] New functionality has been documented.
- [ ] Update [CHANGELOG.md](./../CHANGELOG.md)
- [x] Commits are signed per the DCO using --signoff
@Desvelao Desvelao marked this pull request as ready for review November 3, 2023 10:36
@Desvelao Desvelao requested a review from a team as a code owner November 3, 2023 10:36
Copy link
Contributor

github-actions bot commented Nov 3, 2023

Code coverage (Jest) % values
Statements 11.93% ( 4109 / 34436 )
Branches 8.13% ( 1888 / 23196 )
Functions 11.2% ( 920 / 8214 )
Lines 12.09% ( 3994 / 33018 )

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

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

LGTM

image

@asteriscos asteriscos merged commit 8651d16 into 4.8.0 Nov 3, 2023
2 checks passed
@asteriscos asteriscos deleted the feat/83-move-menu-items-to-applications branch November 3, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Register the new applications
4 participants