mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Finished styling on the logger for now. #59
This commit is contained in:
parent
25a8563ee8
commit
b96087d089
21 changed files with 19906 additions and 47 deletions
|
@ -24,9 +24,11 @@
|
|||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
|
||||
using Humanizer;
|
||||
using MarkdownSharp;
|
||||
|
||||
using Nancy;
|
||||
|
@ -148,6 +150,7 @@ namespace PlexRequests.UI.Modules
|
|||
Get["/logs"] = _ => Logs();
|
||||
Get["/loglevel"] = _ => GetLogLevels();
|
||||
Post["/loglevel"] = _ => UpdateLogLevels(Request.Form.level);
|
||||
Get["/loadlogs"] = _ => LoadLogs();
|
||||
}
|
||||
|
||||
private Negotiator Authentication()
|
||||
|
@ -479,8 +482,19 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
private Negotiator Logs()
|
||||
{
|
||||
var allLogs = LogsRepo.GetAll().OrderByDescending(x => x.Id).Take(20);
|
||||
return View["Logs", allLogs];
|
||||
return View["Logs"];
|
||||
}
|
||||
|
||||
private Response LoadLogs()
|
||||
{
|
||||
var allLogs = LogsRepo.GetAll();
|
||||
var model = new DatatablesModel<LogEntity> {Data = new List<LogEntity>()};
|
||||
foreach (var l in allLogs)
|
||||
{
|
||||
l.DateString = l.Date.ToString("G");
|
||||
model.Data.Add(l);
|
||||
}
|
||||
return Response.AsJson(model);
|
||||
}
|
||||
|
||||
private Response GetLogLevels()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue