Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable sorting for hosts list #6502

Merged
merged 2 commits into from
Nov 22, 2024
Merged

chore: enable sorting for hosts list #6502

merged 2 commits into from
Nov 22, 2024

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Nov 22, 2024

Summary

Follow up fix to #6210


Important

Enable sorting for hosts list by cpu, memory, wait, and load15 in both frontend and backend.

  • Frontend:
    • Enable sorting for cpu, memory, wait, and load15 columns in getHostsListColumns() in utils.tsx.
  • Backend:
    • Add SortBy() method to HostListResponse in infra.go to sort records by cpu, memory, wait, and load15.
    • Call SortBy() in GetHostList() in hosts.go to apply sorting based on OrderBy parameter.
  • Misc:
    • Reorder middleware in createPrivateServer() and createPublicServer() in server.go to ensure LogCommentEnricher is used last.

This description was created by Ellipsis for c1c7ce0. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to c1c7ce0 in 1 minute and 12 seconds

More details
  • Looked at 159 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. pkg/query-service/model/infra.go:71
  • Draft comment:
    Consider adding a default case to handle unexpected column names in the SortBy function.
  • Reason this comment was not posted:
    Marked as duplicate.
2. pkg/query-service/model/infra.go:45
  • Draft comment:
    Do not add non-ClickHouse related functions like SortBy to the ClickHouseReader interface. Use the DAO in the telemetry instance to access such information instead.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_yjHvUUXr5t1BOGlt


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

pkg/query-service/app/server.go Show resolved Hide resolved
pkg/query-service/model/infra.go Show resolved Hide resolved
@srikanthccv srikanthccv enabled auto-merge (squash) November 22, 2024 10:07
@srikanthccv srikanthccv merged commit ed6abe5 into develop Nov 22, 2024
16 checks passed
@vikrantgupta25 vikrantgupta25 deleted the fix-sort branch November 22, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants