OpenMediaVault-Plugin-Developers / openmediavault-docker-gui

Docker plugin for OpenMediaVault
32 stars 17 forks source link

Wrong sort order for many columns #71

Open godfuture opened 6 years ago

godfuture commented 6 years ago

If you try to sort your image library or container list, you will notice that some of the columns get ordered incorrect. image create date, image virtual size, container up time....and others.

omv_wrong_sorting

subzero79 commented 6 years ago

Size sorting was fixed long time. I haven’t look at the others. What version is this ?

godfuture commented 6 years ago

Client: Version: 18.03.1-ce OS/Arch: linux/amd64

Server: Engine: Version: 18.03.1-ce Built: Thu Apr 26 07:15:24 2018 OS/Arch: linux/amd64

subzero79 commented 6 years ago

And the plugin? Or Omv version ?

godfuture commented 6 years ago

docker-gui 4.0.1 on OMV 4.1.6

subzero79 commented 6 years ago

4.0.2 has the size column in images fixed a long time ago. As for the STATUS omv provides a unixtimestamp column, that i believe it will translate into date then be sortable, but docker ps needs to report in epoch time, which i believe it doesn't. In that case you will see on the grid the date-time it was started but not as friendly as it is now like "Up 11 minutes"

If you read here http://timjrobinson.com/get-docker-container-start-time-in-unix-timestamp-seconds/

you can see he is fetching low level container info, that means will have to parse each container to get that info, which i am reluctant because it would slow down the grid rendering.

Two options:

As for now i am disabling sorting for STATUS, until someone wants to contribute some code for this.

raulfg3 commented 5 years ago

same here, any possible update?

https://forum.openmediavault.org/index.php/Thread/24229-SMALL-GUI-arrange-bug-in-columns/?postID=183673#post183673

subzero79 commented 5 years ago

Not really, unless docker outputs the date created in parseable format. I can query each container individually to get the date but that would slow down the container grid, the info we see in the container grid comes from one api query.