Files
Aaru.Server/Aaru.Server.Old/Areas/Admin/Views/Atas/CheckPrivate.cshtml

138 lines
5.0 KiB
Plaintext

@using System.Text
@using Aaru.CommonTypes.Metadata
@model IEnumerable<Aaru.CommonTypes.Metadata.Ata>
@{
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Aaru Server";
}
@{
// /***************************************************************************
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Aaru 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-2024 Natalia Portillo
// ****************************************************************************/
}
ATA IDENTIFY DEVICE responses with possible private data
@if(!Model.Any())
{
<div>
No private data found.
<a asp-action="Index" class="btn btn-primary">Back to list</a>
</div>
return;
}
<div>
<a asp-action="ClearPrivateAll" class="btn btn-primary">Clear private fields for all</a>
<a asp-action="ClearReservedAll" class="btn btn-danger">Clear reserved fields for all</a>
<a asp-action="Index" class="btn btn-secondary">Back to list</a>
</div>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.Model)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.SerialNumber)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.WWN)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.WWNExtension)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.MediaSerial)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.ReservedWords121)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.ReservedWords129)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.ReservedCFA)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.ReservedCEATA224)
</th>
<th>
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.ReservedWords)
</th>
<th>
</th>
</tr>
</thead>
<tbody>
@foreach(Ata item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.IdentifyDevice.Value.Model)
</td>
<td>
@Html.DisplayFor(modelItem => item.IdentifyDevice.Value.SerialNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.IdentifyDevice.Value.WWN)
</td>
<td>
@Html.DisplayFor(modelItem => item.IdentifyDevice.Value.WWNExtension)
</td>
<td>
@Html.DisplayFor(modelItem => item.IdentifyDevice.Value.MediaSerial)
</td>
<td>
@Html.Encode(Encoding.ASCII.GetString(item.Identify, 121 * 2, 10).Replace("\0", ""))
</td>
<td>
@Html.Encode(Encoding.ASCII.GetString(item.Identify, 129 * 2, 62).Replace("\0", ""))
</td>
<td>
@Html.Encode(Encoding.ASCII.GetString(item.Identify, 161 * 2, 14).Replace("\0", ""))
</td>
<td>
@Html.Encode(Encoding.ASCII.GetString(item.Identify, 224 * 2, 12).Replace("\0", ""))
</td>
<td>
@Html.Encode(Encoding.ASCII.GetString(item.Identify, 236 * 2, 38).Replace("\0", ""))
</td>
<td>
<a asp-action="ClearPrivate" asp-route-id="@item.Id" class="btn btn-primary">Clear private fields</a>
<a asp-action="ClearReserved" asp-route-id="@item.Id" class="btn btn-danger">Clear reserved fields</a>
</td>
</tr>
}
</tbody>
</table>