Skip to content

[Feat] Inertia Tables Refactor 2#1098

Open
RichardAnderson wants to merge 6 commits into
vitodeploy:4.xfrom
RichardAnderson:feat/more-inertia-tables
Open

[Feat] Inertia Tables Refactor 2#1098
RichardAnderson wants to merge 6 commits into
vitodeploy:4.xfrom
RichardAnderson:feat/more-inertia-tables

Conversation

@RichardAnderson
Copy link
Copy Markdown
Member

This pull request introduces a significant refactor of how 10 more data tables are rendered in various controllers, replacing resource collections with new, dedicated table classes that leverage the Forjed\InertiaTable package. Additionally, several enums are updated to implement the HasTableDisplay interface, supporting improved table rendering and display. This change standardizes and centralizes table logic, making it easier to maintain and extend.

Note: this is not a full refactor, instead, this only includes 10 out of the remaining 25 data tables that need to be updated to inertia tables. More will come in later PRs.

Controller refactors to use table classes:

  • Replaced resource collection responses in the following controllers with calls to new table classes and their simplePaginate() methods:
    • DNSProviderController now uses DnsProviderTable
    • DatabaseController now uses DatabaseTable
    • FirewallController now uses FirewallRuleTable
    • NotificationChannelController now uses NotificationChannelTable
    • ServerProviderController now uses ServerProviderTable
    • ServerSshKeyController now uses ServerSshKeyTable
    • SshKeyController now uses SshKeyTable
    • StorageProviderController now uses StorageProviderTable
    • WorkflowController now uses WorkflowTable
    • WorkflowRunController now uses WorkflowRunTable

Enum interface updates for table display:

  • Updated DatabaseStatus, FirewallRuleStatus, and WorkflowRunStatus enums to implement the HasTableDisplay interface, supporting richer table rendering

These changes improve maintainability, consistency, and extensibility of table views across the application.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the Inertia table refactor by moving several list pages from resource-backed TanStack table column definitions to backend-defined Forjed\InertiaTable table classes, with frontend row actions adapted to VitoTable.

Changes:

  • Adds dedicated table classes for workflows, workflow runs, providers, SSH keys, firewall rules, and databases.
  • Updates controllers and React pages to consume InertiaTableData via VitoTable.
  • Adds enum table display support and moves several row action dialogs into standalone components.

Reviewed changes

Copilot reviewed 56 out of 56 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
resources/js/vito-table-setup.ts Registers table icons and removes the old realtime table hook.
resources/js/components/vito-table.tsx Adds table-level realtime reload handling.
resources/js/lib/inertia-table.ts Adds a helper for casting/validating table rows.
resources/js/pages/workflows/index.tsx Switches workflows listing to VitoTable with inline actions.
resources/js/pages/workflows/components/columns.tsx Removes old TanStack workflow columns.
resources/js/pages/workflow-runs/index.tsx Switches workflow runs listing to VitoTable.
resources/js/pages/workflow-runs/components/columns.tsx Removes old workflow run columns.
resources/js/pages/storage-providers/index.tsx Switches storage providers listing to VitoTable.
resources/js/pages/storage-providers/components/edit.tsx Adds storage provider edit dialog component.
resources/js/pages/storage-providers/components/delete.tsx Adds storage provider delete dialog component.
resources/js/pages/storage-providers/components/columns.tsx Removes old storage provider columns.
resources/js/pages/ssh-keys/index.tsx Switches SSH keys listing to VitoTable.
resources/js/pages/ssh-keys/components/delete.tsx Keeps delete dialog as standalone action component.
resources/js/pages/server-ssh-keys/index.tsx Switches server SSH keys listing to VitoTable.
resources/js/pages/server-ssh-keys/components/delete.tsx Keeps server SSH key delete dialog as standalone component.
resources/js/pages/server-providers/index.tsx Switches server providers listing to VitoTable.
resources/js/pages/server-providers/components/edit.tsx Adds server provider edit dialog component.
resources/js/pages/server-providers/components/delete.tsx Adds server provider delete dialog component.
resources/js/pages/server-providers/components/columns.tsx Removes old server provider columns.
resources/js/pages/notification-channels/index.tsx Switches notification channels listing to VitoTable.
resources/js/pages/notification-channels/components/edit.tsx Adds notification channel edit dialog component.
resources/js/pages/notification-channels/components/delete.tsx Adds notification channel delete dialog component.
resources/js/pages/notification-channels/components/columns.tsx Removes old notification channel columns.
resources/js/pages/firewall/index.tsx Switches firewall rules listing to VitoTable.
resources/js/pages/firewall/components/delete.tsx Adds firewall rule delete dialog component.
resources/js/pages/firewall/components/columns.tsx Removes old firewall columns.
resources/js/pages/dns-providers/index.tsx Switches DNS providers listing to VitoTable.
resources/js/pages/dns-providers/components/edit.tsx Adds DNS provider edit dialog component.
resources/js/pages/dns-providers/components/delete.tsx Adds DNS provider delete dialog component.
resources/js/pages/dns-providers/components/columns.tsx Removes old DNS provider columns.
resources/js/pages/databases/index.tsx Switches databases listing to VitoTable.
resources/js/pages/databases/components/delete.tsx Adds database delete dialog component.
resources/js/pages/databases/components/columns.tsx Removes old database columns.
app/Tables/WorkflowTable.php Defines backend workflow table columns.
app/Tables/WorkflowRunTable.php Defines backend workflow run table columns and realtime setting.
app/Tables/StorageProviderTable.php Defines backend storage provider table columns.
app/Tables/SshKeyTable.php Defines backend SSH key table columns.
app/Tables/Servers/ServerSshKeyTable.php Defines backend server SSH key table columns.
app/Tables/Servers/FirewallRuleTable.php Defines backend firewall rule table columns and realtime setting.
app/Tables/Servers/DatabaseTable.php Defines backend database table columns.
app/Tables/ServerProviderTable.php Defines backend server provider table columns.
app/Tables/NotificationChannelTable.php Defines backend notification channel table columns.
app/Tables/DnsProviderTable.php Defines backend DNS provider table columns.
app/Http/Controllers/Workflow/WorkflowRunController.php Uses WorkflowRunTable for index data.
app/Http/Controllers/Workflow/WorkflowController.php Uses WorkflowTable for index data.
app/Http/Controllers/StorageProviderController.php Uses StorageProviderTable for index data.
app/Http/Controllers/SshKeyController.php Uses SshKeyTable for index data.
app/Http/Controllers/ServerSshKeyController.php Uses ServerSshKeyTable for index data.
app/Http/Controllers/ServerProviderController.php Uses ServerProviderTable for index data.
app/Http/Controllers/NotificationChannelController.php Uses NotificationChannelTable for index data.
app/Http/Controllers/FirewallController.php Uses FirewallRuleTable for index data.
app/Http/Controllers/DNSProviderController.php Uses DnsProviderTable for index data.
app/Http/Controllers/DatabaseController.php Uses DatabaseTable for index data.
app/Enums/WorkflowRunStatus.php Adds table display interface support.
app/Enums/FirewallRuleStatus.php Adds table display interface support.
app/Enums/DatabaseStatus.php Adds table display interface support.

Comment thread resources/js/pages/dns-providers/components/edit.tsx Outdated
Comment thread resources/js/pages/server-providers/components/edit.tsx Outdated
Comment thread resources/js/pages/storage-providers/components/edit.tsx Outdated
Comment thread resources/js/pages/notification-channels/components/edit.tsx Outdated
@RichardAnderson RichardAnderson linked an issue May 17, 2026 that may be closed by this pull request
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.

Sortable tables

2 participants