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.

4 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

Where would I install your code on MacOS? I see where to put it if I ā€œinspectā€ the Duplicati page in Chrome, but I couldnā€™t see where to insert it in the Duplicati.app contents.

(My programming skills were developed in the '70s & '80s, including basic HTML, so I can reasonably interpret given code, but do not know how contemporary web applications are built.)

Andā€¦ since this has been on the ā€œwantā€ list for several years, why hasnā€™t this been implemented in the canary code for Duplicati releases?

Thank you.

I just tested it on Windows and all you need to do is use a File manager, command line, or whatever and go to where the Duplicati installation files are on Mac OS and move to "webroot\ngax" and then edit ā€œindex.htmlā€ in any basic document editor capable of not messing up code.

You insert the code in there where the link says to just before ā€œ</head>ā€ approx near the middle and save.

Open Duplicati and you have draggable backups in the list.

I donā€™t really know what took place here. But, if that person never created a git pull for it or whatever then the devs wouldnā€™t just go and copy paste it into there.

Its also possible the devs donā€™t want to do it that way or what. They also have to do other things.

Its never as easy as why didnā€™t you still do it 10 years later? :slight_smile:

Presumably referring to the ā€œTasks draggableā€ link at the top of the post above the ā€œWhereā€ question.

Ample Issues (including some feature requests), with the issue count only growing over several years.

Duplicati relies on its community for volunteers, and thatā€™s what constrains all ability to make progress.
Was worried due to the lack of releases has more. A ā€œwantā€ list is easy. Making that software is not so.
Thanks to those who step up to contribute what they can wherever they can. You help keep this going.

This one possibly hit some blocks in testing and delivery, but anybody willing is welcome to continue it.
Re-ordering Backup Jobs on Duplicati Landing Page (does detailed testing hit same problems I post?)

Personally, I feel the scroll list is fine enough. Not like thereā€™s 100 backup items in the list in which case it would need a whole lot more than this. Which is another problem as that needs other things to be done and the whole layout changed. When you think further on something, stuff just keeps happening.

I feel dragging and dropping therefore isnā€™t where to start here. First the layout needs to change to incorporate an unlimited number of items in an easy way. That means grouping and then ordering.

It might also mean dynamic layouts to change layout type, or pages, folders, etc.

Or could just do the file manager way with the forever list and a way to navigate it like search or order by date, etc Then dragging and dropping for ordering of it would be not needed.

But, Iā€™m just throwing out ideas. So donā€™t anyone think Iā€™m working on it :wink:

Really, the Duplicati devs have to tell people what they want done here. If they have that Iā€™ve idea anymore.

Project Management - A Tree Swing Story is some humor about how developing things can go astray.

There are also many different development methodologies coming into or falling out of favor with time.
Duplicati is so small that thereā€™s not a formal process. Sometimes user or devs discussion occurs, e.g.

Implementing the feature to restore any version of a single file

In an earlier era, I think one person helped with the user-facing what-to-build, and another person built.
If anybody would like to get into product or project management, speak up, but resources are limitedā€¦

Xavron:

Thank you for your patience!

Hereā€™s what I see in /Applications/Duplicati.app/Contents/Resources/webroot/ngax/index.html:

{{brandingService.appName}}
{{systemInfo.ServerVersionType}}
{{brandingService.appSubtitle}}
{{ā€˜Donateā€™ | translate }}
Menu

{{activeBackup.Backup.Name}}
:
{{StateText}}
Stopping after the current file: {{activeBackup.Backup.Name}} Running task: Stopping task: {{StateText}}
Next task: {{nextTask.Backup.Name}}
Next scheduled task: {{nextScheduledTask.Backup.Name}} {{nextScheduledTime | parseDate:forceActualDate }}
No scheduled tasks

ā€¢	Home 
ā€¢	Add backup 
ā€¢	Restore 
ā€¢	Resume 
ā€¢	Settings 
ā€¢	About 
ā€¢	Log out 

ā€¢	About 
ā€¢	{{'Donate' | translate}} 

{{ā€˜Visit us onā€™ | translate}}

ā€¢	ļæ¼ 
ā€¢	ļæ¼ 
ā€¢	ļæ¼ 

{{state.CurrentItem.title}}
{{state.CurrentItem.message}}

ā€¢	{{btn}} 

Connection lost
The connection to the server is lost, attempting again in {{time}} ā€¦
Connecting to server ā€¦
Connect now Connectingā€¦

Not loaded ā€¦
The page is not yet loaded, this can be caused by a defective install, a browser issue or a slow connection.
Reload page

(using textedit.app)

As you can see, itā€™s not what youā€™ve experienced on Windows. Can you suggest an approach that works on MacOS?

Thank youā€¦ Steve

@StevenKSanford
I just confirmed if you open the index.html in textedit it getā€™s it wrong and you only get a partial version of the page as you indicate. Open it in a capable editor and itā€™s fine. Iā€™ve used CotEditor for years, itā€™s free and it works like a text editor should.

Work with HTML documents in TextEdit on Mac shows how to persuade it to use code editing mode.
Looks kind of tricky. Possibly you can work on a copy (nice idea anyway) and make copy a .txt file.