mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Show tested sequential media in device report details.
This commit is contained in:
@@ -85,12 +85,17 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
int atapiId = model.Report.ATAPI?.Id ?? 0;
|
||||
int scsiId = model.Report.SCSI?.Id ?? 0;
|
||||
int mmcId = model.Report.SCSI?.MultiMediaDevice?.Id ?? 0;
|
||||
int sscId = model.Report.SCSI?.SequentialDevice?.Id ?? 0;
|
||||
|
||||
model.TestedMedias = _context.TestedMedia.
|
||||
Where(t => t.AtaId == ataId || t.AtaId == atapiId || t.ScsiId == scsiId ||
|
||||
t.MmcId == mmcId).OrderBy(t => t.Manufacturer).
|
||||
ThenBy(t => t.Model).ThenBy(t => t.MediumTypeName).ToList();
|
||||
|
||||
model.TestedSequentialMedias = _context.TestedSequentialMedia.Where(t => t.SscId == sscId).
|
||||
OrderBy(t => t.Manufacturer).ThenBy(t => t.Model).
|
||||
ThenBy(t => t.MediumTypeName).ToList();
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
||||
@@ -425,4 +425,45 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if (Model.TestedSequentialMedias.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Tested media:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedSequentialMedias[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedSequentialMedias[0].Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedSequentialMedias[0].MediumTypeName)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.TestedSequentialMedias)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MediumTypeName)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-controller="TestedSequentialMedias" asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger" target="_blank">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@@ -5,14 +5,15 @@ namespace DiscImageChef.Server.Models
|
||||
{
|
||||
public class DeviceDetails
|
||||
{
|
||||
public Device Report { get; set; }
|
||||
public List<int> SameAll { get; set; }
|
||||
public List<int> SameButManufacturer { get; set; }
|
||||
public List<int> ReportAll { get; set; }
|
||||
public List<int> ReportButManufacturer { get; set; }
|
||||
public List<DeviceStat> StatsAll { get; set; }
|
||||
public List<DeviceStat> StatsButManufacturer { get; set; }
|
||||
public int ReadCapabilitiesId { get; set; }
|
||||
public List<TestedMedia> TestedMedias { get; set; }
|
||||
public Device Report { get; set; }
|
||||
public List<int> SameAll { get; set; }
|
||||
public List<int> SameButManufacturer { get; set; }
|
||||
public List<int> ReportAll { get; set; }
|
||||
public List<int> ReportButManufacturer { get; set; }
|
||||
public List<DeviceStat> StatsAll { get; set; }
|
||||
public List<DeviceStat> StatsButManufacturer { get; set; }
|
||||
public int ReadCapabilitiesId { get; set; }
|
||||
public List<TestedMedia> TestedMedias { get; set; }
|
||||
public List<TestedSequentialMedia> TestedSequentialMedias { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user