cockpit-project / cockpit-podman

Cockpit UI for podman containers
GNU Lesser General Public License v2.1
449 stars 90 forks source link

Sort containers #1097

Open garrett opened 2 years ago

garrett commented 2 years ago

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.

jelly commented 1 year ago

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.

garrett commented 1 year ago

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

jelly commented 1 year ago

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 commented 1 year ago

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

jelly commented 1 year ago

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

garrett commented 1 year ago

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:

cmd430 commented 6 months ago

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

garrett commented 6 months ago

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.