Skip to content

Conversation

@javuto
Copy link
Collaborator

@javuto javuto commented Oct 2, 2025

Implementing serverside pagination for nodes table and search. It gets enabled using the flag --optimize-ui / -O or the env variable OPTIMIZE_UI in osctrl-admin. By default it is turned off and when enabled the search requires to press enter.
Implements #635

@javuto javuto requested a review from Copilot October 2, 2025 08:55
@javuto javuto added osctrl-admin osctrl-admin related changes ⚡️ performance Performance related issues labels Oct 2, 2025
Copy link
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 pull request implements server-side pagination and search functionality for the nodes table in the admin UI to optimize performance for deployments with large numbers of nodes. The feature is controlled by a new --optimize-ui flag or OPTIMIZE_UI environment variable.

Key changes:

  • Added server-side pagination support with new database methods for counting and searching nodes
  • Introduced OptimizeUI configuration flag with corresponding CLI and environment variable support
  • Modified the DataTables frontend to use server-side processing when optimization is enabled

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/nodes/nodes.go Added methods for paginated node retrieval, search, and counting
pkg/config/types.go Added OptimizeUI field to admin configuration structure
pkg/config/flags.go Added CLI flag and environment variable support for UI optimization
docker-compose-dev.yml Enabled UI optimization in development environment
cmd/admin/templates/table.html Added conditional server-side DataTables configuration
cmd/admin/main.go Integrated optimization flag into handler configuration and routing
cmd/admin/handlers/types-templates.go Added OptimizeUI field to template data structure
cmd/admin/handlers/templates.go Passed optimization flag to template data
cmd/admin/handlers/json-nodes.go Implemented paginated JSON endpoint with search functionality
cmd/admin/handlers/handlers.go Added handler option for UI optimization configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@javuto javuto merged commit d6afa47 into main Oct 2, 2025
55 checks passed
@javuto javuto deleted the datatables-pagination-ajax branch October 2, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

osctrl-admin osctrl-admin related changes ⚡️ performance Performance related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants