event log UI improvements

This commit is contained in:
Shaun Walker
2019-10-23 10:13:58 -04:00
parent e710fd61ca
commit 7f9e47edb6
13 changed files with 314 additions and 19 deletions

View File

@ -8,7 +8,8 @@ namespace Oqtane.Services
{
public interface ILogService
{
Task<List<Log>> GetLogsAsync(int SiteId);
Task<List<Log>> GetLogsAsync(int SiteId, string Level, int Rows);
Task<Log> GetLogAsync(int LogId);
Task Log(int? PageId, int? ModuleId, int? UserId, string component, LogLevel level, Exception exception, string message, params object[] args);
}
}

View File

@ -8,6 +8,7 @@ namespace Oqtane.Services
{
Task<List<PageModule>> GetPageModulesAsync();
Task<PageModule> GetPageModuleAsync(int PageModuleId);
Task<PageModule> GetPageModuleAsync(int PageId, int ModuleId);
Task<PageModule> AddPageModuleAsync(PageModule PageModule);
Task<PageModule> UpdatePageModuleAsync(PageModule PageModule);
Task UpdatePageModuleOrderAsync(int PageId, string Pane);

View File

@ -27,9 +27,14 @@ namespace Oqtane.Services
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "Log"); }
}
public async Task<List<Log>> GetLogsAsync(int SiteId)
public async Task<List<Log>> GetLogsAsync(int SiteId, string Level, int Rows)
{
return await http.GetJsonAsync<List<Log>>(apiurl + "?siteid=" + SiteId.ToString());
return await http.GetJsonAsync<List<Log>>(apiurl + "?siteid=" + SiteId.ToString() + "&level=" + Level + "&rows=" + Rows.ToString());
}
public async Task<Log> GetLogAsync(int LogId)
{
return await http.GetJsonAsync<Log>(apiurl + "/" + LogId.ToString());
}
public async Task Log(int? PageId, int? ModuleId, int? UserId, string category, LogLevel level, Exception exception, string message, params object[] args)

View File

@ -36,6 +36,11 @@ namespace Oqtane.Services
return await http.GetJsonAsync<PageModule>(apiurl + "/" + PageModuleId.ToString());
}
public async Task<PageModule> GetPageModuleAsync(int PageId, int ModuleId)
{
return await http.GetJsonAsync<PageModule>(apiurl + "/" + PageId.ToString() + "/" + ModuleId.ToString());
}
public async Task<PageModule> AddPageModuleAsync(PageModule PageModule)
{
return await http.PostJsonAsync<PageModule>(apiurl, PageModule);