module load error handler, router optimizaton, relative paths, fixed add existing module control panel issue
This commit is contained in:
18
Oqtane.Client/Modules/Admin/Error/Index.razor
Normal file
18
Oqtane.Client/Modules/Admin/Error/Index.razor
Normal file
@ -0,0 +1,18 @@
|
||||
@namespace Oqtane.Modules.Admin.Error
|
||||
@inherits ModuleBase
|
||||
@inject IModuleService ModuleService
|
||||
|
||||
@code {
|
||||
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Anonymous; } }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Module module = await ModuleService.GetModuleAsync(ModuleState.ModuleId);
|
||||
if (UserSecurity.IsAuthorized(PageState.User, Constants.HostRole))
|
||||
{
|
||||
string message = "A Problem Was Encountered Loading Module " + module.ModuleDefinitionName;
|
||||
AddModuleMessage(message, MessageType.Error);
|
||||
}
|
||||
await logger.LogCritical("Error Loading Module {Module}", module);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user