Skip to content

Add Grid/Table view toggle for Domains page with detailed table columns #3158

@quochuydev

Description

@quochuydev

What problem will this feature address?

Currently, the Domains page (Projects -> App -> Domains) only displays domains in a grid card layout. When
users have many domains, it becomes difficult to scan and compare domain configurations quickly. A table view
would provide better data density and easier comparison of domain settings across multiple entries.
Additionally, there's no quick way to sort or filter domains, making management of large domain lists
cumbersome.

Describe the solution you'd like

Add a view toggle button next to the "Add Domain" button that allows switching between Grid view (current)
and Table view.

Table View Details:

  • Reuse the Table component pattern from Docker Containers page
    (apps/dokploy/components/dashboard/docker/show/show-containers.tsx)
  • Use @tanstack/react-table (already in dependencies)

Table Columns:

  1. Host - Clickable to open edit dialog
  2. Path - Show path or "/" if empty
  3. Port - Display container port number
  4. Protocol - Show HTTP/HTTPS badge
  5. Certificate - Display cert type (none/letsencrypt/custom) with DNS validation button
  6. Actions - Edit and Delete buttons

Features to include:

  • Search/filter by host name
  • Column visibility dropdown
  • Pagination controls (Previous/Next)
  • Preserve all current functionality (DNS validation, edit, delete)
  • Maintain grid view as default for backward compatibility

Files to modify:

  • Modify: apps/dokploy/components/dashboard/application/domains/show-domains.tsx (add toggle and table view)
  • Create: apps/dokploy/components/dashboard/application/domains/columns.tsx (table column definitions)

Additional context

Technical implementation notes:

  • Reuse existing components: AddDomain, DnsHelperModal, DialogAction
  • Maintain existing validation state management (handleValidateDomain function)
  • Consider using LayoutGrid and LayoutList icons from lucide-react for the toggle button
  • Optional: Persist view preference in localStorage
  • Ensure responsive design (consider forcing grid view on mobile)

Benefits:

  • Improved UX for users managing multiple domains
  • Better data scanability and comparison
  • Easier sorting and filtering
  • Consistent with existing table patterns in the app

Will you send a PR to implement it?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions