all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] ui: sdn: route map edit: use more consistent style for match/set grid
@ 2026-05-19 14:31 Dominik Csapak
  2026-05-19 19:17 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2026-05-19 14:31 UTC (permalink / raw)
  To: pve-devel

by using a widgetcolumn instead of an actioncolumn and putting the
add button at the bottom of the grid. this is more in line what
we usually do (with some exceptions).

Also adapt the handlers to match the interface change from actioncolumn
handler to button handler.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/sdn/RouteMapPanel.js | 46 ++++++++++++++++---------------
 1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/www/manager6/sdn/RouteMapPanel.js b/www/manager6/sdn/RouteMapPanel.js
index 46f243fb..f7776768 100644
--- a/www/manager6/sdn/RouteMapPanel.js
+++ b/www/manager6/sdn/RouteMapPanel.js
@@ -241,15 +241,14 @@ Ext.define('PVE.sdn.RouteMapSetField', {
             },
         },
         {
-            width: 20,
-            xtype: 'actioncolumn',
-            items: [
-                {
-                    tooltip: gettext('Delete'),
-                    handler: 'deleteSet',
-                    iconCls: 'fa critical fa-trash-o',
-                },
-            ],
+            width: 40,
+            xtype: 'widgetcolumn',
+            widget: {
+                xtype: 'button',
+                tooltip: gettext('Delete'),
+                handler: 'deleteSet',
+                iconCls: 'fa fa-trash-o',
+            },
         },
     ],
 
@@ -300,10 +299,11 @@ Ext.define('PVE.sdn.RouteMapSetField', {
         };
     },
 
-    tbar: [
+    bbar: [
         {
             xtype: 'button',
             text: gettext('Add'),
+            iconCls: 'fa fa-plus-circle',
             handler: 'addEntry',
         },
     ],
@@ -316,8 +316,9 @@ Ext.define('PVE.sdn.RouteMapSetField', {
                 value: null,
             });
         },
-        deleteSet: function (_table, _rI, _cI, _item, _e, record) {
+        deleteSet: function (btn) {
             let me = this;
+            let record = btn.getWidgetRecord();
             me.getView().getStore().remove(record);
         },
     },
@@ -498,15 +499,14 @@ Ext.define('PVE.sdn.RouteMapMatchField', {
             },
         },
         {
-            width: 20,
-            xtype: 'actioncolumn',
-            items: [
-                {
-                    tooltip: gettext('Delete'),
-                    handler: 'deleteMatch',
-                    iconCls: 'fa critical fa-trash-o',
-                },
-            ],
+            width: 40,
+            xtype: 'widgetcolumn',
+            widget: {
+                xtype: 'button',
+                tooltip: gettext('Delete'),
+                handler: 'deleteMatch',
+                iconCls: 'fa fa-trash-o',
+            },
         },
     ],
 
@@ -558,10 +558,11 @@ Ext.define('PVE.sdn.RouteMapMatchField', {
         };
     },
 
-    tbar: [
+    bbar: [
         {
             xtype: 'button',
             text: gettext('Add'),
+            iconCls: 'fa fa-plus-circle',
             handler: 'addEntry',
         },
     ],
@@ -574,8 +575,9 @@ Ext.define('PVE.sdn.RouteMapMatchField', {
                 value: null,
             });
         },
-        deleteMatch: function (_table, _rI, _cI, _item, _e, record) {
+        deleteMatch: function (btn) {
             let me = this;
+            let record = btn.getWidgetRecord();
             me.getView().getStore().remove(record);
         },
     },
-- 
2.47.3





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

* applied: [PATCH manager] ui: sdn: route map edit: use more consistent style for match/set grid
  2026-05-19 14:31 [PATCH manager] ui: sdn: route map edit: use more consistent style for match/set grid Dominik Csapak
@ 2026-05-19 19:17 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-05-19 19:17 UTC (permalink / raw)
  To: pve-devel, Dominik Csapak

On Tue, 19 May 2026 16:31:53 +0200, Dominik Csapak wrote:
> by using a widgetcolumn instead of an actioncolumn and putting the
> add button at the bottom of the grid. this is more in line what
> we usually do (with some exceptions).
> 
> Also adapt the handlers to match the interface change from actioncolumn
> handler to button handler.
> 
> [...]

Applied, thanks!

[1/1] ui: sdn: route map edit: use more consistent style for match/set grid
      commit: 484f69c00c8d7e2e072b63014c4945ce66e3a84d




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

end of thread, other threads:[~2026-05-19 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 14:31 [PATCH manager] ui: sdn: route map edit: use more consistent style for match/set grid Dominik Csapak
2026-05-19 19:17 ` applied: " Thomas Lamprecht

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