feat(ui): improve global search with UUID and PR support #7901
+26
−12
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.
Motivation
When monitoring containers through tools like Dozzle, users see container names and IDs (e.g.,
s4o8kw8ggk4g4go44gsg84kg-101632532767ors4o8kw8ggk4g4go44gsg84kg:fe2cb64017b313fdb2523a5431b5caa2a3033d4e) but have no easy way to map them back to their corresponding resources in Coolify. This PR addresses this by making container identifiers (UUIDs) searchable in the global search, enabling users to quickly find the associated application, service, or database.Summary
Changes
Enhanced search terms for applications: Added UUID and PR (pull request) search terms to application search. Users can now search for applications by their container UUID or by PR numbers (e.g., "pr-123", "pr123", or just "123") when preview is enabled. This allows users to paste a container name from Docker/Dozzle and immediately find the corresponding application in Coolify.
Enhanced search terms for services: Added UUID and component names (applications and databases) to service search terms. Since service containers use the pattern
{name}-{service.uuid}, users can now search by either the service UUID or individual component names to quickly locate the service.Enhanced search terms for databases: Added UUID to search terms for all database types (PostgreSQL, MySQL, MariaDB, MongoDB, Redis, KeyDB, Dragonfly, ClickHouse). Users can search databases by their container UUID, making it easy to identify which database a container belongs to.
Performance optimization: Added eager loading for
previewsrelationship in applications anddatabasesrelationship in services to prevent N+1 query issues while maintaining the existing 5-minute cache strategy.Use Cases
s4o8kw8ggk4g4go44gsg84kg-101632532767in Dozzle → searches fors4o8kw8ggk4g4go44gsg84kgin Coolify → immediately finds the application-pr-42in the name → searches forpr-42or just42→ finds all PR preview containerspostgres-abc123defcontainer → searches for the UUID or "postgres" → finds the serviceIssues