[pve-devel] [PATCH manager v3 3/3] ui: tasks: add actioncolumn to open task
Aaron Lauterer
a.lauterer at proxmox.com
Mon Nov 18 11:45:30 CET 2024
Many (new) users don't realize that the task view can be used to open
the task details.
By adding a small action column we can have a button to open the task as
well, next to double clicking it.
Signed-off-by: Aaron Lauterer <a.lauterer at 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.
change since v2:
* use "View Task" instead of "Show Task" in the tooltip
v1:
* use the `rec` parameter directly instead of fetching if from the grid
store
www/manager6/dc/Tasks.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/www/manager6/dc/Tasks.js b/www/manager6/dc/Tasks.js
index 9405f9a2..c43218ce 100644
--- a/www/manager6/dc/Tasks.js
+++ b/www/manager6/dc/Tasks.js
@@ -127,6 +127,25 @@ Ext.define('PVE.dc.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,
+ });
+ },
+ },
+ ],
+ },
],
listeners: {
itemdblclick: run_task_viewer,
--
2.39.5
More information about the pve-devel
mailing list