From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] Replaced system-report file download
Date: Fri, 1 Apr 2022 17:20:22 +0200 [thread overview]
Message-ID: <62eaab20-ab74-bb7d-e413-0c897832ee8d@proxmox.com> (raw)
In-Reply-To: <20220401140758.1997754-2-d.tschlatscher@proxmox.com>
On 01.04.22 16:07, Daniel Tschlatscher wrote:
> with a function call to the newly added textToFile() function in
> the utils class (Proxmox.Utils).
please refer to the fact that it got moved to proxmox-widget-toolkit to imply
the required dependency bump more explicitly.
>
> Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
> ---
> www/manager6/node/Subscription.js | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/www/manager6/node/Subscription.js b/www/manager6/node/Subscription.js
> index 2558f523..d3502eca 100644
> --- a/www/manager6/node/Subscription.js
> +++ b/www/manager6/node/Subscription.js
> @@ -61,19 +61,7 @@ Ext.define('PVE.node.Subscription', {
> var fileContent = Ext.String.htmlDecode(reportWindow.getComponent('system-report-view').html);
> var fileName = getReportFileName();
>
> - // Internet Explorer
> - if (window.navigator.msSaveOrOpenBlob) {
> - navigator.msSaveOrOpenBlob(new Blob([fileContent]), fileName);
> - } else {
> - var element = document.createElement('a');
> - element.setAttribute('href', 'data:text/plain;charset=utf-8,' +
> - encodeURIComponent(fileContent));
> - element.setAttribute('download', fileName);
> - element.style.display = 'none';
> - document.body.appendChild(element);
> - element.click();
> - document.body.removeChild(element);
> - }
> + Proxmox.Utils.textToFile(fileName, fileContent);
> },
> },
> ],
fyi, there's another similar usage in the PVE.Storage.PBSKeyShow class, maybe there are
more - please also check PMG/PBS if not already done.
next prev parent reply other threads:[~2022-04-01 15:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 14:07 [pve-devel] [PATCH widget-toolkit] fix #3971: Download and copy button in the TaskViewer Daniel Tschlatscher
2022-04-01 14:07 ` [pve-devel] [PATCH manager] Replaced system-report file download Daniel Tschlatscher
2022-04-01 15:20 ` Thomas Lamprecht [this message]
2022-04-01 15:18 ` [pve-devel] [PATCH widget-toolkit] fix #3971: Download and copy button in the TaskViewer Thomas Lamprecht
2022-04-04 9:25 ` Daniel Tschlatscher
[not found] ` <2a4863fa-2d27-f088-f381-09e02f9180c4@proxmox.com>
2022-04-04 11:58 ` Daniel Tschlatscher
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=62eaab20-ab74-bb7d-e413-0c897832ee8d@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal