##// END OF EJS Templates
audit-journal: support v2 api to browse audit events.
marcink -
r1695:afa71a5d default
parent child Browse files
Show More
@@ -1,60 +1,74 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="base" file="/base/base.mako"/>
3
3
4 %if c.users_log:
4 %if c.users_log:
5 <table class="rctable admin_log">
5 <table class="rctable admin_log">
6 <tr>
6 <tr>
7 <th>${_('Username')}</th>
7 <th>${_('Username')}</th>
8 <th>${_('Action')}</th>
8 <th>${_('Action')}</th>
9 <th>${_('Action Data')}</th>
9 <th>${_('Repository')}</th>
10 <th>${_('Repository')}</th>
10 <th>${_('Date')}</th>
11 <th>${_('Date')}</th>
11 <th>${_('From IP')}</th>
12 <th>${_('IP')}</th>
12 </tr>
13 </tr>
13
14
14 %for cnt,l in enumerate(c.users_log):
15 %for cnt,l in enumerate(c.users_log):
15 <tr class="parity${cnt%2}">
16 <tr class="parity${cnt%2}">
16 <td class="td-user">
17 <td class="td-user">
17 %if l.user is not None:
18 %if l.user is not None:
18 ${base.gravatar_with_user(l.user.email)}
19 ${base.gravatar_with_user(l.user.email)}
19 %else:
20 %else:
20 ${l.username}
21 ${l.username}
21 %endif
22 %endif
22 </td>
23 </td>
23 <td class="td-journalaction">${h.action_parser(l)[0]()}
24 <td class="td-journalaction">
25 % if l.version == l.VERSION_1:
26 ${h.action_parser(l)[0]()}
27 % else:
28 ${h.literal(l.action)}
29 % endif
30
24 <div class="journal_action_params">
31 <div class="journal_action_params">
32 % if l.version == l.VERSION_1:
25 ${h.literal(h.action_parser(l)[1]())}
33 ${h.literal(h.action_parser(l)[1]())}
34 % endif
26 </div>
35 </div>
27 </td>
36 </td>
37 <td>
38 % if l.version == l.VERSION_2:
39 ${l.action_data}
40 % endif
41 </td>
28 <td class="td-componentname">
42 <td class="td-componentname">
29 %if l.repository is not None:
43 %if l.repository is not None:
30 ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))}
44 ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))}
31 %else:
45 %else:
32 ${l.repository_name}
46 ${l.repository_name}
33 %endif
47 %endif
34 </td>
48 </td>
35
49
36 <td class="td-time">${h.format_date(l.action_date)}</td>
50 <td class="td-time">${h.format_date(l.action_date)}</td>
37 <td class="td-ip">${l.user_ip}</td>
51 <td class="td-ip">${l.user_ip}</td>
38 </tr>
52 </tr>
39 %endfor
53 %endfor
40 </table>
54 </table>
41
55
42 <div class="pagination-wh pagination-left">
56 <div class="pagination-wh pagination-left">
43 ${c.users_log.pager('$link_previous ~2~ $link_next')}
57 ${c.users_log.pager('$link_previous ~2~ $link_next')}
44 </div>
58 </div>
45 %else:
59 %else:
46 ${_('No actions yet')}
60 ${_('No actions yet')}
47 %endif
61 %endif
48
62
49 <script type="text/javascript">
63 <script type="text/javascript">
50 $(function(){
64 $(function(){
51 //because this is loaded on every pjax request, it must run only once
65 //because this is loaded on every pjax request, it must run only once
52 //therefore the .one method
66 //therefore the .one method
53 $(document).on('pjax:complete',function(){
67 $(document).on('pjax:complete',function(){
54 show_more_event();
68 show_more_event();
55 });
69 });
56
70
57 $(document).pjax('#user_log .pager_link', '#user_log');
71 $(document).pjax('#user_log .pager_link', '#user_log');
58 });
72 });
59 </script>
73 </script>
60
74
General Comments 0
You need to be logged in to leave comments. Login now