mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
@page
|
|
@model Remotely.Server.Areas.Identity.Pages.Account.Manage.ServerLogsModel
|
|
@inject DataService DataService
|
|
@{
|
|
ViewData["Title"] = "Server Logs";
|
|
var currentUser = DataService.GetUserByName(User.Identity.Name);
|
|
var isAdmin = currentUser.IsAdministrator;
|
|
var eventLogs = DataService.GetAllEventLogs(User.Identity.Name);
|
|
}
|
|
<h4>@ViewData["Title"]</h4>
|
|
|
|
@if (isAdmin)
|
|
{
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12 text-right">
|
|
<button class="btn btn-primary mr-3"
|
|
onclick="location.assign('/API/Commands/JSON')">
|
|
Scripting History
|
|
</button>
|
|
<button class="btn btn-primary"
|
|
onclick="location.assign('/API/ServerLogs/Download')">
|
|
Server Logs
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<table class="table table-hover table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Timestamp</th>
|
|
<th>Message</th>
|
|
<th>Source</th>
|
|
<th>Stack Trace</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var eventLog in eventLogs)
|
|
{
|
|
<tr>
|
|
<td>@eventLog.EventType</td>
|
|
<td>@eventLog.TimeStamp</td>
|
|
<td>@eventLog.Message</td>
|
|
<td>@eventLog.Source</td>
|
|
<td>@eventLog.StackTrace</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<h5 class="text-muted">Only organization administrators can view this page.</h5>
|
|
} |