-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Migrate AngularJS to Angular #5039
base: master
Are you sure you want to change the base?
Conversation
The previous JS code incorrectly converted glob expressions to regexp which prevented them from showing the correct file states in the list. This was only a UI bug and has no effect on the backend.
No longer adds invisible dir separators to filter list.
Only the last exclude or include option was sent to the backend. Now all include and exclude options are used.
Instead of selecting the first matching in list, which does not recognize regexp without ? or *, choose the type with longest prefix and suffix.
Inputs were interpreted as regexp in the UI instead of globbing expressions which are used in the backend. Closes duplicati#2682.
Add more metadata to the file list returned by server, so that the source file picker can display filters based on file attributes. Correctly display 'X' in file list if a file is excluded by attributes and not included as a source (duplicati#4751). Fix directory separator issue when loading the page and prevent opening folders in source file list.
Add filters to the beginning instead of the end of the list, so they are not overridden by more general ones. If a file is excluded, add an include filter to include the file.
This can happen if a source is added to force including a system folder.
Add REST handler /systeminfo/filtergroups that returns the filter strings for all filter groups on the system. Use these filter strings to apply filter groups to the source file picker.
The built-in angular XSRF handler only sends the token for modifying methods.
The live log could probably still be improved.
Implement destination folder picker and start of file destination editor.
TypeError: Cannot read Property 'Path' of undefined. Add a break to for loop, thanks @tx0h (duplicati#4997).
The paths are split by dirsep, but directories end with it, which results in an empty part at the end.
If anyone merges this request, i'll do a graphical redesign of the UI, since my old one is really really dated, but i agree with Jojo, that it makes no sense keeping AngularJS and his codebase seems good. |
it will not be for next Canary for sure, but the PR is very interesting nonetheless.
Thanks for the proposal !
wow, 8 years ago. |
Amazing progress @Jojo-1000 ! |
The web UI currently uses AngularJS which is out of support since 2022. This means it gets no security fixes anymore. The version we are using is even older (from 2015).
There were a few attempts to rewrite the UI (question about updating, redesign in Vue) but they did not seem to go anywhere, be it due to lack of initiative or lack of encouragement.
I chose to use the successor Angular over Vue, because I did not want to change anything about the site structure or design (this can be tackled at a later stage, if resources permit). Everything is as close to a 1:1 copy as possible, while using more modern code patterns where it is feasible.
I know this is not high on the priority list, but I created this draft to keep track of progress, for others to contribute, and to prevent anyone from doing duplicated work if they also want to update the UI.
Progress
Nice to have
Usage
The new UI is running in parallel to the existing UI for now.
The process to set up the webserver pages is more complicated, because it is required to build the app into a precompiled form. The process is described in
webroot/angular/README.md
. It is also possible to serve via the angular CLI (for development) and use a proxy to forward to the Duplicati REST API.Once built, the UI can be reached on the address
http://HOSTNAME/ng/
instead ofhttp://HOSTNAME/ngax/
. A browser cookie can be set onhttp://HOSTNAME/theme.html
to automatically redirect to the new version.