mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Implement searching reports from device stats.
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
@if (item.Report is null)
|
||||
{
|
||||
@("No")
|
||||
<a asp-action="Find" asp-controller="Reports" asp-route-id="@item.Id" asp-route-manufacturer="@item.Manufacturer" asp-route-model="@item.Model" asp-route-revision="@item.Revision" asp-route-bus="@item.Bus" target="_blank">(Find)</a>
|
||||
<a asp-action="Find" asp-controller="Devices" asp-route-id="@item.Id" asp-route-manufacturer="@item.Manufacturer" asp-route-model="@item.Model" asp-route-revision="@item.Revision" asp-route-bus="@item.Bus" target="_blank">(Find)</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
119
DiscImageChef.Server/Areas/Admin/Views/Devices/Find.cshtml
Normal file
119
DiscImageChef.Server/Areas/Admin/Views/Devices/Find.cshtml
Normal file
@@ -0,0 +1,119 @@
|
||||
@model FindReportModel
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "DiscImageChef";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Find.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : DiscImageChef Server.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 2.1 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2011-2019 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>Found device reports with similar data</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manufacturer)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Model)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Revision)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Bus)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Bus)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
@if (Model.LikeDevices.Count == 0)
|
||||
{
|
||||
<div>No device report with similar information has been found!</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LikeDevices[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LikeDevices[0].Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LikeDevices[0].Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LikeDevices[0].CompactFlash)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LikeDevices[0].Type)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.LikeDevices)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Revision)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CompactFlash)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Type)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="LinkReports" asp-route-statsId="@Model.Id" asp-route-deviceId="@item.Id" class="btn btn-secondary">Link</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
Reference in New Issue
Block a user