2022-08-16 13:40:33 +03:00
|
|
|
<section class="gh-canvas gh-members-activity">
|
|
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
|
|
<LinkTo @route="settings">Settings</LinkTo>
|
|
|
|
<span>{{svg-jar "arrow-right"}}</span>
|
|
|
|
<LinkTo @route="settings.audit-log" data-test-link="audit-log-back">Audit log</LinkTo>
|
|
|
|
</h2>
|
|
|
|
</GhCanvasHeader>
|
|
|
|
<div class="view-container">
|
|
|
|
{{#let (audit-log-event-fetcher pageSize=50) as |eventsFetcher|}}
|
|
|
|
{{#if eventsFetcher.data}}
|
2022-08-17 15:43:01 +03:00
|
|
|
<div class="gh-list-scrolling">
|
|
|
|
<table class="gh-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>User</th>
|
|
|
|
<th>Action</th>
|
2022-08-18 16:28:03 +03:00
|
|
|
<th>When</th>
|
2022-08-17 15:43:01 +03:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{#each eventsFetcher.data as |event|}}
|
|
|
|
{{#let (parse-audit-log-event event) as |ev|}}
|
|
|
|
<tr>
|
2022-08-18 16:28:03 +03:00
|
|
|
<div class="gh-list-data gh-list-cellwidth-30">
|
2022-08-18 16:30:11 +03:00
|
|
|
<div class="flex items-center">
|
2022-08-18 17:58:42 +03:00
|
|
|
<span class="user-list-item-figure" style={{background-image-style (or ev.actor.profileImageUrl ev.actor.iconImage)}}>
|
2022-08-17 15:43:01 +03:00
|
|
|
<span class="hidden">Photo of {{ev.actor.name}}</span>
|
|
|
|
</span>
|
|
|
|
<h3 class="ma0 pa0 gh-members-list-name">{{ev.actor.name}}</h3>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-18 16:28:03 +03:00
|
|
|
<div class="gh-list-data gh-list-cellwidth-50">
|
2022-08-17 15:43:01 +03:00
|
|
|
<div class="gh-members-activity-container">
|
|
|
|
<div class="gh-members-activity-icon">{{svg-jar ev.actionIcon}}</div>
|
|
|
|
<div class="gh-members-activity-event">
|
|
|
|
<span class="gh-members-activity-description">
|
2022-08-18 14:11:00 +03:00
|
|
|
{{capitalize-first-letter ev.action}}
|
2022-08-18 14:26:51 +03:00
|
|
|
{{#if (or ev.resource.title ev.resource.name)}}
|
2022-08-18 14:11:00 +03:00
|
|
|
<LinkTo @route="editor.edit" @models={{array ev.resource.displayName ev.resource.id}} class="permalink">
|
2022-08-18 14:26:51 +03:00
|
|
|
<strong>{{if ev.resource.title ev.resource.title ev.resource.name}}</strong>
|
2022-08-18 14:11:00 +03:00
|
|
|
</LinkTo>
|
|
|
|
{{else}}
|
2022-08-18 15:22:59 +03:00
|
|
|
<br/><small>{{ev.original.resource_id}}</small>
|
2022-08-18 14:11:00 +03:00
|
|
|
{{/if}}
|
2022-08-17 15:43:01 +03:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="gh-list-data">{{moment-format ev.original.created_at "DD MMM YYYY HH:mm:ss"}}</div>
|
|
|
|
</tr>
|
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2022-08-16 13:40:33 +03:00
|
|
|
|
|
|
|
{{#if (not (or eventsFetcher.isLoading eventsFetcher.hasReachedEnd))}}
|
2022-08-17 15:43:01 +03:00
|
|
|
<GhScrollTrigger @enter={{eventsFetcher.loadNextPage}} @triggerOffset={{250}} />
|
2022-08-16 13:40:33 +03:00
|
|
|
{{/if}}
|
2022-08-17 15:43:01 +03:00
|
|
|
</div>
|
2022-08-16 13:40:33 +03:00
|
|
|
{{else}}
|
2022-08-17 15:43:01 +03:00
|
|
|
{{#unless eventsFetcher.isLoading}}
|
|
|
|
<div class="no-posts-box">
|
|
|
|
<div class="no-posts">
|
|
|
|
{{svg-jar "activity-placeholder" class="gh-members-placeholder"}}
|
|
|
|
<h4>No staff activity yet</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
2022-08-16 13:40:33 +03:00
|
|
|
|
2022-08-17 15:43:01 +03:00
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
|
|
<div class="no-posts-box"><GhLoadingSpinner /></div>
|
|
|
|
{{/if}}
|
2022-08-16 13:40:33 +03:00
|
|
|
{{/let}}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{outlet}}
|