public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH RFC manager] ui: ceph install wizard: fix config exists note position
@ 2021-08-10 13:27 Aaron Lauterer
  2021-09-30  9:23 ` Aaron Lauterer
  2021-10-01  7:50 ` [pve-devel] applied: " Dominik Csapak
  0 siblings, 2 replies; 3+ messages in thread
From: Aaron Lauterer @ 2021-08-10 13:27 UTC (permalink / raw)
  To: pve-devel

During the Ceph installation, in the configuration step, a note is shown
if there already is a Ceph configuration present. This notification
should be in the center of the wizard but is currently barely visible.

ExtJS is having trouble calculating the position and the result is that
the note is placed almost out of the visible area.

Setting a fixed height helps ExtJS calculate the vertical position.
Changing from the 'beforeshow' listener to the 'afterrender' one helps
for the horizontal position.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
This feels quite hacky, hence the RFC so we can discuss a better
approach that I am not aware of yet.

 www/manager6/ceph/CephInstallWizard.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js
index fc99029e..59458b0d 100644
--- a/www/manager6/ceph/CephInstallWizard.js
+++ b/www/manager6/ceph/CephInstallWizard.js
@@ -337,6 +337,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 	    xtype: 'inputpanel',
 	    title: gettext('Configuration'),
 	    onlineHelp: 'chapter_pveceph',
+	    height: 300,
 	    cbind: {
 		nodename: '{nodename}',
 	    },
@@ -350,7 +351,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 		activate: function() {
 		    this.up('pveCephInstallWizard').down('#submit').setText(gettext('Next'));
 		},
-		beforeshow: function() {
+		afterrender: function() {
 		    if (this.up('pveCephInstallWizard').getViewModel().get('configuration')) {
 			this.mask("Configuration already initialized", ['pve-static-mask']);
 		    } else {
-- 
2.30.2





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

* Re: [pve-devel] [PATCH RFC manager] ui: ceph install wizard: fix config exists note position
  2021-08-10 13:27 [pve-devel] [PATCH RFC manager] ui: ceph install wizard: fix config exists note position Aaron Lauterer
@ 2021-09-30  9:23 ` Aaron Lauterer
  2021-10-01  7:50 ` [pve-devel] applied: " Dominik Csapak
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron Lauterer @ 2021-09-30  9:23 UTC (permalink / raw)
  To: pve-devel

any news here?

On 8/10/21 15:27, Aaron Lauterer wrote:
> During the Ceph installation, in the configuration step, a note is shown
> if there already is a Ceph configuration present. This notification
> should be in the center of the wizard but is currently barely visible.
> 
> ExtJS is having trouble calculating the position and the result is that
> the note is placed almost out of the visible area.
> 
> Setting a fixed height helps ExtJS calculate the vertical position.
> Changing from the 'beforeshow' listener to the 'afterrender' one helps
> for the horizontal position.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> This feels quite hacky, hence the RFC so we can discuss a better
> approach that I am not aware of yet.
> 
>   www/manager6/ceph/CephInstallWizard.js | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js
> index fc99029e..59458b0d 100644
> --- a/www/manager6/ceph/CephInstallWizard.js
> +++ b/www/manager6/ceph/CephInstallWizard.js
> @@ -337,6 +337,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
>   	    xtype: 'inputpanel',
>   	    title: gettext('Configuration'),
>   	    onlineHelp: 'chapter_pveceph',
> +	    height: 300,
>   	    cbind: {
>   		nodename: '{nodename}',
>   	    },
> @@ -350,7 +351,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
>   		activate: function() {
>   		    this.up('pveCephInstallWizard').down('#submit').setText(gettext('Next'));
>   		},
> -		beforeshow: function() {
> +		afterrender: function() {
>   		    if (this.up('pveCephInstallWizard').getViewModel().get('configuration')) {
>   			this.mask("Configuration already initialized", ['pve-static-mask']);
>   		    } else {
> 




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

* [pve-devel] applied: [PATCH RFC manager] ui: ceph install wizard: fix config exists note position
  2021-08-10 13:27 [pve-devel] [PATCH RFC manager] ui: ceph install wizard: fix config exists note position Aaron Lauterer
  2021-09-30  9:23 ` Aaron Lauterer
@ 2021-10-01  7:50 ` Dominik Csapak
  1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-10-01  7:50 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

applied, thanks

although it may seem hacky, extjs masks only work properly after
rendering sadly... (we also do it in the afterrender event for the
other panels)

also i did not come up with a better way to do it




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

end of thread, other threads:[~2021-10-01  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 13:27 [pve-devel] [PATCH RFC manager] ui: ceph install wizard: fix config exists note position Aaron Lauterer
2021-09-30  9:23 ` Aaron Lauterer
2021-10-01  7:50 ` [pve-devel] applied: " Dominik Csapak

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