public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0
@ 2021-05-26  9:01 Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 1/6] ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields' Dominik Csapak
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

this series contains pve fixes/changes fror extjs7.0

all of these patches should be backwards compatible with 6.0.1

i tried to test every panel/button with extjs 7.0,
but i am sure i forgot one or the other ;)

Dominik Csapak (6):
  ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields'
  ui: ResourceGrid: move first update to afterrender
  ui: panel/ConfigPanel: change ui class to pve-nav
  ui: panel/ConfigPanel: return early on no selection
  ui: tree/SnapshotTree: use beforedestroy instead of destroy
  ui: form/CalendarEvent: remove displayField from config

 www/css/ext6-pve.css                   | 2 +-
 www/manager6/form/CalendarEvent.js     | 1 -
 www/manager6/form/VMCPUFlagSelector.js | 3 +++
 www/manager6/grid/ResourceGrid.js      | 4 +++-
 www/manager6/panel/ConfigPanel.js      | 5 ++++-
 www/manager6/tree/SnapshotTree.js      | 2 +-
 6 files changed, 12 insertions(+), 5 deletions(-)

-- 
2.20.1





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

* [pve-devel] [PATCH manager 1/6] ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields'
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
@ 2021-05-26  9:01 ` Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 2/6] ui: ResourceGrid: move first update to afterrender Dominik Csapak
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

else they might get picked up individually

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/form/VMCPUFlagSelector.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/manager6/form/VMCPUFlagSelector.js b/www/manager6/form/VMCPUFlagSelector.js
index 81874a42..ace3c531 100644
--- a/www/manager6/form/VMCPUFlagSelector.js
+++ b/www/manager6/form/VMCPUFlagSelector.js
@@ -138,14 +138,17 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
 			boxLabel: '-',
 			boxLabelAlign: 'before',
 			inputValue: '-',
+			isFormField: false,
 		    },
 		    {
 			checked: true,
 			inputValue: '=',
+			isFormField: false,
 		    },
 		    {
 			boxLabel: '+',
 			inputValue: '+',
+			isFormField: false,
 		    },
 		],
 	    },
-- 
2.20.1





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

* [pve-devel] [PATCH manager 2/6] ui: ResourceGrid: move first update to afterrender
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 1/6] ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields' Dominik Csapak
@ 2021-05-26  9:01 ` Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 3/6] ui: panel/ConfigPanel: change ui class to pve-nav Dominik Csapak
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

else with extjs 7.0, the first render does not happen yet, because
the grid is not visible at that time

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/grid/ResourceGrid.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/manager6/grid/ResourceGrid.js b/www/manager6/grid/ResourceGrid.js
index 07048b88..29906a37 100644
--- a/www/manager6/grid/ResourceGrid.js
+++ b/www/manager6/grid/ResourceGrid.js
@@ -125,11 +125,13 @@ Ext.define('PVE.grid.ResourceGrid', {
 		    var ws = me.up('pveStdWorkspace');
 		    ws.selectById(record.data.id);
 		},
+		afterrender: function() {
+		    updateGrid();
+		},
 	    },
             columns: rstore.defaultColumns(),
 	});
 	me.callParent();
-	updateGrid();
 	me.mon(rstore, 'load', () => updateGrid());
     },
 });
-- 
2.20.1





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

* [pve-devel] [PATCH manager 3/6] ui: panel/ConfigPanel: change ui class to pve-nav
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 1/6] ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields' Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 2/6] ui: ResourceGrid: move first update to afterrender Dominik Csapak
@ 2021-05-26  9:01 ` Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 4/6] ui: panel/ConfigPanel: return early on no selection Dominik Csapak
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/css/ext6-pve.css              | 2 +-
 www/manager6/panel/ConfigPanel.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css
index acf39c8c..0bad29ad 100644
--- a/www/css/ext6-pve.css
+++ b/www/css/ext6-pve.css
@@ -486,7 +486,7 @@ div.right-aligned {
     background-color: #FFCC00;
 }
 
-.x-treelist-nav {
+.x-treelist-pve-nav {
     background-color: #f5f5f5;
 }
 
diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index 2ab1ae4b..d7c36373 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -61,7 +61,7 @@ Ext.define('PVE.panel.Config', {
 	items: {
 	    xtype: 'treelist',
 	    itemId: 'menu',
-	    ui: 'nav',
+	    ui: 'pve-nav',
 	    expanderOnly: true,
 	    expanderFirst: false,
 	    animation: false,
-- 
2.20.1





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

* [pve-devel] [PATCH manager 4/6] ui: panel/ConfigPanel: return early on no selection
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
                   ` (2 preceding siblings ...)
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 3/6] ui: panel/ConfigPanel: change ui class to pve-nav Dominik Csapak
@ 2021-05-26  9:01 ` Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 5/6] ui: tree/SnapshotTree: use beforedestroy instead of destroy Dominik Csapak
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

treelist technically allows deselection and this happens on destruction
in extjs 7.0 so simply return early to avoid errors accessing
components that do not exist anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/panel/ConfigPanel.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index d7c36373..224bc768 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -68,6 +68,9 @@ Ext.define('PVE.panel.Config', {
 	    singleExpand: false,
 	    listeners: {
 		selectionchange: function(treeList, selection) {
+		    if (!selection) {
+			return;
+		    }
 		    let view = this.up('panel');
 		    view.suspendLayout = true;
 		    view.activateCard(selection.data.id);
-- 
2.20.1





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

* [pve-devel] [PATCH manager 5/6] ui: tree/SnapshotTree: use beforedestroy instead of destroy
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
                   ` (3 preceding siblings ...)
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 4/6] ui: panel/ConfigPanel: return early on no selection Dominik Csapak
@ 2021-05-26  9:01 ` Dominik Csapak
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 6/6] ui: form/CalendarEvent: remove displayField from config Dominik Csapak
  2021-05-27 10:44 ` [pve-devel] applied: [PATCH manager 0/6] fixes/preparation extjs 7.0 Thomas Lamprecht
  6 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

on extjs 7.0, this triggers when the handler is not available anymore,
so use the beforedestroy event instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/tree/SnapshotTree.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/tree/SnapshotTree.js b/www/manager6/tree/SnapshotTree.js
index 39fcf88a..6b2431f5 100644
--- a/www/manager6/tree/SnapshotTree.js
+++ b/www/manager6/tree/SnapshotTree.js
@@ -229,7 +229,7 @@ Ext.define('PVE.guest.SnapshotTree', {
     listeners: {
 	selectionchange: 'select',
 	itemdblclick: 'editSnapshot',
-	destroy: 'cancel',
+	beforedestroy: 'cancel',
     },
 
     layout: 'fit',
-- 
2.20.1





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

* [pve-devel] [PATCH manager 6/6] ui: form/CalendarEvent: remove displayField from config
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
                   ` (4 preceding siblings ...)
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 5/6] ui: tree/SnapshotTree: use beforedestroy instead of destroy Dominik Csapak
@ 2021-05-26  9:01 ` Dominik Csapak
  2021-05-27 10:44 ` [pve-devel] applied: [PATCH manager 0/6] fixes/preparation extjs 7.0 Thomas Lamprecht
  6 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2021-05-26  9:01 UTC (permalink / raw)
  To: pve-devel

in extjs 7.0, setting the displayField overwrites the displayTpl, which
we use here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/form/CalendarEvent.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/www/manager6/form/CalendarEvent.js b/www/manager6/form/CalendarEvent.js
index 8072eaaa..00953f37 100644
--- a/www/manager6/form/CalendarEvent.js
+++ b/www/manager6/form/CalendarEvent.js
@@ -5,7 +5,6 @@ Ext.define('PVE.form.CalendarEvent', {
     editable: true,
 
     valueField: 'value',
-    displayField: 'text',
     queryMode: 'local',
 
     store: {
-- 
2.20.1





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

* [pve-devel] applied: [PATCH manager 0/6] fixes/preparation extjs 7.0
  2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
                   ` (5 preceding siblings ...)
  2021-05-26  9:01 ` [pve-devel] [PATCH manager 6/6] ui: form/CalendarEvent: remove displayField from config Dominik Csapak
@ 2021-05-27 10:44 ` Thomas Lamprecht
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Lamprecht @ 2021-05-27 10:44 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 26.05.21 11:01, Dominik Csapak wrote:
> this series contains pve fixes/changes fror extjs7.0
> 
> all of these patches should be backwards compatible with 6.0.1
> 
> i tried to test every panel/button with extjs 7.0,
> but i am sure i forgot one or the other ;)
> 
> Dominik Csapak (6):
>   ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields'
>   ui: ResourceGrid: move first update to afterrender
>   ui: panel/ConfigPanel: change ui class to pve-nav
>   ui: panel/ConfigPanel: return early on no selection
>   ui: tree/SnapshotTree: use beforedestroy instead of destroy
>   ui: form/CalendarEvent: remove displayField from config

applied to master and stable-6, thanks!




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

end of thread, other threads:[~2021-05-27 10:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26  9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
2021-05-26  9:01 ` [pve-devel] [PATCH manager 1/6] ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields' Dominik Csapak
2021-05-26  9:01 ` [pve-devel] [PATCH manager 2/6] ui: ResourceGrid: move first update to afterrender Dominik Csapak
2021-05-26  9:01 ` [pve-devel] [PATCH manager 3/6] ui: panel/ConfigPanel: change ui class to pve-nav Dominik Csapak
2021-05-26  9:01 ` [pve-devel] [PATCH manager 4/6] ui: panel/ConfigPanel: return early on no selection Dominik Csapak
2021-05-26  9:01 ` [pve-devel] [PATCH manager 5/6] ui: tree/SnapshotTree: use beforedestroy instead of destroy Dominik Csapak
2021-05-26  9:01 ` [pve-devel] [PATCH manager 6/6] ui: form/CalendarEvent: remove displayField from config Dominik Csapak
2021-05-27 10:44 ` [pve-devel] applied: [PATCH manager 0/6] fixes/preparation extjs 7.0 Thomas Lamprecht

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