event log UI improvements
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user