mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-05-13 10:55:04 +00:00
- Implemented dashboard audit logging with InsertAuditLog, GetRecentAuditLogs, GetAuditLogsByIP, and CleanupOldAuditLogs methods. - Created dashboard configuration management with GetDashboardConfig and SetDashboardConfig methods. - Added new tables for dashboard_audit_log and dashboard_config in both MySQL and SQLite migrations. - Updated CMakeLists to include Crow and ASIO for dashboard server functionality. - Enhanced existing database classes to support new dashboard features, including character, play key, and property management. - Added new methods for retrieving and managing play keys, properties, and pet names. - Updated TestSQLDatabase to include stubs for new dashboard-related methods. - Modified shared and dashboard configuration files for new settings.
74 lines
2.0 KiB
HTML
74 lines
2.0 KiB
HTML
<div class="row">
|
|
<div class="col-12">
|
|
<h1 class="mb-4">
|
|
<i class="bi bi-activity"></i>
|
|
Activity Logs
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="mb-0">Player Activity</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<table id="activity-log-table" class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Character</th>
|
|
<th>Activity</th>
|
|
<th>Map ID</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- Populated via DataTables Ajax -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Initialize when libraries are ready
|
|
safeInit(function($) {
|
|
$('#activity-log-table').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: '/api/activity-log',
|
|
type: 'GET'
|
|
},
|
|
columns: [
|
|
{
|
|
data: 'timestamp',
|
|
render: function(data, type, row) {
|
|
if (type === 'display' || type === 'filter') {
|
|
const date = new Date(data * 1000);
|
|
return date.toLocaleString();
|
|
}
|
|
return data;
|
|
}
|
|
},
|
|
{
|
|
data: 'character_name',
|
|
render: function(data, type, row) {
|
|
return `<a href="/characters/view/${row.character_id}">${data}</a>`;
|
|
}
|
|
},
|
|
{
|
|
data: 'activity_name'
|
|
},
|
|
{
|
|
data: 'map_id'
|
|
}
|
|
],
|
|
order: [[0, 'desc']],
|
|
pageLength: 25
|
|
});
|
|
}, { requireApi: false, timeout: 8000 });
|
|
</script>
|