mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Link read capabilities on uploaded report details.
This commit is contained in:
@@ -30,10 +30,11 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
var model = new UploadedReportDetails
|
||||
{
|
||||
Report = await _context.Reports.Include(d => d.ATA).Include(d => d.ATAPI).Include(d => d.SCSI).
|
||||
Include(d => d.MultiMediaCard).Include(d => d.SecureDigital).
|
||||
Include(d => d.USB).Include(d => d.FireWire).Include(d => d.PCMCIA).
|
||||
FirstOrDefaultAsync(m => m.Id == id)
|
||||
Report = await _context.Reports.Include(d => d.ATA).Include(d => d.ATA.ReadCapabilities).
|
||||
Include(d => d.ATAPI).Include(d => d.SCSI).
|
||||
Include(d => d.SCSI.ReadCapabilities).Include(d => d.MultiMediaCard).
|
||||
Include(d => d.SecureDigital).Include(d => d.USB).Include(d => d.FireWire).
|
||||
Include(d => d.PCMCIA).FirstOrDefaultAsync(m => m.Id == id)
|
||||
};
|
||||
|
||||
if(model.Report is null)
|
||||
@@ -63,6 +64,9 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
d.Revision == model.Report.Revision && d.Id != id).
|
||||
Select(d => d.Id).Where(d => model.SameAll.All(r => r != d)).ToList();
|
||||
|
||||
model.ReadCapabilitiesId =
|
||||
model.Report.ATA?.ReadCapabilities?.Id ?? model.Report.SCSI?.ReadCapabilities?.Id ?? 0;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,12 @@
|
||||
<a asp-action="Promote" asp-route-id="@Model.Report.Id" class="btn btn-secondary">Promote</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@if (Model.ReadCapabilitiesId != 0)
|
||||
{
|
||||
<div>
|
||||
<a asp-controller="TestedMedias" asp-action="Details" asp-route-id="@Model.ReadCapabilitiesId" target="_blank">Read capabilities</a>
|
||||
</div>
|
||||
}
|
||||
@if (Model.Report.ATA != null)
|
||||
{
|
||||
<div>
|
||||
|
||||
@@ -9,5 +9,6 @@ namespace DiscImageChef.Server.Models
|
||||
public List<int> SameButManufacturer { get; set; }
|
||||
public List<int> ReportAll { get; set; }
|
||||
public List<int> ReportButManufacturer { get; set; }
|
||||
public int ReadCapabilitiesId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user