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.laute...@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 via email to