Change the order of listed backup jobs

Is it possible to modify the order by which the backup jobs are listed when opening page http://localhost:8200/ngax/index.html?
Thank you.

Not currently. There has been some discussion about this various places on the forum and on github.

Well, it is possible - but not friendly.

1 Like

I thought it might. But, as you have stated, it is muddled.
I thought that it could be simpler to re-order the records in a sqlite table. But I haven’t understood which one.

I think it just orders them by job ID, so there isn’t a “JobOrder” type table.

I think that’s part of why this hasn’t been implemented yet - some basic low-level stuff needs to be added to support the “easy” order stuff. :slight_smile:

There’s another discussion floating around where people also expressed wanting different orders, such as dynamic based on next run time. (yikes!)

I don’t think SQLite or SQL work that way, although it’s said by the experts to be a common question raised.

With Duplicati, I think ordering is via a field which increments as jobs are created, as per @JonMikelV way. Hand-editing for special test did change the job order, but ID is kept in too many places to normally change.

I’ve understood that it is much simpler to accomplish a new order by Javascript.
For example the folliwing vanilla code orders entries by their title:

var items=document.getElementsByClassName("task ng-scope");
items = Array.prototype.slice.call(items);
items.sort(function(a, b){
    return a.getElementsByTagName("a")[0].textContent.localeCompare(b.getElementsByTagName("a")[0].textContent);
});
for(var i = 0, len = items.length; i < len; i++) {
    var parent = items[i].parentNode;
    var detatchedItem = parent.removeChild(items[i]);
    parent.appendChild(detatchedItem);
}

It should be fine if Duplicating settings allow user to specify a custom script to be executed every time the main page is (re)loaded.

2 Likes

So add sorting to the GUI only & maybe remember it with a cookie? I like that. :slight_smile:

This is a screenshot of what I have obtained only changing css. I would like very much to add a script to sort entries by column.

3 Likes

Or we could change order by adding bookmakled in browser. Using for example this generator:
https://mrcoles.com/bookmarklet/

He will generate text that you can paste in url for bookmark in Chrome. Then just click on bookmark in bookmarks toolbar and backups are sorted :slight_smile:

With this one is very easy
https://sortablejs.github.io/Sortable/

I test it some years a ago on my personal webpage
https://www.byman.it/portfolio/

Can I work on duplicati webpages?

Tasks draggable

1 Like