event log UI improvements
This commit is contained in:
@ -3,6 +3,8 @@ using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
{
|
||||
@ -19,11 +21,20 @@ namespace Oqtane.Controllers
|
||||
this.Logs = Logs;
|
||||
}
|
||||
|
||||
// GET: api/<controller>?siteid=x
|
||||
// GET: api/<controller>?siteid=x&level=y
|
||||
[HttpGet]
|
||||
public IEnumerable<Log> Get(string siteid)
|
||||
[Authorize(Roles = Constants.AdminRole)]
|
||||
public IEnumerable<Log> Get(string siteid, string level, string rows)
|
||||
{
|
||||
return Logs.GetLogs(int.Parse(siteid));
|
||||
return Logs.GetLogs(int.Parse(siteid), level, int.Parse(rows));
|
||||
}
|
||||
|
||||
// GET api/<controller>/5
|
||||
[HttpGet("{id}")]
|
||||
[Authorize(Roles = Constants.AdminRole)]
|
||||
public Log Get(int id)
|
||||
{
|
||||
return Logs.GetLog(id);
|
||||
}
|
||||
|
||||
// POST api/<controller>
|
||||
|
@ -37,6 +37,13 @@ namespace Oqtane.Controllers
|
||||
return PageModules.GetPageModule(id);
|
||||
}
|
||||
|
||||
// GET: api/<controller>/pageid/moduleid
|
||||
[HttpGet("{pageid}/{moduleid}")]
|
||||
public PageModule Get(int pageid, int moduleid)
|
||||
{
|
||||
return PageModules.GetPageModule(pageid, moduleid);
|
||||
}
|
||||
|
||||
// POST api/<controller>
|
||||
[HttpPost]
|
||||
[Authorize(Roles = Constants.AdminRole)]
|
||||
|
@ -22,6 +22,7 @@ namespace Oqtane.Controllers
|
||||
|
||||
// GET: api/<controller>
|
||||
[HttpGet]
|
||||
[Authorize(Roles = Constants.HostRole)]
|
||||
public IEnumerable<Tenant> Get()
|
||||
{
|
||||
return Tenants.GetTenants();
|
||||
@ -29,6 +30,7 @@ namespace Oqtane.Controllers
|
||||
|
||||
// GET api/<controller>/5
|
||||
[HttpGet("{id}")]
|
||||
[Authorize(Roles = Constants.HostRole)]
|
||||
public Tenant Get(int id)
|
||||
{
|
||||
return Tenants.GetTenant(id);
|
||||
|
Reference in New Issue
Block a user