Fixed some issues around EF and log view

This commit is contained in:
kay.one 2011-11-22 22:41:38 -08:00
parent 9e37c894dd
commit 6e227f572d
7 changed files with 10 additions and 13490 deletions

View File

@ -27,7 +27,7 @@ namespace NzbDrone.Web.Controllers
} }
[GridAction] [GridAction]
public ActionResult _AjaxBinding() public ActionResult AjaxBinding()
{ {
return View(new GridModel(_logProvider.GetAllLogs())); return View(new GridModel(_logProvider.GetAllLogs()));
} }

View File

@ -45,9 +45,9 @@
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\EntityFramework.4.1.10715.0\lib\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.4.2.0.0\lib\net40\EntityFramework.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@ -23,11 +23,9 @@
@section TitleContent{ @section TitleContent{
Logs Logs
} }
@section ActionMenu{ @section ActionMenu{
@{Html.RenderPartial("SubMenu");} @{Html.RenderPartial("SubMenu");}
} }
@section MainContent{ @section MainContent{
@{Html.Telerik().Grid<Log>().Name("logsGrid") @{Html.Telerik().Grid<Log>().Name("logsGrid")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -43,17 +41,17 @@ Logs
"<div><#= ExceptionType #></div>" + "<div><#= ExceptionType #></div>" +
"<div class='stackframe'><#= Exception #></div>" "<div class='stackframe'><#= Exception #></div>"
)) ))
.DataBinding(data => data .DataBinding(data =>
.Ajax() {
.OperationMode(GridOperationMode.Client) data.Server().Select("AjaxBinding", "Log", new { ajax = true });
.Select("_AjaxBinding", "Log")) data.Ajax().Select("AjaxBinding", "Log").Enabled(true);
})
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Time).Descending()).Enabled(true)) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Time).Descending()).Enabled(true))
.Pageable(c => c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) .Pageable(c => c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
.Filterable() .Filterable()
.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) .ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
.Render();} .Render();}
} }
<script type="text/javascript"> <script type="text/javascript">
function reloadGrid() { function reloadGrid() {
var grid = $('#logsGrid').data('tGrid'); var grid = $('#logsGrid').data('tGrid');

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="EntityFramework" version="4.1.10715.0" /> <package id="EntityFramework" version="4.2.0.0" />
<package id="EntityFramework.SqlServerCompact" version="4.1.8482.2" /> <package id="EntityFramework.SqlServerCompact" version="4.1.8482.2" />
<package id="jQuery" version="1.6.1" /> <package id="jQuery" version="1.6.1" />
<package id="jQuery" version="1.6.3" /> <package id="jQuery" version="1.6.3" />

File diff suppressed because it is too large Load Diff