crafty-4/app/frontend/templates/panel/activity_logs.html

117 lines
2.9 KiB
HTML
Raw Normal View History

{% extends ../base.html %}
{% block meta %}
{% end %}
{% block title %}Crafty Controller - Activity Logs{% end %}
{% block content %}
<div class="content-wrapper">
2022-04-03 01:25:26 +00:00
<!-- Page Title Header Starts-->
<div class="row page-title-header">
<div class="col-12">
<div class="page-header">
<h4 class="page-title">Activity Logs</h4>
</div>
</div>
</div>
<!-- Page Title Header Ends-->
<div class="row">
<div class="col-md-12 col-lg-12 grid-margin stretch-card">
<div class="card">
<div class="card-header header-sm d-flex justify-content-between align-items-center">
<h4 class="card-title"><i class="fas fa-history"></i> &nbsp;Audit Logs</h4>
2022-04-03 01:25:26 +00:00
{% if data['user_data']['hints'] %}
<span class="too_small" title="{{ translate('dashboard', 'cannotSeeOnMobile', data['lang']) }}" ,
data-content="{{ translate('dashboard', 'cannotSeeOnMobile2', data['lang']) }}" ,
data-placement="top"></span>
{% end %}
</div>
<div class="card-body">
<div class="table-responsive">
2022-01-13 03:56:44 +00:00
<table class="table table-hover" id="audit_table" style="overflow: scroll;" width="100%">
<thead>
2022-04-03 01:25:26 +00:00
<tr class="rounded">
<td>Username</td>
<td>Time</td>
<td>Action</td>
<td>Server ID</td>
<td>IP</td>
</tr>
</thead>
<tbody>
2022-04-03 01:25:26 +00:00
{% for row in data['audit_logs'] %}
<tr>
<td>{{ row['user_name'] }}</td>
<td>
2022-04-03 01:25:26 +00:00
{{ row['created'].strftime('%Y-%m-%d %H:%M:%S') }}
</td>
<td>{{ row['log_msg'] }}</td>
<td>{{ row['server_id'] }}</td>
<td>{{ row['source_ip'] }}</td>
2022-04-03 01:25:26 +00:00
</tr>
{% end %}
</tbody>
2022-04-03 01:25:26 +00:00
</table>
</div>
</div>
</div>
</div>
</div>
<style>
2022-04-03 01:25:26 +00:00
.popover-body {
color: white !important;
;
}
</style>
</div>
<!-- content-wrapper ends -->
{% end %}
{% block js %}
<script>
2022-04-03 01:25:26 +00:00
$(document).ready(function () {
console.log('ready for JS!')
2022-01-13 04:52:47 +00:00
$('#audit_table').DataTable({
'order': [1, 'desc']
}
);
2022-04-03 01:25:26 +00:00
});
</script>
<script>
2022-04-03 01:25:26 +00:00
$(document).ready(function () {
$('[data-toggle="popover"]').popover();
2022-04-03 01:25:26 +00:00
if ($(window).width() < 1000) {
$('.too_small').popover("show");
}
});
2022-04-03 01:25:26 +00:00
$(window).ready(function () {
$('body').click(function () {
$('.too_small').popover("hide");
});
});
2022-04-03 01:25:26 +00:00
$(window).resize(function () {
// This will execute whenever the window is resized
2022-04-03 01:25:26 +00:00
if ($(window).width() < 1000) {
$('.too_small').popover("show");
}
2022-04-03 01:25:26 +00:00
else {
$('.too_small').popover("hide");
} // New width
});
2022-04-03 01:25:26 +00:00
</script>
{% end %}