Skip to content

Conversation

@Nicolas-Nogueira
Copy link

🎯 Feature: IP Address Trimming for Server Management

Description

This PR adds automatic whitespace trimming to IP addresses when creating or updating servers, ensuring consistent data formatting and preventing issues with leading/trailing whitespace.

Changes Made

  • ✅ Added IP address trimming in apiCreateServer and apiUpdateServer schemas
  • ✅ Implemented trimming in createServer and updateServerById service functions
  • ✅ Added comprehensive test suite with 4 test cases covering various scenarios
  • ✅ Included API testing script for manual validation

Technical Details

  • Uses Zod's .transform() method to automatically trim whitespace
  • Handles edge cases: empty strings, whitespace-only inputs, and normal IP addresses
  • Maintains backward compatibility with existing data
  • Added proper test coverage for all trimming scenarios

Testing

  • ✅ Unit tests pass for all trimming scenarios
  • ✅ API integration tests validate end-to-end functionality
  • ✅ Manual testing script included for validation

Screenshots

[You'll need to add before/after screenshots showing the IP address field behavior]

Video Demo

[You'll need to create a video showing:

  1. Current state without trimming
  2. New behavior with automatic trimming
  3. Code walkthrough explaining the implementation]

Related Issues

Fixes #[issue-number] (if applicable)

gentslava and others added 30 commits August 19, 2025 23:56
…ption-when-deleting-in-bulk

feat(ui): add bulk deploy functionality for services in project dashb…
fix(organization): integrate active organization refetching on update/create
feat: bump Traefik v3.2.2 and add swarm network label
Siumauricio and others added 30 commits September 21, 2025 15:15
feat(bitbucket): Deprecate App password and replace it with API token
…nvironments - Fix sorting logic to count actual services instead of environment count - Projects now properly sort by total service count in descending order - Resolves issue where "Most services" showed ascending order instead of descending -Dokploy#2691
…cancellation logic

- Updated the deployment status enum to include 'cancelled'.
- Added a new utility function to handle the cancellation of deployments, setting their status to 'error'.
- Enhanced the status tooltip component to display 'Cancelled' when the status is 'cancelled'.
- Created a new SQL migration to add the 'cancelled' value to the deploymentStatus type.
…per status update

- Updated the initCancelDeployments function to set the status of running deployments to 'cancelled' instead of 'error'.
- Reintroduced the call to initCancelDeployments in the server initialization process to ensure cancellations are handled correctly.
…itialization

- Added the call to initCancelDeployments back into the server initialization process to ensure that deployment cancellations are handled correctly in all environments.
…s-has-no-effect-#2691

Feat: "Most services" sorting to count total services across environments -2691
…-mark-as-running-when-they-never-ended-vps-shutdown

2670 bug deployments are mark as running when they never ended vps shutdown
- Added support for Bitbucket email and workspace name in the authentication process.
- Updated the clone URL generation to use the correct format for API tokens.
- Improved error handling to ensure required fields are provided for both API tokens and app passwords.
- Added console logs for debugging clone URL and repository information during cloning.
…g process

- Removed console logs for clone URL and repository information to clean up the output during the cloning process.
…ts-are-broken-auth-token-wont-work

fix(bitbucket): enhance Bitbucket authentication handling
style: move Deployments tab after Domains tab
feat: add unsaved changes tracking and UI indication
feat(scheduler): auto-switch to 'Custom' on manual input
feat: support Arvancloud CDN detection
feat: support cloning repositories over HTTP in Gitea integration
fix: add environment in buildLink for docker compose deploy notifications
- Add automatic whitespace trimming to ipAddress field in apiCreateServer and apiUpdateServer schemas
- Implement trimming in createServer and updateServerById service functions
- Add comprehensive test suite for IP address trimming functionality
- Include test cases for leading/trailing spaces, empty strings, and whitespace-only inputs
- Add API testing script for manual validation

This ensures consistent IP address formatting and prevents issues with leading/trailing whitespace in server configurations.
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.