-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Motivation
When users view external database credentials without having configured an IP address in their server settings, the generated database connection URLs are incomplete or broken. This creates a poor user experience as users may attempt to use these malformed connection strings without understanding why they don't work.
Current Behavior
The external database credential screens for all database types (PostgreSQL, MySQL, MariaDB, MongoDB, and Redis) display connection information without warning users when the server IP address is missing. Users can view and copy incomplete connection URLs that won't work, leading to confusion and failed connection attempts.
Reproduction Steps:
- Navigate to the dashboard and create or select any database instance (PostgreSQL, MySQL, MariaDB, MongoDB, or Redis)
- Ensure that no IP address is configured in the server settings (either in Web Server settings or Remote Server settings)
- Go to the database's "General" tab and view the external credentials section
- Observe: The credentials form is displayed, but there is no indication that the connection URL is incomplete or that an IP address needs to be configured
Expected Behavior
When a user views the external database credentials screen and the server IP address is not configured, a warning alert should be displayed above the credentials form. The alert should clearly explain that an IP address is required and provide a contextual link to the appropriate settings page (different paths for local web server vs remote server configurations).
Acceptance Criteria:
- A warning alert appears on all five database credential screens (PostgreSQL, MySQL, MariaDB, MongoDB, Redis) when IP address is missing
- The alert message clearly states that an IP address must be set to fix the database URL connection
- The alert includes a clickable link that directs users to the correct settings page based on whether they're using a remote server or the web server
- The alert only displays when the IP address is not configured (conditional rendering based on
getIpvariable) - The alert uses the existing
AlertBlockcomponent with "warning" type for visual consistency
Steps To Test
- Set up a test environment without an IP address configured in server settings
- Navigate to each database type's external credentials screen (PostgreSQL, MySQL, MariaDB, MongoDB, Redis - Just need to verify 2 of them)
- Verify that a warning alert appears above the credentials form on each screen
- Confirm the alert message is clear and includes a link to settings
- Click the link and verify it navigates to the correct settings page
- Configure an IP address in the server settings
- Return to the database credentials screens and verify the warning alert no longer appears
- Test both scenarios: with a remote server configured (
serverIdpresent) and without (local web server) to ensure the correct link text is displayed
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx