Add option to find reports corresponding to device stats.

This commit is contained in:
2019-11-10 20:55:45 +00:00
parent dfbd9bd77f
commit 57469bef1d
3 changed files with 20 additions and 2 deletions

View File

@@ -16,8 +16,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
// GET: Admin/DeviceStats
public async Task<IActionResult> Index() =>
View(await _context.DeviceStats.OrderBy(d => d.Manufacturer).ThenBy(d => d.Model).ThenBy(d => d.Bus).
ToListAsync());
View(await _context.DeviceStats.Include(d => d.Report).OrderBy(d => d.Manufacturer).ThenBy(d => d.Model).
ThenBy(d => d.Bus).ToListAsync());
// GET: Admin/DeviceStats/Edit/5
public async Task<IActionResult> Edit(int? id)

View File

@@ -1,3 +1,4 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.Server.Models;
@@ -119,5 +120,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
}
bool UploadedReportExists(int id) => _context.Reports.Any(e => e.Id == id);
public IActionResult Find(int id, string manufacturer, string model, string bus) =>
throw new NotImplementedException();
}
}