public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit v3 1/3] node tasks: add action column with button to view task
Date: Mon, 18 Nov 2024 11:45:28 +0100	[thread overview]
Message-ID: <20241118104530.91798-2-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20241118104530.91798-1-a.lauterer@proxmox.com>

This is primarily aimed to make it more discoverable that one can open
tasks directly, instead of selecting and clicking the view button at the
top.

The chevron-right icon was chosen, to be more in alignmend with other
places where we use it. For now, mainly PBS.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
I placed the actioncolumn at the end. See the cover letter for the
reasoning. Placing it anywhere else in the grid should just be a
yank/paste.

changes since v2:
* new patch

 src/node/Tasks.js | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/node/Tasks.js b/src/node/Tasks.js
index 62c9c18..31052b7 100644
--- a/src/node/Tasks.js
+++ b/src/node/Tasks.js
@@ -441,6 +441,25 @@ Ext.define('Proxmox.node.Tasks', {
 		return Proxmox.Utils.format_task_status(value);
 	    },
 	},
+	{
+	    xtype: 'actioncolumn',
+	    width: 30,
+	    align: 'center',
+	    tooltip: gettext('Actions'),
+	    items: [
+		{
+		    iconCls: 'fa fa-chevron-right',
+		    tooltip: gettext('View Task'),
+		    handler: function(_grid, _rowIndex, _colIndex, _item, _e, rec) {
+			    Ext.create('Proxmox.window.TaskViewer', {
+				autoShow: true,
+				upid: rec.data.upid,
+				endtime: rec.data.endtime,
+			    });
+		    },
+		},
+	    ],
+	},
     ],
 
     initComponent: function() {
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-11-18 10:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 10:45 [pve-devel] [PATCH widget-toolkit, manager v3 0/3] ui: tasks: add button to Aaron Lauterer
2024-11-18 10:45 ` Aaron Lauterer [this message]
2024-11-18 10:45 ` [pve-devel] [PATCH widget-toolkit v3 2/3] node tasks: align view task button label to other uses Aaron Lauterer
2024-11-18 10:45 ` [pve-devel] [PATCH manager v3 3/3] ui: tasks: add actioncolumn to open task Aaron Lauterer

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=20241118104530.91798-2-a.lauterer@proxmox.com \
    --to=a.lauterer@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal