all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v4 1/5] ui: tape/TapeRestore: fix small DataStoreMappingGrid bugs
Date: Fri, 21 May 2021 12:20:18 +0200	[thread overview]
Message-ID: <20210521102022.26859-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210521102022.26859-1-d.csapak@proxmox.com>

enable scrolling by default, and handle the case that getErrors gets
called when the component is not yet rendered

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/window/TapeRestore.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
index 9967d9d8..2a876619 100644
--- a/www/tape/window/TapeRestore.js
+++ b/www/tape/window/TapeRestore.js
@@ -203,6 +203,8 @@ Ext.define('PBS.TapeManagement.DataStoreMappingGrid', {
     alias: 'widget.pbsDataStoreMappingField',
     mixins: ['Ext.form.field.Field'],
 
+    scrollable: true,
+
     getValue: function() {
 	let me = this;
 	let datastores = [];
@@ -246,15 +248,20 @@ Ext.define('PBS.TapeManagement.DataStoreMappingGrid', {
 	    });
 	}
 
+	let el = me.getActionEl();
 	if (error) {
 	    me.addCls(['x-form-trigger-wrap-default', 'x-form-trigger-wrap-invalid']);
 	    let errorMsg = gettext("Need at least one mapping");
-	    me.getActionEl().dom.setAttribute('data-errorqtip', errorMsg);
+	    if (el) {
+		el.dom.setAttribute('data-errorqtip', errorMsg);
+	    }
 
 	    return [errorMsg];
 	}
 	me.removeCls(['x-form-trigger-wrap-default', 'x-form-trigger-wrap-invalid']);
-	me.getActionEl().dom.setAttribute('data-errorqtip', "");
+	if (el) {
+	    el.dom.setAttribute('data-errorqtip', "");
+	}
 	return [];
     },
 
-- 
2.20.1





  reply	other threads:[~2021-05-21 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 10:20 [pbs-devel] [PATCH proxmox-backup v4 0/5] ui: unify and improve tape restore window Dominik Csapak
2021-05-21 10:20 ` Dominik Csapak [this message]
2021-05-21 10:20 ` [pbs-devel] [PATCH proxmox-backup v4 2/5] ui: tape/TapeRestore: improve SnapshotGrid Dominik Csapak
2021-05-21 10:20 ` [pbs-devel] [PATCH proxmox-backup v4 3/5] ui: tape/window/TapeRestore: enabling selecting multiple snapshots Dominik Csapak
2021-05-21 10:20 ` [pbs-devel] [PATCH proxmox-backup v4 4/5] ui: tape/BackupOverview: also allow to filter by group for restore Dominik Csapak
2021-05-21 10:20 ` [pbs-devel] [PATCH proxmox-backup v4 5/5] ui: tape/BackupOverview: do not reload on restore Dominik Csapak
2021-05-21 14:34 ` [pbs-devel] applied-series: [PATCH proxmox-backup v4 0/5] ui: unify and improve tape restore window 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=20210521102022.26859-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-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