web/admin: make username in events log clickable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
b526250515
commit
078dfb30f3
|
@ -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 ?
|
||||||
${item.user.on_behalf_of ? html`<small>
|
html`<a href="#/identity/users/${item.user.pk}">
|
||||||
${t`On behalf of ${item.user.on_behalf_of.username}`}
|
${item.user?.username}
|
||||||
</small>` : html``}`,
|
</a>
|
||||||
|
${item.user.on_behalf_of ? html`<small>
|
||||||
|
${t`On behalf of ${item.user.on_behalf_of.username}`}
|
||||||
|
</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