all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] ui: sdn: route map edit: use more consistent style for match/set grid
Date: Tue, 19 May 2026 16:31:53 +0200	[thread overview]
Message-ID: <20260519143804.3436951-1-d.csapak@proxmox.com> (raw)

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





             reply	other threads:[~2026-05-19 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 14:31 Dominik Csapak [this message]
2026-05-19 19:17 ` applied: [PATCH manager] ui: sdn: route map edit: use more consistent style for match/set grid 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=20260519143804.3436951-1-d.csapak@proxmox.com \
    --to=d.csapak@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 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