task viewer: render tokenid as part of username

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-09-29 09:46:02 +02:00
parent 0c3ade1d32
commit 8e3f2973a8

View File

@ -127,12 +127,20 @@ Ext.define('Proxmox.window.TaskViewer', {
},
user: {
header: gettext('User name'),
renderer: Ext.String.htmlEncode,
renderer: function(value) {
let user = value;
let tokenid = statgrid.getObjectValue('tokenid');
if (tokenid) {
user += `!${tokenid} (API Token)`;
}
return Ext.String.htmlEncode(user);
},
required: true,
},
tokenid: {
header: gettext('API Token'),
renderer: Ext.String.htmlEncode,
visible: false,
},
node: {
header: gettext('Node'),