cockpit-podman icon indicating copy to clipboard operation
cockpit-podman copied to clipboard

Sort containers

Open garrett opened this issue 3 years ago • 8 comments

The containers list should be sortable. It should default to the container's name, but you should be able to sort by owner, CPU and memory usage, and state.

This can be done by making the headers clickable.

  • composable: https://www.patternfly.org/v4/components/table#composable-sortable---custom-control
  • legacy: https://www.patternfly.org/v4/components/table/react-legacy#sortable---custom-control

garrett avatar Sep 14 '22 09:09 garrett

For the tables we use a ListingPanel from Cockpit which is our own custom Table implementation so I think we would have to switch to a TableComposable from what I'm seeing.

jelly avatar Mar 15 '23 13:03 jelly

Right, we'd either want to switch to a TableComposable directly in Podman or switch ListingPanel over to one.

garrett avatar Mar 15 '23 15:03 garrett

We can actually already add sorting, I was wrong. But with pods it get's a bit akward. Only containers are being sorted the pods are left unsorted.

image

jelly avatar Mar 17 '23 12:03 jelly

Nevermind, we always showed pods on the bottom, so this is actually fine and working as intended.

jelly avatar Mar 17 '23 12:03 jelly

@garrett is the current behavior acceptable or does it still need to be enhanced?

jelly avatar Nov 10 '23 09:11 jelly

Yeah, keep pods in groups. I see the pods also have headers; you can sort the containers within a pod too?

I don't think mixing podless containers with those from pods is a good idea, as when you're doing container management, you either have standalone containers you act upon individually or treat the whole pod together as one (and not the containers within pods) — at least generally. In other words, you would usually treat pods as a combined unit (start, stop, delete).

TL;DR: Looks good! :+1:

garrett avatar Nov 14 '23 09:11 garrett

would it be possible add tabs to the list so we have two lists? a tab that lists all pods (and their containers) and a tab that just lists containers not in pods with a lot of pods / containers it would be nice if they were separated

cmd430 avatar Apr 27 '24 15:04 cmd430

Seeing only containers outside of pods and containers in pods should probably go into filtering, which we should improve anyway, instead of adding a tab based UI.

garrett avatar May 14 '24 15:05 garrett