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

Support for CDB lists beginning with quotes #7171

Conversation

yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented Nov 22, 2024

Description

Fixes the rendering of the table as in some cases they were not rendering correctly.

For example:

  • “:key” was not rendering in the table.

And added validations in the inputs.

Issues Resolved

Evidence

image

image

Test

  1. Navigate to CDB list
  2. Create CDB list with different keys
    • key:
    • "key":key
    • "key:":"key:"
    • key1:"key:"
  3. The table should be rendered accordingly.
  4. The keys and values in quotes must be at the beginning and at the end, not in the middle of the value.

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

@yenienserrano yenienserrano self-assigned this Nov 22, 2024
@yenienserrano yenienserrano linked an issue Nov 22, 2024 that may be closed by this pull request
@yenienserrano yenienserrano changed the title support for CDB lists beginning with ” Support for CDB lists beginning with ” Nov 22, 2024
@yenienserrano yenienserrano changed the title Support for CDB lists beginning with ” Support for CDB lists beginning with quotes Nov 22, 2024
@JuanGarriuz JuanGarriuz self-requested a review November 25, 2024 07:15
@JuanGarriuz
Copy link
Member

JuanGarriuz commented Nov 25, 2024

When add a CDB with this structure key:"name:value" other CDB with key called equal don't render in the table.

image

@chantal-kelm chantal-kelm self-requested a review November 25, 2024 14:24
@chantal-kelm
Copy link
Member

When trying to save the following key-value pairs, the following error occurs.
But it does not give any error when adding them:

image

Copy link
Contributor

@guidomodarelli guidomodarelli left a comment

Choose a reason for hiding this comment

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

Legend:
⚫ 🠊 The test hasn't started yet.
🟢 🠊 All checks passed.
🟡 🠊 There is at least one expected fail or skipped test and no failures.
🔴 🠊 There is at least one failed check.
⚪ 🠊 Doesn't apply.
🔧 🠊 Request changes.

CR 🔧
TEST ⚫

@chantal-kelm
Copy link
Member

When trying to save the following key-value pairs, the following error occurs.
But it does not give any error when adding them:

image

Copy link
Contributor

@guidomodarelli guidomodarelli left a comment

Choose a reason for hiding this comment

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

Legend:
⚫ 🠊 The test hasn't started yet.
🟢 🠊 All checks passed.
🟡 🠊 There is at least one expected fail or skipped test and no failures.
🔴 🠊 There is at least one failed check.
⚪ 🠊 Doesn't apply.
🔧 🠊 Request changes.

CR 🔧
TEST 🔴

image

image

image

image

@chantal-kelm
Copy link
Member

When trying to save the following key-value pairs, the following error occurs.
But it does not give any error when adding them:

Captura de pantalla 2024-11-26 a la(s) 6 34 02 p  m

chantal-kelm
chantal-kelm previously approved these changes Nov 28, 2024
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.

Captura de pantalla 2024-11-28 a la(s) 5 00 11 p  m Captura de pantalla 2024-11-28 a la(s) 4 59 28 p  m

chantal-kelm
chantal-kelm previously approved these changes Nov 29, 2024
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: ✅

Captura de pantalla 2024-11-29 a la(s) 11 16 08 a  m Captura de pantalla 2024-11-29 a la(s) 11 16 54 a  m

@guidomodarelli
Copy link
Contributor

guidomodarelli commented Nov 29, 2024

Legend:
⚫ 🠊 The test hasn't started yet.
🟢 🠊 All checks passed.
🟡 🠊 There is at least one expected fail or skipped test and no failures.
🔴 🠊 There is at least one failed check.
⚪ 🠊 Doesn't apply.
🔧 🠊 Request changes.

CR 🟢
TEST 🟢

image

image

image

image

image

guidomodarelli
guidomodarelli previously approved these changes Nov 29, 2024
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.5% ( 400 / 879 )
Branches 41.09% ( 157 / 382 )
Functions 43.87% ( 136 / 310 )
Lines 45.69% ( 398 / 871 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.44% ( 172 / 225 )
Branches 58.65% ( 61 / 104 )
Functions 61.7% ( 29 / 47 )
Lines 76.44% ( 172 / 225 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 15.25% ( 4540 / 29763 )
Branches 10.07% ( 1943 / 19284 )
Functions 15.16% ( 1089 / 7182 )
Lines 15.46% ( 4429 / 28632 )

@chantal-kelm chantal-kelm self-requested a review December 2, 2024 11:48
Copy link
Contributor

@guidomodarelli guidomodarelli 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 merged commit 03327a8 into 4.10.2 Dec 2, 2024
5 of 6 checks passed
@asteriscos asteriscos deleted the fix/7166-cdb-list-entries-that-begins-with-colon-are-not-shown branch December 2, 2024 15:37
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.

CDB list entries that begins with colon : are not shown
5 participants