[Feat] Inertia Tables Refactor 2#1098
Open
RichardAnderson wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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
InertiaTableDataviaVitoTable. - 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. |
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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\InertiaTablepackage. Additionally, several enums are updated to implement theHasTableDisplayinterface, 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:
simplePaginate()methods:DNSProviderControllernow usesDnsProviderTableDatabaseControllernow usesDatabaseTableFirewallControllernow usesFirewallRuleTableNotificationChannelControllernow usesNotificationChannelTableServerProviderControllernow usesServerProviderTableServerSshKeyControllernow usesServerSshKeyTableSshKeyControllernow usesSshKeyTableStorageProviderControllernow usesStorageProviderTableWorkflowControllernow usesWorkflowTableWorkflowRunControllernow usesWorkflowRunTableEnum interface updates for table display:
DatabaseStatus,FirewallRuleStatus, andWorkflowRunStatusenums to implement theHasTableDisplayinterface, supporting richer table renderingThese changes improve maintainability, consistency, and extensibility of table views across the application.