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

Feature/#2664 added xid validation for event detectors #2743

Merged

Conversation

Limraj
Copy link
Collaborator

@Limraj Limraj commented Oct 25, 2023

No description provided.

- Added maxlength="50" parameter to Export ID (XID) field
- Added maxlength="50" parameter to Export ID (XID) for every event detector

- Added 'if' in validate function inside DataPointEditController.java that checks if XID is longer than 50 characters, if it is than saving breaks and notification pops up

- Added new key for translations (validate.ped.xidTooLong=XID cannot be longer than 50 characters)
- Added two public static validatesXid methods in XidUtils.java:

validateXid(Map<String, String> errors, ResourceBundle resourceBundle, PointEventDetectorVO ped) and

validateXid(DwrResponseI18n response, String xid)

- Replace code that was using similar validation to methods mentioned above with validateXid method
- Moved xidUnique validation to XidUtils.java

- In DataSourceVO.java added error handling, in XidUtils.java validation is using xid contextKey, in DataSourceVO.java used contextKey is dataSourceXid, so displaying errors was added.

Tested:

- XID handling in publisher, watchlist, datasource edit and datapoint edit views - OK
- Added validateXid method for different needs of form validation
@Limraj Limraj added this to the 2.7.7 milestone Oct 25, 2023
@github-actions
Copy link

Java Script Mocha Unit Test Results

268 tests   268 ✔️  7s ⏱️
  70 suites      0 💤
    1 files        0

Results for commit 361d70c.

@github-actions
Copy link

Java JUnit Test Results

2 302 tests   2 302 ✔️  32s ⏱️
     97 suites         0 💤
     97 files           0

Results for commit 361d70c.

@Limraj
Copy link
Collaborator Author

Limraj commented Oct 30, 2023

Work with:

  • Data Sources;
  • Data Points;
  • Event Detetors;
  • Publishers;
  • Scripts;
  • Views;

The topic was about detector validation, so that was fixed.

Further fixes:

  1. Problem with resetting error message, after set corrected value:
    image
  2. Problem is exists in:
  • Maintenance events;
  • Scheduled events;
  • Event handlers;
  • Compound event detectors;
  • Point links;
  • Mailing lists;

image

@Limraj Limraj merged commit 6bfb774 into release/2.7.7 Oct 30, 2023
14 checks passed
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.

2 participants