mirror of https://github.com/Radarr/Radarr
Removed old log grid copies.
This commit is contained in:
parent
9c24b5989b
commit
722db50b35
|
@ -29,11 +29,6 @@ namespace NzbDrone.Web.Controllers
|
|||
return View();
|
||||
}
|
||||
|
||||
public ActionResult IndexOld()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public FileContentResult File()
|
||||
{
|
||||
string log = string.Empty;
|
||||
|
@ -102,11 +97,5 @@ namespace NzbDrone.Web.Controllers
|
|||
},
|
||||
JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[GridAction]
|
||||
public ActionResult AjaxBindingOld()
|
||||
{
|
||||
return View(new GridModel(_logProvider.GetAllLogs()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -688,7 +688,6 @@
|
|||
<None Include="Scripts\DataTables-1.9.0\extras\FixedColumns\media\js\FixedColumns.min.js.gz" />
|
||||
<None Include="Scripts\DataTables-1.9.0\extras\Scroller\media\js\Scroller.min.js.gz" />
|
||||
<None Include="Scripts\DataTables-1.9.0\extras\TableTools\media\js\TableTools.min.js.gz" />
|
||||
<None Include="Views\Log\IndexOld.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
@using NzbDrone.Common
|
||||
@using NzbDrone.Core.Instrumentation
|
||||
@using NzbDrone.Web.Helpers
|
||||
@model IEnumerable<NzbDrone.Core.Instrumentation.Log>
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
function onRowDataBound(e) {
|
||||
|
||||
e.row.style.boarder = "";
|
||||
|
||||
if (e.dataItem.Level == "Warn") {
|
||||
e.row.style.backgroundColor = "#FFD700";
|
||||
}
|
||||
else if (e.dataItem.Level == "Error") {
|
||||
e.row.style.backgroundColor = "#FF7500";
|
||||
}
|
||||
else if (e.dataItem.Level == "Fatal") {
|
||||
e.row.style.backgroundColor = "black";
|
||||
e.row.style.color = "red";
|
||||
}
|
||||
//e.row.style.color = 'blue';
|
||||
}
|
||||
</script>
|
||||
}
|
||||
@{ ViewBag.Title = "Logs";}
|
||||
@section ActionMenu{
|
||||
<ul class="sub-menu">
|
||||
<li>@Ajax.ActionLink("Clear Logs", "Clear", "Log", new AjaxOptions { OnSuccess = "reloadGrid" })</li>
|
||||
<li>@Html.ActionLink("File", "File", "Log")</li>
|
||||
</ul>
|
||||
}
|
||||
<div class="infoBox">
|
||||
Log entries older than 30 days are automatically deleted.</div>
|
||||
@{Html.Telerik().Grid<Log>().Name("logsGrid")
|
||||
.TableHtmlAttributes(new { @class = "Grid" })
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.Time).Title("Time").Width(170);
|
||||
columns.Bound(c => c.Level).Title("Level").Width(70);
|
||||
columns.Bound(c => c.Logger).Title("Source");
|
||||
columns.Bound(c => c.Message);
|
||||
})
|
||||
.DetailView(detailView => detailView.ClientTemplate(
|
||||
"<div>Method: <#= Method #></div>" +
|
||||
"<div><#= ExceptionType #></div>" +
|
||||
"<div class='stackframe'><#= Exception #></div>"
|
||||
))
|
||||
.DataBinding(data => data.Ajax().Select("AjaxBindingOld", "Log").Enabled(true))
|
||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Time).Descending()).Enabled(true))
|
||||
.Pageable(paging => paging.Style(GridPagerStyles.Status).PageOnScroll(true).PageSize(100))
|
||||
.Filterable()
|
||||
.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
||||
.Scrollable(c => c.Height(500))
|
||||
.ClientEvents(clientEvents =>
|
||||
{
|
||||
if (EnviromentProvider.IsProduction)
|
||||
clientEvents.OnError("grid_onError");
|
||||
})
|
||||
.Render();}
|
||||
<script type="text/javascript">
|
||||
function reloadGrid() {
|
||||
var grid = $('#logsGrid').data('tGrid');
|
||||
grid.rebind();
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue