feat: Update port initialization and handling for FTP/SFTP configurations

- Changed default port initialization for source and destination configurations to 0, triggering default settings based on connection type.
- Implemented logic to set default ports for FTP (21) and SFTP (22) in the frontend templates.
- Enhanced input fields for FTP and SFTP forms to initialize and update port values dynamically based on user selections.
- Updated backend configuration generation to include the correct port values for source and destination settings.
This commit is contained in:
StarFleetCPTN
2025-03-27 16:29:50 -07:00
parent fde60b7d68
commit 748d5c0939
5 changed files with 42 additions and 8 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ templ FTPSourceForm() {
</div>
<input type="number" id="source_port" name="source_port" x-model="sourcePort"
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
placeholder="21" min="1" max="65535" />
placeholder="21" min="1" max="65535" value="21"/>
</div>
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">FTP port number (default: 21)</p>
</div>