You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.9 KiB
51 lines
1.9 KiB
14 years ago
|
@model IEnumerable<NzbDrone.Core.Instrumentation.Log>
|
||
14 years ago
|
@section Scripts{
|
||
14 years ago
|
<script type="text/javascript">
|
||
|
function onRowDataBound(e) {
|
||
|
|
||
|
e.row.style.boarder = "";
|
||
|
|
||
|
if (e.dataItem.Level == 3) {
|
||
|
e.row.style.backgroundColor = "#FFD700";
|
||
|
}
|
||
|
else if (e.dataItem.Level == 4) {
|
||
|
e.row.style.backgroundColor = "#FF7500";
|
||
|
}
|
||
|
else if (e.dataItem.Level == 5) {
|
||
|
e.row.style.backgroundColor = "black";
|
||
14 years ago
|
e.row.style.color = "red";
|
||
14 years ago
|
}
|
||
|
//e.row.style.color = 'blue';
|
||
|
}
|
||
|
</script>
|
||
14 years ago
|
}
|
||
|
@section TitleContent{
|
||
14 years ago
|
Logs
|
||
14 years ago
|
}
|
||
|
@section ActionMenu{
|
||
|
@{Html.Telerik().Menu().Name("logMenu").Items(items => items.Add().Text("Clear Logs").Action("Clear", "Log"))
|
||
|
.Render();}
|
||
|
}
|
||
|
@section MainContent{
|
||
|
@{Html.Telerik().Grid(Model).Name("logsGrid")
|
||
|
.TableHtmlAttributes(new { @class = "Grid" })
|
||
14 years ago
|
.Columns(columns =>
|
||
|
{
|
||
|
columns.Bound(c => c.Time).Title("Time").Width(190);
|
||
14 years ago
|
columns.Bound(c => c.Level).Title("Level").Width(0);
|
||
14 years ago
|
columns.Bound(c => c.Message);
|
||
|
})
|
||
|
.DetailView(detailView => detailView.ClientTemplate(
|
||
14 years ago
|
"<div><#= Logger #></div>" +
|
||
|
"<div><#= ExceptionType #></div>" +
|
||
14 years ago
|
"<div class='stackframe'><#= Exception #></div>"
|
||
14 years ago
|
)).DataBinding(data => data.Ajax().Select("_AjaxBinding", "Log"))
|
||
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Time).Descending()).Enabled(true))
|
||
|
.Pageable(
|
||
|
c =>
|
||
14 years ago
|
c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
|
||
14 years ago
|
.Filterable()
|
||
|
.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
||
14 years ago
|
.Render();}
|
||
|
}
|