2018-07-16 03:00:52 -04:00
|
|
|
<td class="text-center">
|
2018-08-01 07:18:17 -04:00
|
|
|
<div class="avatar d-block" style="background-image: url(<%- user.avatar || '/images/default-avatar.jpg' %>)">
|
|
|
|
<span class="avatar-status <%- user.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
|
2018-07-16 03:00:52 -04:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2018-08-01 07:18:17 -04:00
|
|
|
<div>
|
|
|
|
<% if (user.is_deleted) {
|
|
|
|
%>
|
|
|
|
<span class="mdi-format-strikethrough" title="Deleted"><%- user.name %></span>
|
|
|
|
<%
|
|
|
|
} else {
|
|
|
|
%>
|
|
|
|
<%- user.name %>
|
|
|
|
<%
|
|
|
|
}
|
|
|
|
%>
|
2018-07-16 03:00:52 -04:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2018-08-01 07:18:17 -04:00
|
|
|
<div>
|
|
|
|
<%
|
|
|
|
var items = [];
|
|
|
|
switch (object_type) {
|
|
|
|
case 'proxy-host':
|
|
|
|
%> <span class="text-success"><i class="fe fe-zap"></i></span> <%
|
|
|
|
items = meta.domain_names;
|
|
|
|
break;
|
|
|
|
case 'redirection-host':
|
|
|
|
%> <span class="text-yellow"><i class="fe fe-shuffle"></i></span> <%
|
|
|
|
items = meta.domain_names;
|
|
|
|
break;
|
|
|
|
case 'stream':
|
|
|
|
%> <span class="text-blue"><i class="fe fe-radio"></i></span> <%
|
|
|
|
items.push(meta.incoming_port);
|
|
|
|
break;
|
|
|
|
case 'dead-host':
|
|
|
|
%> <span class="text-danger"><i class="fe fe-zap-off"></i></span> <%
|
|
|
|
items = meta.domain_names;
|
|
|
|
break;
|
|
|
|
case 'access-list':
|
2018-08-21 00:10:38 -04:00
|
|
|
%> <span class="text-teal"><i class="fe fe-lock"></i></span> <%
|
2018-08-01 07:18:17 -04:00
|
|
|
items.push(meta.name);
|
|
|
|
break;
|
|
|
|
case 'user':
|
|
|
|
%> <span class="text-teal"><i class="fe fe-user"></i></span> <%
|
|
|
|
items.push(meta.name);
|
|
|
|
break;
|
2018-08-07 06:27:20 -04:00
|
|
|
case 'certificate':
|
2018-08-21 00:10:38 -04:00
|
|
|
%> <span class="text-pink"><i class="fe fe-shield"></i></span> <%
|
2018-08-07 06:27:20 -04:00
|
|
|
if (meta.provider === 'letsencrypt') {
|
|
|
|
items = meta.domain_names;
|
|
|
|
} else {
|
|
|
|
items.push(meta.nice_name);
|
|
|
|
}
|
|
|
|
break;
|
2018-08-01 07:18:17 -04:00
|
|
|
}
|
|
|
|
%> <%- i18n('audit-log', action, {name: i18n('audit-log', object_type)}) %>
|
|
|
|
—
|
|
|
|
<%
|
|
|
|
if (items && items.length) {
|
|
|
|
items.map(function(item) {
|
|
|
|
%>
|
|
|
|
<span class="tag"><%- item %></span>
|
|
|
|
<%
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
%>
|
|
|
|
#<%- object_id %>
|
|
|
|
<%
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
</div>
|
|
|
|
<div class="small text-muted">
|
|
|
|
<%- formatDbDate(created_on, 'Do MMMM YYYY, h:mm a') %>
|
2018-07-16 03:00:52 -04:00
|
|
|
</div>
|
|
|
|
</td>
|
2018-08-01 07:18:17 -04:00
|
|
|
<td class="text-right">
|
|
|
|
<a href="#" class="meta btn btn-secondary btn-sm"><%- i18n('audit-log', 'view-meta') %></a>
|
|
|
|
</td>
|