[pve-devel] [PATCH http/common/manager/wt/proxmox-backup/pmg] Tasklog download button

Daniel Tschlatscher d.tschlatscher at proxmox.com
Tue Jun 28 13:23:55 CEST 2022


ping

(And now that I see it, the patches should actually count up to 7, they
are not in fact 1/1 standalone patches)

On 4/26/22 14:35, Daniel Tschlatscher wrote:
> This patch series' aim is to add a download button in the tasklog-
> viewer GUI so that users may access all parts of the tasklog more
> easily (The tasklog-viewer only displays 50 lines at a time).
> 
> For this change in the GUI (proxmox-widget-toolkit) there were revised
> implementations for all backends (PVE, PMG and PBS) needed.
> The change was implemented by setting the URL parameter 'limit' for
> the .../log call and streaming a file in this case. (Before this
> call returned 0 lines).
> 
> I also revised a few different parts in the code which had redundant
> implementations for "downloading" a file locally from a string.
> For this I added a function in the proxmox-widget-toolkit Utils class
> which all occurences (that I found) now call.
> 
> During the implementation of the file stream download I found a bug
> concerning chromium browsers because of which downloads "randomly"
> fail.
> The problem was, that when implementing the download through an html a
> tag and setting its property "download" to anything (even undefined)
> with a self-signed certificate (not imported) will fail after the
> SSL connection is reset.
> In my testing this was the case after about 5 seconds. This problem is
> especially pronounced in the PMG as there are less background calls in
> contrast to the PVE. However, the PBS does not seem to suffer this
> error at all, because the SSL handshake timeout seems to not run out.
>  
> Without the 'download' attribute you can't set the filename though.
> The file will only have a proper name if the server adds the correct
> 'content-disposition' header. A few calls to the 'downloadAsFile'
> function set the filename anyway, because in most cases the browser
> frontend is making enough polling calls so that the SSL handshake
> does not have to be executed for the download. (That is also why it
> probably did not come up before)
> This problem does not apply in Firefox as far as I could tell. 
> 
> Daniel Tschlatscher (1):
>   fix #3971: tasklog download in the backup server backend
> 
>  Cargo.toml               |   2 +-
>  src/api2/node/tasks.rs   | 154 +++++++++++++++++++++++++--------------
>  www/Subscription.js      |  14 +---
>  www/datastore/Content.js |   7 +-
>  4 files changed, 105 insertions(+), 72 deletions(-)
> 
> Daniel Tschlatscher (1):
>   fix #3971: Make tasklog downloadable
> 
>  src/PVE/APIServer/AnyEvent.pm | 3 +++
>  1 file changed, 3 insertions(+)
> 
> Daniel Tschlatscher (1):
>   fix #3971: Create log file stream for download
> 
>  src/PVE/Tools.pm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> Daniel Tschlatscher (1):
>   fix #3971: Revised task log API call when parameter 'limit' is 0
> 
>  PVE/API2/Tasks.pm                 | 13 ++++++++++---
>  www/manager6/node/Subscription.js | 20 ++++----------------
>  2 files changed, 14 insertions(+), 19 deletions(-)
> 
> Daniel Tschlatscher (1):
>   fix #3971: Download button in TaskViewer for PMG
> 
>  src/PMG/API2/Tasks.pm | 34 +++++++++++-----------------------
>  1 file changed, 11 insertions(+), 23 deletions(-)
> 
> Daniel Tschlatscher (1):
>   fix #3971: Download button in the TaskViewer
> 
>  src/Utils.js              | 18 ++++++++++++++++++
>  src/window/FileBrowser.js | 12 +++---------
>  src/window/TaskViewer.js  | 16 ++++++++++++++--
>  3 files changed, 35 insertions(+), 11 deletions(-)
> 
> Daniel Tschlatscher (1):
>   Replaced the system-report file download implementation
> 
>  js/Subscription.js | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)





More information about the pve-devel mailing list