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

Fix invalid date format #6234

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Fix invalid date format #6234

merged 2 commits into from
Dec 19, 2023

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Dec 19, 2023

Description

This PR fixes a few redundant date formats. This was caused by some components trying to format dates already formatted.

It also improves the validation of the date parameter in the formatUIDate service.

Important

The issue can only be replicated in Firefox. Nevertheless, it should be tested in all browsers with a real manager.

Issues Resolved

Closes #6207 #6212 #6220

Evidence

image

image

image

Test

  • Go to About page and check the date renders properly
  • Register an agent in a Wazuh server
  • Go to Endpoints Summart and check the date values are rendered properly
  • Select an agent in the table and verify Registration date and Last keep alive values render a valid date

Check List

  • All tests pass
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@asteriscos asteriscos self-assigned this Dec 19, 2023
@asteriscos asteriscos requested a review from a team as a code owner December 19, 2023 14:10
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 21.42% ( 186 / 868 )
Branches 17.99% ( 79 / 439 )
Functions 14.22% ( 36 / 253 )
Lines 21.65% ( 183 / 845 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.68% ( 171 / 223 )
Branches 57.57% ( 57 / 99 )
Functions 61.7% ( 29 / 47 )
Lines 76.68% ( 171 / 223 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 12.08% ( 4159 / 34427 )
Branches 8.17% ( 1889 / 23116 )
Functions 11.53% ( 943 / 8175 )
Lines 12.25% ( 4046 / 33018 )

@Tostti Tostti self-requested a review December 19, 2023 14:23
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 Chrome Firefox Safari Brave Edge
Verify render in about page 🟢 🟢 🟢 🟢 🟢
Verify render in agents page 🟢 🟢 🟢 🟢 🟢
Firefox

image
image

Chrome

image
image

Safari

image
image

Brave

image
image

Edge

image
image

Test ✅
CR ✅

LGTM

@Machi3mfl Machi3mfl self-requested a review December 19, 2023 16:08
Copy link
Member

@Machi3mfl Machi3mfl left a comment

Choose a reason for hiding this comment

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

Test Chrome Firefox Safari Brave Edge
Verify render in about page 🟢 🟢 🟢
Verify render in agents page 🟢 🟢 🟢
Firefox Screenshot 2023-12-19 at 13 51 33 Screenshot 2023-12-19 at 13 52 10
Chrome Screenshot 2023-12-19 at 13 42 56 Screenshot 2023-12-19 at 13 45 47
Safari Screenshot 2023-12-19 at 13 48 00 Screenshot 2023-12-19 at 13 49 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants