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

Disable synced by default #5143

Merged

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Jan 19, 2023

Description

Hi team,

This PR:

  • Disables by default the Synced - Registration Date - Last Keep Alive fields of the Agents table and removes the metric on the top of the view. Even though it is disabled, it still can be enabled by checking the field in the table settings.
  • It also changes the text IP and the text OS to IP address and to Operating system throughout the app.
  • Improves the Agents table dynamic layout
  • Fixes Windows and MacOs operating system icons in the agents table

Issues Resolved

Closes #5141

Evidence

image

Tests

Synced field - Registration Date - Last Keep Alive

  • Register agents in the manager
  • Go to Agents overview
  • Check the table does not include the synced field
  • Check the top metrics don't include the Synced percentage
  • Check the synced field can be enabled in the Agents table

Replace OS to Operating system and IP to IP address

Agents table

image

Agents Inventory PDF report

  • Go to an Agent inventory data
  • Generate PDF report

image
image
image

Groups agents table

  • Go to Management -> Groups
  • Select a group
    image

Agent overview

  • Go to Agents
  • Select an agent

image

Management cluster

  • Go to Management -> Cluster
  • Click on Nodes link

image
image

Office365 Panel

  • Go to Office365 -> Panel
  • Click on any Top Client IP Address table row to drill-down

image
image

Global Configuration Remote

  • Go to Management -> Configuration
  • Click on the Global configuration row
  • Click on the Remote tab

image

Explore Agent modal

  • Go to Security Events
  • Click on Explore Agent button

image

Redistribute Agents Table column widths automatically

  • Go to Agents Overview
  • Add and remove all available columns to force different widths in the columns
  • Check they adjust properly

Verify all main agents operating system have the proper icon in the table

  • Register Linux, Windows and MacOS agents
  • Check they have the corresponding icon in the Agents Overview Table

Important
To test it properly, delete the preview local storage table configuration
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

@asteriscos asteriscos requested a review from a team as a code owner January 19, 2023 16:55
@asteriscos asteriscos self-assigned this Jan 19, 2023
Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

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

According to the Issue, the Registration date and Last keep alive fields should also be disabled by default

@Desvelao Desvelao linked an issue Jan 24, 2023 that may be closed by this pull request
Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

nitpick: There are more files that contain references to IP and OS that we could be interested to change too.

Some of them:

  • common/csv-key-equivalence.ts
  • public/components/overview/office-panel/config/main-view-config.tsx
  • public/components/visualize/visualizations.js (IP by Users)
  • public/controllers/management/components/management/configuration/global-configuration/global-configuration-remote.js
  • public/templates/management/management.html
  • server/controllers/wazuh-reporting.ts
  • server/integration-files/visualizations/overview/overview-hipaa.ts
  • server/integration-files/visualizations/overview/overview-office.ts
  • common/csv-key-equivalence.ts Review where it is affecting to
  • common/compliance-requirements/pci-requirements.ts Not sure if this we could change it or should not changed.
  • public/controllers/agent/components/agents-table.js
  • public/controllers/management/components/management/configuration/vulnerabilities/vulnerabilities-providers.js
  • public/controllers/overview/components/overview-actions/agents-selection-table.js
  • server/lib/reporting/agent-configuration.ts
  • server/lib/reporting/extended-information.ts
  • public/controllers/management/components/management/groups/group-agents-table.js

Fix:

  • public/components/management/cluster/node-list.tsx
  • public/controllers/management/components/management/status/status-agent-info.js

@asteriscos
Copy link
Member Author

nitpick: There are more files that contain references to IP and OS that we could be interested to change too.

Some of them:

  • common/csv-key-equivalence.ts
  • public/components/overview/office-panel/config/main-view-config.tsx
  • public/components/visualize/visualizations.js (IP by Users)
  • public/controllers/management/components/management/configuration/global-configuration/global-configuration-remote.js
  • public/templates/management/management.html
  • server/controllers/wazuh-reporting.ts
  • server/integration-files/visualizations/overview/overview-hipaa.ts

None found

  • server/integration-files/visualizations/overview/overview-office.ts

None found

  • common/csv-key-equivalence.ts Review where it is affecting to
  • common/compliance-requirements/pci-requirements.ts Not sure if this we could change it or should not changed.
  • public/controllers/agent/components/agents-table.js
  • public/controllers/management/components/management/configuration/vulnerabilities/vulnerabilities-providers.js

The space is too small and reducing "Operating system" to "OS" is worthwhile

  • public/controllers/overview/components/overview-actions/agents-selection-table.js
  • server/lib/reporting/agent-configuration.ts
  • server/lib/reporting/extended-information.ts

The "OS" in line 84 is justified to optimize the table space, as the manager name or agent name can be quite lengthy.

  • public/controllers/management/components/management/groups/group-agents-table.js

Fix:

  • public/components/management/cluster/node-list.tsx
  • public/controllers/management/components/management/status/status-agent-info.js

Thanks for the suggestions.

Tostti
Tostti previously approved these changes Jan 24, 2023
Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

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

TEST:✔️
CR:✔️
PREVIOUS REVIEW CHANGES REQUESTED: ✔️

Evidence:
imagen
imagen
imagen

LGTM

AlexRuiz7
AlexRuiz7 previously approved these changes Jan 24, 2023
Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

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

LGTM

@asteriscos asteriscos dismissed stale reviews from AlexRuiz7 and Tostti via f474cf7 January 24, 2023 13:52
@asteriscos
Copy link
Member Author

Table design

The proposal to optimize the agents table is to make use of the euiBasicTable property table-layout="auto" and remove the fixed widths. Setting the table layout to auto make much better use of the blank spaced in columns in favor of lengthy column values.

side effect

The table-layout="auto" prop doesn't support truncating text when the table width is limited by the viewport. To avoid overflowing the table it wraps the lines of the values.

Tostti
Tostti previously approved these changes Jan 25, 2023
Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

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

imagen
imagen
imagen

imagen

TEST:✔️
CR:✔️

LGTM

@chantal-kelm chantal-kelm self-requested a review January 25, 2023 11:48
@chantal-kelm
Copy link
Member

chantal-kelm commented Jan 25, 2023

Replace OS to Operating system and IP to IP address

Agents table 🟢

Chrome 🟢

image

Firefox 🟢

image

Safari 🟢

image

Agents Inventory PDF report 🟢

Chrome 🟢

image image

Firefox 🟢

image image

Safari 🟢

image image

Groups agents table 🟢

Chrome 🟢

image

Firefox 🟢

image

Safari 🟢

image

Agent overview 🟢

Chrome 🟢

image

Firefox 🟢

image

Safari 🟢

image

Management cluster 🟢

Chrome 🟢

image image

Firefox 🟢

image image

Safari 🟢

image image

Office365 Panel 🟢

Chrome 🟢

image image

Firefox 🟢

image image

Safari 🟢

image image

Global Configuration Remote 🟢

Chrome 🟢

image

Firefox 🟢

image

Safari 🟢

image

Explore Agent modal 🟢

Chrome 🟢

image

Firefox 🟢

image

Safari 🟢

image

Redistribute Agents Table column widths automatically 🔴

Chrome 🔴

image

Firefox 🔴

image

Safari 🔴

image

@asteriscos
Copy link
Member Author

Thanks for reporting this. I allowed the Registration date, IP address and version columns to wrap the line to prevent the table overflow.

image

@chantal-kelm
Copy link
Member

Thanks for reporting this. I allowed the Registration date, IP address and version columns to wrap the line to prevent the table overflow.

image

Chrome

The table with all columns added looks good from 864px width onwards

image

Firefox

The table with all columns added looks good from 854px width onwards image

Safari

The table with all columns added looks good from 854px width onwards

image

Copy link
Member

@chantal-kelm chantal-kelm left a comment

Choose a reason for hiding this comment

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

CR: ✅
TEST: ✅

Chrome

The table with all columns added looks good from 864px width onwards

image

Firefox

The table with all columns added looks good from 854px width onwards image

Safari

The table with all columns added looks good from 854px width onwards

image

Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

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

Chrome

The table looks good in all the resolutions. When the is smaller than the width, it enables lateral scroll.

imagen

imagen

Firefox

The table looks good in all the resolutions. When the is smaller than the width, it enables lateral scroll.

imagen

imagen

TEST:✔️
CR:✔️

LGTM

@github-actions
Copy link
Contributor

Code coverage (Jest) % values
Statements 8.76% ( 3237 / 36910 )
Branches 4.5% ( 1291 / 28659 )
Functions 7.63% ( 698 / 9142 )
Lines 8.83% ( 3122 / 35344 )

@asteriscos asteriscos merged commit 311622a into 4.4-2.4-wzd Jan 26, 2023
@asteriscos asteriscos deleted the feature/disable-sync-information-by-default-5141 branch January 26, 2023 13:30
asteriscos added a commit that referenced this pull request Jan 26, 2023
@github-actions
Copy link
Contributor

The backport to 4.4-7.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-7.10 4.4-7.10
# Navigate to the new working tree
cd .worktrees/backport-4.4-7.10
# Create a new branch
git switch --create backport-5143-to-4.4-7.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 311622afdc953d61bd594795b684436c914b3760
# Push it to GitHub
git push --set-upstream origin backport-5143-to-4.4-7.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-7.10

Then, create a pull request where the base branch is 4.4-7.10 and the compare/head branch is backport-5143-to-4.4-7.10.

github-actions bot pushed a commit that referenced this pull request Jan 26, 2023
* Disable synced by default

* Fix column default properties

* Add changelog

* Remove synced KPI from management status

* Fix typos, agent table width style and os.platform

* Replace OS to operating system and IP to IP address

* Change OS to operating system

* Fix agent table layout

* Change IP to IP address in cluster overview

* Fix extendedInformation

* Fix style columnsSelectedCheckboxs

* Remove truncate property of columns

* Add table overflow auto

* Change OS version to flexItem

* Change OS version gutter size

(cherry picked from commit 311622a)
asteriscos added a commit that referenced this pull request Jan 26, 2023
* Disable synced by default

* Fix column default properties

* Add changelog

* Remove synced KPI from management status

* Fix typos, agent table width style and os.platform

* Replace OS to operating system and IP to IP address

* Change OS to operating system

* Fix agent table layout

* Change IP to IP address in cluster overview

* Fix extendedInformation

* Fix style columnsSelectedCheckboxs

* Remove truncate property of columns

* Add table overflow auto

* Change OS version to flexItem

* Change OS version gutter size

(cherry picked from commit 311622a)
asteriscos added a commit that referenced this pull request Jan 27, 2023
Disable synced by default (#5143)

* Disable synced by default

* Fix column default properties

* Add changelog

* Remove synced KPI from management status

* Fix typos, agent table width style and os.platform

* Replace OS to operating system and IP to IP address

* Change OS to operating system

* Fix agent table layout

* Change IP to IP address in cluster overview

* Fix extendedInformation

* Fix style columnsSelectedCheckboxs

* Remove truncate property of columns

* Add table overflow auto

* Change OS version to flexItem

* Change OS version gutter size

(cherry picked from commit 311622a)

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
asteriscos added a commit that referenced this pull request Jan 27, 2023
* Disable synced by default (#5143)

* Disable synced by default

* Fix column default properties

* Add changelog

* Remove synced KPI from management status

* Fix typos, agent table width style and os.platform

* Replace OS to operating system and IP to IP address

* Change OS to operating system

* Fix agent table layout

* Change IP to IP address in cluster overview

* Fix extendedInformation

* Fix style columnsSelectedCheckboxs

* Remove truncate property of columns

* Add table overflow auto

* Change OS version to flexItem

* Change OS version gutter size

(cherry picked from commit 311622a)

* fix: fix renamed os to operating system

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
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.

Disable sync information in agent table by default
5 participants