Localize non components for the logs pages
This commit is contained in:
@ -6,134 +6,135 @@
|
||||
@inject IPageService PageService
|
||||
@inject IPageModuleService PageModuleService
|
||||
@inject IUserService UserService
|
||||
@inject IStringLocalizer<Index> Localizer
|
||||
|
||||
<table class="table table-borderless">
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="dateTime" HelpText="The date and time of this log" ResourceKey="DateTime">Date/Time: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="dateTime" class="form-control" @bind="@_logDate" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="level" HelpText="The level of this log" ResourceKey="Level">Level: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="level" class="form-control" @bind="@_level" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="feature" HelpText="The feature that was affected" ResourceKey="Feature">Feature: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="feature" class="form-control" @bind="@_feature" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="function" HelpText="The function that was performed" ResourceKey="Function">Function: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="function" class="form-control" @bind="@_function" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="category" HelpText="The categories that were affected" ResourceKey="Category">Category: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="category" class="form-control" @bind="@_category" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
@if (_pageName != string.Empty)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="dateTime" HelpText="The date and time of this log" ResourceKey="DateTime">Date/Time: </Label>
|
||||
<Label For="page" HelpText="The page that was affected" ResourceKey="Page">Page: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="dateTime" class="form-control" @bind="@_logDate" readonly />
|
||||
<input id="page" class="form-control" @bind="@_pageName" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (_moduleTitle != string.Empty)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="level" HelpText="The level of this log" ResourceKey="Level">Level: </Label>
|
||||
<Label For="module" HelpText="The module that was affected" ResourceKey="Module">Module: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="level" class="form-control" @bind="@_level" readonly />
|
||||
<input id="module" class="form-control" @bind="@_moduleTitle" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (_username != string.Empty)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="feature" HelpText="The feature that was affected" ResourceKey="Feature">Feature: </Label>
|
||||
<Label For="user" HelpText="The user that caused this log" ResourceKey="User">User: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="feature" class="form-control" @bind="@_feature" readonly />
|
||||
<input id="user" class="form-control" @bind="@_username" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="url" HelpText="The url the log comes from" ResourceKey="Url">Url: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="url" class="form-control" @bind="@_url" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="template" HelpText="What the log is about" ResourceKey="Template">Template: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="template" class="form-control" @bind="@_template" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="message" HelpText="The message that the system generated" class="control-label" ResourceKey="Message">Message: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea id="message" class="form-control" @bind="@_message" rows="5" readonly></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
@if (!string.IsNullOrEmpty(_exception))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="function" HelpText="The function that was performed" ResourceKey="Function">Function: </Label>
|
||||
<Label For="exception" HelpText="The exceptions generated by the system" ResourceKey="Exception">Exception: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="function" class="form-control" @bind="@_function" readonly />
|
||||
<textarea id="exception" class="form-control" @bind="@_exception" rows="5" readonly></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="category" HelpText="The categories that were affected" ResourceKey="Category">Category: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="category" class="form-control" @bind="@_category" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
@if (_pageName != string.Empty)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="page" HelpText="The page that was affected" ResourceKey="Page">Page: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="page" class="form-control" @bind="@_pageName" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (_moduleTitle != string.Empty)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="module" HelpText="The module that was affected" ResourceKey="Module">Module: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="module" class="form-control" @bind="@_moduleTitle" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (_username != string.Empty)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="user" HelpText="The user that caused this log" ResourceKey="User">User: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="user" class="form-control" @bind="@_username" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="url" HelpText="The url the log comes from" ResourceKey="Url">Url: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="url" class="form-control" @bind="@_url" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="template" HelpText="What the log is about" ResourceKey="Template">Template: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="template" class="form-control" @bind="@_template" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="message" HelpText="The message that the system generated"class="control-label" ResourceKey="Message">Message: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea id="message" class="form-control" @bind="@_message" rows="5" readonly></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
@if (!string.IsNullOrEmpty(_exception))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="exception" HelpText="The exceptions generated by the system" ResourceKey="Exception">Exception: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea id="exception" class="form-control" @bind="@_exception" rows="5" readonly></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="properties" HelpText="The properties that were affected" ResourceKey="Properties">Properties: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea id="properties" class="form-control" @bind="@_properties" rows="5" readonly></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="server" HelpText="The server that was affected" ResourceKey="Server">Server: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="server" class="form-control" @bind="@_server" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="properties" HelpText="The properties that were affected" ResourceKey="Properties">Properties: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea id="properties" class="form-control" @bind="@_properties" rows="5" readonly></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="server" HelpText="The server that was affected" ResourceKey="Server">Server: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="server" class="form-control" @bind="@_server" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||
|
||||
@code {
|
||||
private int _logId;
|
||||
@ -167,7 +168,7 @@
|
||||
_feature = log.Feature;
|
||||
_function = log.Function;
|
||||
_category = log.Category;
|
||||
|
||||
|
||||
if (log.PageId != null)
|
||||
{
|
||||
var page = await PageService.GetPageAsync(log.PageId.Value);
|
||||
@ -176,7 +177,7 @@
|
||||
_pageName = page.Name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (log.PageId != null && log.ModuleId != null)
|
||||
{
|
||||
var pagemodule = await PageModuleService.GetPageModuleAsync(log.PageId.Value, log.ModuleId.Value);
|
||||
@ -185,7 +186,7 @@
|
||||
_moduleTitle = pagemodule.Title;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (log.UserId != null)
|
||||
{
|
||||
var user = await UserService.GetUserAsync(log.UserId.Value, PageState.Site.SiteId);
|
||||
@ -194,7 +195,7 @@
|
||||
_username = user.Username;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_url = log.Url;
|
||||
_template = log.MessageTemplate;
|
||||
_message = log.Message;
|
||||
|
Reference in New Issue
Block a user