public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH http/common/manager/wt/proxmox-backup/pmg] Tasklog download button
@ 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
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Daniel Tschlatscher @ 2022-04-26 12:35 UTC (permalink / raw)
  To: pve-devel

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(-)
-- 
2.30.2





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-06-28 11:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 12:35 [pve-devel] [PATCH http/common/manager/wt/proxmox-backup/pmg] Tasklog download button 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 ` [pve-devel] [PATCH http/common/manager/wt/proxmox-backup/pmg] Tasklog download button Daniel Tschlatscher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal