Giter Club home page Giter Club logo

Comments (10)

liyaka avatar liyaka commented on June 10, 2024

+1

from docker-registry-web.

madeddie avatar madeddie commented on June 10, 2024

The current design does server-side generation of the tables. There is a sortableColumn tag for Grails, but I'm guessing it would be quite inefficient to use that, seeing that the page would have to completely reload all data (and therefor go through all tags again, unless there's some caching going on).

The best way I see for this to work is to move the table generation to the client in javascript. Do you think that'd be a viable plan? If so I can put some time in getting some PoC together.

from docker-registry-web.

mkuchin avatar mkuchin commented on June 10, 2024

I'd added basic client side table ordering to the tags page.
It available on docker hub as latest version.
@madeddie and @liyaka can you check if this implementation satisfy your needs?

from docker-registry-web.

liyaka avatar liyaka commented on June 10, 2024

works fine - thanks!

from docker-registry-web.

madeddie avatar madeddie commented on June 10, 2024

Looks good, awesome!
The Created column doesn't sort logically yet though. Maybe you could make it use epoch (seconds since 1970) for that?

from docker-registry-web.

mkuchin avatar mkuchin commented on June 10, 2024

What's the problem?
I'm using string representation of date in td data-sort attribute.
<td data-sort="2016-04-17T05:34:55"> ... 1 day ago</td>

from docker-registry-web.

madeddie avatar madeddie commented on June 10, 2024

I'm not sure how the sorting is using this string, but it doesn't understand natural sorting of it.
See
screenshot 2016-04-18 11 29 35

from docker-registry-web.

mkuchin avatar mkuchin commented on June 10, 2024

Thanks for screenshot. That looks strange, I can't reproduce it in my environment.
I've changed data-sort attribute value to unix time.
Can you check if it working for you in latest version?

from docker-registry-web.

madeddie avatar madeddie commented on June 10, 2024

😳 I ehm, have a plugin that allows me to sort tables in chrome... so... after disabling it, the unix timestamp works fine.
Possibly (probably?) this caused the weirdness with the string-based sort as well.

from docker-registry-web.

mkuchin avatar mkuchin commented on June 10, 2024

Thanks for update, closing issue.

from docker-registry-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.