From: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH http/common/manager/wt/proxmox-backup/pmg] Tasklog download button
Date: Tue, 28 Jun 2022 13:23:55 +0200 [thread overview]
Message-ID: <74daf8eb-a6d5-8c5f-7368-76cec19a434e@proxmox.com> (raw)
In-Reply-To: <20220426123542.154739-1-d.tschlatscher@proxmox.com>
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(-)
prev parent reply other threads:[~2022-06-28 11:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 12:35 Daniel Tschlatscher
2022-04-26 12:35 ` [pve-devel] [PATCH proxmox-backup 1/1] fix #3971: tasklog download in the backup server backend Daniel Tschlatscher
2022-04-26 12:35 ` [pve-devel] [PATCH http-server 1/1] fix #3971: Make tasklog downloadable Daniel Tschlatscher
2022-04-26 12:35 ` [pve-devel] [PATCH common 1/1] fix #3971: Create log file stream for download Daniel Tschlatscher
2022-04-27 14:37 ` Thomas Lamprecht
2022-04-26 12:35 ` [pve-devel] [PATCH manager 1/1] fix #3971: Revised task log API call when parameter 'limit' is 0 Daniel Tschlatscher
2022-04-26 12:35 ` [pve-devel] [PATCH pmg-api 1/1] fix #3971: Download button in TaskViewer for PMG Daniel Tschlatscher
2022-04-26 12:35 ` [pve-devel] [PATCH widget-toolkit 1/1] fix #3971: Download button in the TaskViewer Daniel Tschlatscher
2022-04-26 12:35 ` [pve-devel] [PATCH pmg-gui 1/1] Replaced the system-report file download implementation Daniel Tschlatscher
2022-06-28 11:23 ` Daniel Tschlatscher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74daf8eb-a6d5-8c5f-7368-76cec19a434e@proxmox.com \
--to=d.tschlatscher@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox