public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v5 manager 1/6] ui: backup window: avoid issuing API call with null/empty parameter
Date: Thu,  6 May 2021 14:16:27 +0200	[thread overview]
Message-ID: <20210506121632.8417-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20210506121632.8417-1-f.ebner@proxmox.com>

could be triggered when there are no backup storages at all configured or if
the 'Backup now' button is clicked before the storage selector from the guests
'Backup' tab could load its store.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Backup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index a6dc1798..72e8cb48 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -46,6 +46,10 @@ Ext.define('PVE.window.Backup', {
 	    allowBlank: false,
 	    listeners: {
 		change: function(f, v) {
+		    if (v === null || v === undefined || v === '') {
+			return;
+		    }
+
 		    let store = f.getStore();
 		    let rec = store.findRecord('storage', v, 0, false, true, true);
 
-- 
2.20.1





  reply	other threads:[~2021-05-06 12:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 12:16 [pve-devel] [PATCH-SERIES v5 manager] fix #2745: allow specifying remove parameter for manual backup Fabian Ebner
2021-05-06 12:16 ` Fabian Ebner [this message]
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 2/6] ui: backup window: also set initialDefaults variable in failure case Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 3/6] ui: backup window: set loading mask early enough Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 4/6] ui: backup window: switch to proxmox input panel Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 5/6] ui: backup window: switch to two-column layout Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 6/6] fix #2745: ui: backup window: allow specifying remove parameter for manual backup Fabian Ebner
2021-05-07  6:56 ` [pve-devel] [PATCH v5 manager 7/7] ui: backup window: also reset removal fields when defaults API call fails Fabian Ebner
2021-06-17 16:00 ` [pve-devel] applied-series: [PATCH-SERIES v5 manager] fix #2745: allow specifying remove parameter for manual backup Thomas Lamprecht

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=20210506121632.8417-2-f.ebner@proxmox.com \
    --to=f.ebner@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal