FlexMeasures / flexmeasures

The intelligent & developer-friendly EMS to support real-time energy flexibility apps, rapidly and scalable.
https://flexmeasures.io
Apache License 2.0
143 stars 36 forks source link

Order jobs on status page by actual time, not by human-readable text #1100

Closed nhoening closed 3 months ago

nhoening commented 3 months ago

The table is sorted by the Create-At column, but that contains the human-readable text, so "3 minutes ago" is below "An hour ago" and also "36 minutes ago".

This is the code:

$(document).ready(function() {
        $('#scheduling_forecasting_jobs').DataTable({"order": [[ 0, "desc" ]]});
    });

It does not look like that one can sort by attribute (the actual datetime is in the title), so we probably want to create a hidden column with the actual datetime and sort by that.