From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 2/3] ui: sdn: redistribution grid: make style consistent
Date: Wed, 20 May 2026 10:10:41 +0200 [thread overview]
Message-ID: <20260520081047.756068-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260520081047.756068-1-d.csapak@proxmox.com>
as with the other grids that are editable:
* remove button instead of remove action
* add button below and on the left side
in this case also add an empty text and add a minimum height to show it.
(data needs to be initialized for it to show correctly)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
.../sdn/fabrics/RedistributionGrid.js | 31 +++++++++++--------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/www/manager6/sdn/fabrics/RedistributionGrid.js b/www/manager6/sdn/fabrics/RedistributionGrid.js
index 7dfd4d49..34af5375 100644
--- a/www/manager6/sdn/fabrics/RedistributionGrid.js
+++ b/www/manager6/sdn/fabrics/RedistributionGrid.js
@@ -15,20 +15,26 @@ Ext.define('PVE.sdn.Fabric.RedistributionGrid', {
store: {
model: 'PVE.sdn.Fabric.Redistribution',
+ data: [],
},
- tbar: [
- '->',
+ bbar: [
{
text: gettext('Add'),
handler: 'addRedistribution',
},
],
+ minHeight: 100,
+
border: false,
columns: [],
+ viewConfig: {
+ emptyText: gettext('No entries configured'),
+ },
+
controller: {
xclass: 'Ext.app.ViewController',
@@ -44,8 +50,9 @@ Ext.define('PVE.sdn.Fabric.RedistributionGrid', {
me.handleUpdate();
},
- deleteRedistribution: function (table, rI, cI, item, e, rec) {
+ deleteRedistribution: function (btn) {
let me = this;
+ let rec = btn.getWidgetRecord();
me.getView().getStore().remove(rec);
me.handleUpdate();
},
@@ -108,16 +115,14 @@ Ext.define('PVE.sdn.Fabric.RedistributionGrid', {
},
...me.getAdditionalColumns(),
{
- text: gettext('Action'),
- xtype: 'actioncolumn',
- width: 100,
- items: [
- {
- tooltip: gettext('Delete'),
- handler: 'deleteRedistribution',
- iconCls: 'fa critical fa-trash-o',
- },
- ],
+ xtype: 'widgetcolumn',
+ width: 40,
+ widget: {
+ xtype: 'button',
+ tooltip: gettext('Delete'),
+ handler: 'deleteRedistribution',
+ iconCls: 'fa fa-trash-o',
+ },
},
];
--
2.47.3
next prev parent reply other threads:[~2026-05-20 8:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 8:10 [PATCH manager 1/3] ui: sdn: interface panel: limit heigh Dominik Csapak
2026-05-20 8:10 ` Dominik Csapak [this message]
2026-05-20 8:10 ` [PATCH manager 3/3] ui: sdn: fabrics: make name required for new fabrics Dominik Csapak
2026-05-20 11:51 ` applied: [PATCH manager 1/3] ui: sdn: interface panel: limit heigh 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=20260520081047.756068-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox