Skip to content

Issue #14 - [FEATURE] Add warning alert for missing IP address in database credential screens #31

@rogelio-cmj

Description

@rogelio-cmj

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:

  1. Navigate to the dashboard and create or select any database instance (PostgreSQL, MySQL, MariaDB, MongoDB, or Redis)
  2. Ensure that no IP address is configured in the server settings (either in Web Server settings or Remote Server settings)
  3. Go to the database's "General" tab and view the external credentials section
  4. 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 getIp variable)
  • The alert uses the existing AlertBlock component with "warning" type for visual consistency

Steps To Test

  1. Set up a test environment without an IP address configured in server settings
  2. Navigate to each database type's external credentials screen (PostgreSQL, MySQL, MariaDB, MongoDB, Redis - Just need to verify 2 of them)
  3. Verify that a warning alert appears above the credentials form on each screen
  4. Confirm the alert message is clear and includes a link to settings
  5. Click the link and verify it navigates to the correct settings page
  6. Configure an IP address in the server settings
  7. Return to the database credentials screens and verify the warning alert no longer appears
  8. Test both scenarios: with a remote server configured (serverId present) 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions