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

fix manual sorting not working when sortColumn is configured #2253

Merged
merged 3 commits into from
Nov 5, 2023

Conversation

wjiec
Copy link
Contributor

@wjiec wjiec commented Oct 18, 2023

this PR fixes #2194

Related PRs and Issues:

Please verify if it's actually fixed when you have time. I tested it according to the steps in Issue and it is correct. Example views.yml:

k9s:
  views:
    v1/events:
      sortColumn: LAST SEEN:asc
    v1/pods:
      sortColumn: STATUS:desc
      columns:
        - NAMESPACE
        - NAME
        - READY
        - RESTARTS
        - STATUS
        - AGE
        - CPU
        - MEM
        - IP
        - QOS

The default sorting is correct and can be done manually with shift+[alpha].

Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

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

@wjiec Thank you for this PR Jayson! Please take a peek at the comment.

internal/ui/table.go Outdated Show resolved Hide resolved
@wjiec
Copy link
Contributor Author

wjiec commented Oct 23, 2023

Sorry for the late reply, the flag is now reset after the profile change. Take a look at this PR when you have time. 😊

Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

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

@wjiec Thank you Jayson for this pr and updates!

@derailed derailed merged commit a8615d9 into derailed:master Nov 5, 2023
3 checks passed
@wjiec wjiec deleted the bugfix/sort-column branch November 6, 2023 01:26
@derailed derailed mentioned this pull request Nov 8, 2023
thejoeejoee pushed a commit to thejoeejoee/k9s that referenced this pull request Feb 23, 2024
…d#2253)

* fix manual sorting not working when sortColumn is configured

* using manualSort to indicate has modified the sort col

* make user changes to the sortColumn take effect
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this pull request Apr 3, 2024
…d#2253)

* fix manual sorting not working when sortColumn is configured

* using manualSort to indicate has modified the sort col

* make user changes to the sortColumn take effect
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.

0.27.4 broke custom sort orders via views.yml
2 participants