Implement searching reports from device stats.

This commit is contained in:
2019-11-24 03:08:09 +00:00
parent 2074ad489a
commit ad0ce6344f
5 changed files with 146 additions and 5 deletions

View File

@@ -346,5 +346,17 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
Id = deviceId
});
}
public IActionResult Find(int id, string manufacturer, string model, string revision, string bus)
{
var found = new FindReportModel
{
Id = id, Manufacturer = manufacturer, Model = model, Revision = revision,
Bus = bus,
LikeDevices = _context.Devices.Where(r => r.Model.ToLower().Contains(model.ToLower())).ToList()
};
return View(found);
}
}
}

View File

@@ -1,4 +1,3 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.CommonTypes.Metadata;
@@ -171,9 +170,6 @@ 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();
public IActionResult Promote(int? id)
{
if(id == null)