NethServer / nethsecurity

NethSecurity image and build environment
https://www.nethsecurity.org/
Other
98 stars 6 forks source link

MultiWAN: UI/UX improvements for rules and policies #580

Closed gsanchietti closed 3 months ago

gsanchietti commented 3 months ago

Proposed changes:

  1. Update Validator:

    • Allow single ports, multiple ports (comma-separated), and port ranges (e.g., '5500-5600') in MultiWAN rules.
    • Use a hyphen (-) in the UI for port ranges, but store it as a colon (:) in the database.
  2. Add Information Tooltip:

    • Display a message: "Enter a single port, multiple ports separated by a comma (e.g., '8686, 9090'), or port ranges (e.g., '5500-5600')."
  3. Documentation Update:

    • Reflect these changes in the documentation with examples.
  4. Fix Input Field Issue:

    • Ensure input fields for policy and rule names are properly disabled when editing.
  5. Add Form Validation:

    • Validate required fields in the policy editor.
  6. Clean Forms on Exit:

    • Clear form content and validation messages when the drawer is closed or canceled.
  7. Improve Translation Handling:

    • Ensure all UI elements are properly translated.
gsanchietti commented 3 months ago

Testing image: 8-23.05.3-ns.1.0.1-10-g168db29

stephdl commented 3 months ago

QA

Install the test image

configure a multiwan configuration for test purposes (two WAN and one LAN)

Create a policy with a trailing space in the name, the validation must not fail and the trailing spaces must be removed

echo '{}' | /usr/libexec/rpcd/ns.mwan call index_rules
echo '{}' | /usr/libexec/rpcd/ns.mwan call index_policies
cotosso commented 3 months ago

port range is stored in the database with a hyphen (-) instead of colon (:) as requested.

gsanchietti commented 3 months ago

Testing image: 23.05.3-ns.1.0.1-15-g10de678

cotosso commented 3 months ago

now it works as expected.