Prefilled URL and Port under "Server and Port"

Hi,

I am looking to add a prefilled URL under “Server and Port” section.

I tried digging to “\webroot\ngax\templates\backends\generic.html” file but didn’t succeed on passing the value=“URL” after <input type=“text”

Can someone please shed some light on this?

Hi pm_s,

I’m not sure I’ll be able to help in any case, but I’d at least like to make sure I understand. Are you referring to the “Backup destination” configuration? For which backend type?

L

Hi Lerrissirel,

Yes, i am looking upto “Backup destination” section. Where under the Server and Port field i want to add a prefilled server URL. server.example.com

Please let me know if i need to be more detailed

I did a little digging but I should first warn you that this is the first time I’ve tried to delve into the web interface of Duplicati. What you tried would have been the first thing I tried, too.

However, I noticed that Angular is involved here. I have zero prior experience with Angular. From what I can tell, the ng-model=“$parent.Port” piece is the variable that can both be the default value you see, as well as holds the value that is entered. (See Angular ng-model Directive). What I couldn’t figure out is the appropriate place to set that variable. ngax/scripts/directives/backupEditUri.js seems promising (search for scope.Port) but I didn’t dig into what “parts[]” is or where it comes from.

Hopefully this gives you some ideas to pursue.

L

1 Like

I have a theory, but does anyone know JavaScript and HTML well enough to chase it through code?

This is perhaps what fills the fields on a re-edit with whatever values URI has. You can test this with:

image

If Storage Providers has a URI format where a partial will fill what you like, see if you can force that.
For example, if Storage Type dropdown sets empty initial URI (maybe a scheme), can you expand?

Note that you’re kind of doing this at your own risk, so I hope there’s a good reason to be wanting it.

1 Like