web/admin: make username in events log clickable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ae7959ff51
commit
f3396226e8
|
@ -47,16 +47,21 @@ export class EventListPage extends TablePage<Event> {
|
||||||
new TableColumn(""),
|
new TableColumn(""),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
row(item: EventWithContext): TemplateResult[] {
|
row(item: EventWithContext): TemplateResult[] {
|
||||||
return [
|
return [
|
||||||
html`<div>${item.action}</div>
|
html`<div>${item.action}</div>
|
||||||
<small>${item.app}</small>`,
|
<small>${item.app}</small>`,
|
||||||
html`<div>${item.user?.username}</div>
|
item.user?.username ?
|
||||||
|
html`<a href="#/identity/users/${item.user.pk}">
|
||||||
|
${item.user?.username}
|
||||||
|
</a>
|
||||||
${item.user.on_behalf_of ? html`<small>
|
${item.user.on_behalf_of ? html`<small>
|
||||||
${t`On behalf of ${item.user.on_behalf_of.username}`}
|
${t`On behalf of ${item.user.on_behalf_of.username}`}
|
||||||
</small>` : html``}`,
|
</small>` : html``}` :
|
||||||
|
html`-`,
|
||||||
html`<span>${item.created?.toLocaleString()}</span>`,
|
html`<span>${item.created?.toLocaleString()}</span>`,
|
||||||
html`<span>${item.clientIp}</span>`,
|
html`<span>${item.clientIp || "-"}</span>`,
|
||||||
html`<a href="#/events/log/${item.pk}">
|
html`<a href="#/events/log/${item.pk}">
|
||||||
<i class="fas fas fa-share-square"></i>
|
<i class="fas fas fa-share-square"></i>
|
||||||
</a>`,
|
</a>`,
|
||||||
|
|
Reference in New Issue