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 events list default sort column #2149

Merged
merged 1 commit into from
Feb 13, 2021
Merged

Conversation

jakolehm
Copy link
Contributor

Minimal fix/alternative for #2141 .

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
@jakolehm jakolehm added bug Something isn't working area/ui labels Feb 12, 2021
@jakolehm jakolehm added this to the 4.1.0 milestone Feb 12, 2021
@jakolehm jakolehm requested a review from a team February 12, 2021 18:56
@@ -108,7 +108,7 @@ export class Events extends React.Component<Props> {
{ title: "Involved Object", className: "object", sortBy: columnId.object, id: columnId.object },
{ title: "Source", className: "source", id: columnId.source },
{ title: "Count", className: "count", sortBy: columnId.count, id: columnId.count },
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
{ title: "Last Seen", className: "age", sortBy: columnId.age, id: columnId.age },
Copy link
Member

@ixrock ixrock Feb 12, 2021

Choose a reason for hiding this comment

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

Line:81 might be broken since creationTimestamp returns a iso-date string, not timestamp (number)

[columnId.age]: (event: KubeEvent) => event.metadata.creationTimestamp,

@ixrock
Copy link
Member

ixrock commented Feb 12, 2021

Noticed weird inconsistency when sorted by column-id:desc, see:

Column Count is number:
localhost_53420_cluster_c17f0bd4-6ba0-468a-86ab-a5c43ca2f2b7-2

Column Last seen == creationTimestramp == string:
localhost_53420_cluster_c17f0bd4-6ba0-468a-86ab-a5c43ca2f2b7

@ixrock
Copy link
Member

ixrock commented Feb 12, 2021

Other thing it seems that sorting at Workloads -> Events is still broken with compact=true (sorted by event.type:desc):

Screenshot 2021-02-13 at 0 06 06

Expected behaviour (fixed in #2141)
Screenshot 2021-02-13 at 0 09 12

@jakolehm
Copy link
Contributor Author

@ixrock good findings but those are out of scope for this PR. Let's open separate issues if needed.

@jakolehm jakolehm merged commit f4a3074 into master Feb 13, 2021
@jakolehm jakolehm deleted the fix/events-default-sort-column branch February 13, 2021 07:33
@jakolehm jakolehm mentioned this pull request Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants