From 04f612a65ad5d3fc442f04f209b5c6fc954b50f6 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Mon, 18 Nov 2024 11:45:28 +0100 Subject: [PATCH] node tasks: add action column with button to view task 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 Tested-by: Friedrich Weber [TL: reduce indentation level] Signed-off-by: Thomas Lamprecht --- src/node/Tasks.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/node/Tasks.js b/src/node/Tasks.js index 62c9c18..5e46b3d 100644 --- a/src/node/Tasks.js +++ b/src/node/Tasks.js @@ -441,6 +441,23 @@ 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() {