mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add possible missing files (I don't trust git move).
This commit is contained in:
185
Aaru.Server.Old/Aaru.Server.Old.csproj
Normal file
185
Aaru.Server.Old/Aaru.Server.Old.csproj
Normal file
@@ -0,0 +1,185 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<ReleaseVersion>$(Version)</ReleaseVersion>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Version>5.2.99.306</Version>
|
||||
<Company>Claunia.com</Company>
|
||||
<Copyright>Copyright © 2011-2024 Natalia Portillo</Copyright>
|
||||
<Product>Aaru Data Preservation Suite</Product>
|
||||
<Title>Aaru.Server</Title>
|
||||
<ApplicationVersion>$(Version)</ApplicationVersion>
|
||||
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<NrtRevisionFormat>$(Version)-{chash:8} built by {mname} in $(Configuration){!:, modified}</NrtRevisionFormat>
|
||||
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
|
||||
<NrtShowRevision>true</NrtShowRevision>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha8"/>
|
||||
<PackageReference Include="Aaru.Decoders" Version="6.0.0-alpha8"/>
|
||||
<PackageReference Include="Aaru.Dto" Version="6.0.0-alpha8"/>
|
||||
<PackageReference Include="Aaru.Helpers" Version="6.0.0-alpha8"/>
|
||||
<PackageReference Include="ChoPGP" Version="1.0.1.5"/>
|
||||
<PackageReference Include="MailKit" Version="2.15.0"/>
|
||||
<PackageReference Include="Markdig" Version="0.26.0"/>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.0"/>
|
||||
<PackageReference Include="MimeKit" Version="2.15.1"/>
|
||||
<PackageReference Include="prometheus-net.AspNetCore" Version="5.0.2"/>
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.2" PrivateAssets="all"/>
|
||||
<PackageReference Include="AsyncFixer" Version="1.6.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ErrorProne.NET.CoreAnalyzers" Version="0.1.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ErrorProne.NET.Structs" Version="0.1.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Philips.CodeAnalysis.MaintainabilityAnalyzers" Version="1.5.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Roslynator.Analyzers" Version="4.12.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31"/>
|
||||
<PackageReference Include="Text.Analyzers" Version="3.3.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="docs\Changelog.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\CODE_OF_CONDUCT.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\CONTRIBUTING.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\ISSUE_TEMPLATE.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\NEEDED.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\NEEDINFO.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\PULL_REQUEST_TEMPLATE.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="docs\README.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="public.asc">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="aaru-server.service">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\favicon.ico"/>
|
||||
<None Include="wwwroot\fonts\.htaccess"/>
|
||||
<None Include="wwwroot\fonts\ChicagoFLF.eot"/>
|
||||
<None Include="wwwroot\fonts\ChicagoFLF.ttf"/>
|
||||
<None Include="wwwroot\fonts\ChicagoFLF.woff"/>
|
||||
<None Include="wwwroot\fonts\ChicagoFLF.woff2"/>
|
||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.eot"/>
|
||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.ttf"/>
|
||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.woff"/>
|
||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.woff2"/>
|
||||
<None Include="wwwroot\fonts\vga_squarepx.eot"/>
|
||||
<None Include="wwwroot\fonts\vga_squarepx.ttf"/>
|
||||
<None Include="wwwroot\fonts\vga_squarepx.woff"/>
|
||||
<None Include="wwwroot\fonts\vga_squarepx.woff2"/>
|
||||
<None Include="wwwroot\jquery-validation-unobtrusive\jquery.validate.unobtrusive.js"/>
|
||||
<None Include="wwwroot\jquery-validation-unobtrusive\jquery.validate.unobtrusive.min.js"/>
|
||||
<None Include="wwwroot\jquery-validation-unobtrusive\LICENSE.txt"/>
|
||||
<None Include="wwwroot\jquery-validation\dist\additional-methods.js"/>
|
||||
<None Include="wwwroot\jquery-validation\dist\additional-methods.min.js"/>
|
||||
<None Include="wwwroot\jquery-validation\dist\jquery.validate.js"/>
|
||||
<None Include="wwwroot\jquery-validation\dist\jquery.validate.min.js"/>
|
||||
<None Include="wwwroot\jquery-validation\LICENSE.md"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ContentIncludedByDefault Remove="wwwroot\js\site.js"/>
|
||||
<_ContentIncludedByDefault Remove="wwwroot\css\js\colors\dos.js"/>
|
||||
<_ContentIncludedByDefault Remove="wwwroot\css\js\colors\mac.js"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\Error.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_Layout.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_LoginPartial.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Create.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Delete.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Details.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Edit.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Index.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Atas\EditorTemplates\IdHashModel.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\Changelog.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\CODE_OF_CONDUCT.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\CONTRIBUTING.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\ISSUE_TEMPLATE.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\NEEDED.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\NEEDINFO.cshtml"/>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\PULL_REQUEST_TEMPLATE.cshtml"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\Error.cshtml"/>
|
||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml"/>
|
||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_Layout.cshtml"/>
|
||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_LoginPartial.cshtml"/>
|
||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="Areas\Admin\Views\GdRomSwapDiscCapabilities\Delete.cshtml">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="Areas\Admin\Views\GdRomSwapDiscCapabilities\Details.cshtml">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="Areas\Admin\Views\GdRomSwapDiscCapabilities\ViewData.cshtml">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Aaru.Server.Database\Aaru.Server.Database.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
501
Aaru.Server.Old/Areas/Admin/Controllers/AtasController.cs
Normal file
501
Aaru.Server.Old/Areas/Admin/Controllers/AtasController.cs
Normal file
@@ -0,0 +1,501 @@
|
||||
using System.Reflection;
|
||||
using Aaru.CommonTypes.Structs.Devices.ATA;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Aaru.Server.Old.Core;
|
||||
using Newtonsoft.Json;
|
||||
using Ata = Aaru.CommonTypes.Metadata.Ata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class AtasController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public AtasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Atas
|
||||
public IActionResult Index() => View(_context.Ata.AsEnumerable()
|
||||
.OrderBy(m => m.IdentifyDevice?.Model)
|
||||
.ThenBy(m => m.IdentifyDevice?.FirmwareRevision));
|
||||
|
||||
// GET: Admin/Atas/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ata == null) return NotFound();
|
||||
|
||||
return View(ata);
|
||||
}
|
||||
|
||||
// GET: Admin/Atas/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ata == null) return NotFound();
|
||||
|
||||
return View(ata);
|
||||
}
|
||||
|
||||
// POST: Admin/Atas/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Ata ata = await _context.Ata.FindAsync(id);
|
||||
_context.Ata.Remove(ata);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Consolidate()
|
||||
{
|
||||
var hashes = _context.Ata.Select(m => new IdHashModel(m.Id, Hash.Sha512(m.Identify))).ToList();
|
||||
|
||||
var dups = hashes.GroupBy(x => x.Hash)
|
||||
.Where(g => g.Count() > 1)
|
||||
.Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key))
|
||||
.ToList();
|
||||
|
||||
for(var i = 0; i < dups.Count; i++)
|
||||
{
|
||||
Ata unique = _context.Ata.First(a => a.Id == dups[i].Id);
|
||||
|
||||
dups[i].Description = unique.IdentifyDevice?.Model;
|
||||
dups[i].Duplicates = hashes.Where(h => h.Hash == dups[i].Hash).Skip(1).Select(x => x.Id).ToArray();
|
||||
}
|
||||
|
||||
return View(new IdHashModelForView
|
||||
{
|
||||
List = dups,
|
||||
Json = JsonConvert.SerializeObject(dups)
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Consolidate")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult ConsolidateConfirmed(string models)
|
||||
{
|
||||
IdHashModel[] duplicates;
|
||||
|
||||
try
|
||||
{
|
||||
duplicates = JsonConvert.DeserializeObject<IdHashModel[]>(models);
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if(duplicates is null) return BadRequest();
|
||||
|
||||
foreach(IdHashModel duplicate in duplicates)
|
||||
{
|
||||
Ata master = _context.Ata.FirstOrDefault(m => m.Id == duplicate.Id);
|
||||
|
||||
if(master is null) continue;
|
||||
|
||||
foreach(int duplicateId in duplicate.Duplicates)
|
||||
{
|
||||
Ata slave = _context.Ata.FirstOrDefault(m => m.Id == duplicateId);
|
||||
|
||||
if(slave is null) continue;
|
||||
|
||||
foreach(Device ataDevice in _context.Devices.Where(d => d.ATA.Id == duplicateId))
|
||||
ataDevice.ATA = master;
|
||||
|
||||
foreach(Device atapiDevice in _context.Devices.Where(d => d.ATAPI.Id == duplicateId))
|
||||
atapiDevice.ATAPI = master;
|
||||
|
||||
foreach(UploadedReport ataReport in _context.Reports.Where(d => d.ATA.Id == duplicateId))
|
||||
ataReport.ATA = master;
|
||||
|
||||
foreach(UploadedReport atapiReport in _context.Reports.Where(d => d.ATAPI.Id == duplicateId))
|
||||
atapiReport.ATAPI = master;
|
||||
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == duplicateId))
|
||||
{
|
||||
testedMedia.AtaId = duplicate.Id;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
|
||||
if(master.ReadCapabilities is null && slave.ReadCapabilities != null)
|
||||
master.ReadCapabilities = slave.ReadCapabilities;
|
||||
|
||||
_context.Ata.Remove(slave);
|
||||
}
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult ConsolidateWithIds(int masterId, int slaveId)
|
||||
{
|
||||
Ata master = _context.Ata.FirstOrDefault(m => m.Id == masterId);
|
||||
|
||||
if(master is null)
|
||||
{
|
||||
return RedirectToAction(nameof(Compare),
|
||||
new
|
||||
{
|
||||
id = masterId,
|
||||
rightId = slaveId
|
||||
});
|
||||
}
|
||||
|
||||
Ata slave = _context.Ata.FirstOrDefault(m => m.Id == slaveId);
|
||||
|
||||
if(slave is null)
|
||||
{
|
||||
return RedirectToAction(nameof(Compare),
|
||||
new
|
||||
{
|
||||
id = masterId,
|
||||
rightId = slaveId
|
||||
});
|
||||
}
|
||||
|
||||
foreach(Device ataDevice in _context.Devices.Where(d => d.ATA.Id == slaveId)) ataDevice.ATA = master;
|
||||
|
||||
foreach(Device atapiDevice in _context.Devices.Where(d => d.ATAPI.Id == slaveId)) atapiDevice.ATAPI = master;
|
||||
|
||||
foreach(UploadedReport ataReport in _context.Reports.Where(d => d.ATA.Id == slaveId)) ataReport.ATA = master;
|
||||
|
||||
foreach(UploadedReport atapiReport in _context.Reports.Where(d => d.ATAPI.Id == slaveId))
|
||||
atapiReport.ATAPI = master;
|
||||
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveId))
|
||||
{
|
||||
testedMedia.AtaId = masterId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
|
||||
if(master.ReadCapabilities is null && slave.ReadCapabilities != null)
|
||||
master.ReadCapabilities = slave.ReadCapabilities;
|
||||
|
||||
_context.Ata.Remove(slave);
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Compare(int id, int rightId)
|
||||
{
|
||||
var model = new CompareModel
|
||||
{
|
||||
LeftId = id,
|
||||
RightId = rightId
|
||||
};
|
||||
|
||||
Ata left = _context.Ata.FirstOrDefault(l => l.Id == id);
|
||||
Ata right = _context.Ata.FirstOrDefault(r => r.Id == rightId);
|
||||
|
||||
if(left is null)
|
||||
{
|
||||
model.ErrorMessage = $"ATA with id {id} has not been found";
|
||||
model.HasError = true;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
if(right is null)
|
||||
{
|
||||
model.ErrorMessage = $"ATA with id {rightId} has not been found";
|
||||
model.HasError = true;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Identify.IdentifyDevice? leftNullable = left.IdentifyDevice;
|
||||
Identify.IdentifyDevice? rightNullable = right.IdentifyDevice;
|
||||
model.ValueNames = new List<string>();
|
||||
model.LeftValues = new List<string>();
|
||||
model.RightValues = new List<string>();
|
||||
|
||||
if(!leftNullable.HasValue && !rightNullable.HasValue)
|
||||
{
|
||||
model.AreEqual = true;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
if(leftNullable.HasValue && !rightNullable.HasValue)
|
||||
{
|
||||
model.ValueNames.Add("Decoded");
|
||||
model.LeftValues.Add("decoded");
|
||||
model.RightValues.Add("null");
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
if(!leftNullable.HasValue)
|
||||
{
|
||||
model.ValueNames.Add("Decoded");
|
||||
model.LeftValues.Add("null");
|
||||
model.RightValues.Add("decoded");
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Identify.IdentifyDevice leftValue = left.IdentifyDevice.Value;
|
||||
Identify.IdentifyDevice rightValue = right.IdentifyDevice.Value;
|
||||
|
||||
foreach(FieldInfo fieldInfo in leftValue.GetType().GetFields())
|
||||
{
|
||||
object lv = fieldInfo.GetValue(leftValue);
|
||||
object rv = fieldInfo.GetValue(rightValue);
|
||||
|
||||
if(fieldInfo.FieldType.IsArray)
|
||||
{
|
||||
var la = lv as Array;
|
||||
var ra = rv as Array;
|
||||
|
||||
switch(la)
|
||||
{
|
||||
case null when ra is null:
|
||||
continue;
|
||||
case null:
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("null");
|
||||
model.RightValues.Add("[]");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(ra is null)
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("[]");
|
||||
model.RightValues.Add("null");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
var ll = la.Cast<object>().ToList();
|
||||
var rl = ra.Cast<object>().ToList();
|
||||
|
||||
for(var i = 0; i < ll.Count; i++)
|
||||
{
|
||||
if(ll[i].Equals(rl[i])) continue;
|
||||
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("[]");
|
||||
model.RightValues.Add("[]");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(lv == null && rv == null) {}
|
||||
else if(lv != null && rv == null)
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add($"{lv}");
|
||||
model.RightValues.Add("null");
|
||||
}
|
||||
else if(lv == null)
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("null");
|
||||
model.RightValues.Add($"{rv}");
|
||||
}
|
||||
else if(!lv.Equals(rv))
|
||||
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add($"{lv}");
|
||||
model.RightValues.Add($"{rv}");
|
||||
}
|
||||
}
|
||||
|
||||
model.AreEqual = model.LeftValues.Count == 0 && model.RightValues.Count == 0;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public IActionResult CheckPrivate()
|
||||
{
|
||||
List<Ata> havePrivacy = new();
|
||||
byte[] tmp;
|
||||
|
||||
foreach(Ata ata in _context.Ata)
|
||||
{
|
||||
Identify.IdentifyDevice? id = ata.IdentifyDevice;
|
||||
|
||||
if(id is null) continue;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(id.Value.SerialNumber) ||
|
||||
id.Value.WWN != 0 ||
|
||||
id.Value.WWNExtension != 0 ||
|
||||
!string.IsNullOrWhiteSpace(id.Value.MediaSerial))
|
||||
{
|
||||
havePrivacy.Add(ata);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
tmp = new byte[10];
|
||||
Array.Copy(ata.Identify, 121 * 2, tmp, 0, 10);
|
||||
|
||||
if(tmp.All(b => b > 0x20) && tmp.All(b => b <= 0x5F))
|
||||
{
|
||||
havePrivacy.Add(ata);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
tmp = new byte[62];
|
||||
Array.Copy(ata.Identify, 129 * 2, tmp, 0, 62);
|
||||
|
||||
if(tmp.All(b => b > 0x20) && tmp.All(b => b <= 0x5F))
|
||||
{
|
||||
havePrivacy.Add(ata);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
tmp = new byte[14];
|
||||
Array.Copy(ata.Identify, 161 * 2, tmp, 0, 14);
|
||||
|
||||
if(tmp.All(b => b > 0x20) && tmp.All(b => b <= 0x5F))
|
||||
{
|
||||
havePrivacy.Add(ata);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
tmp = new byte[12];
|
||||
Array.Copy(ata.Identify, 224 * 2, tmp, 0, 12);
|
||||
|
||||
if(tmp.All(b => b > 0x20) && tmp.All(b => b <= 0x5F))
|
||||
{
|
||||
havePrivacy.Add(ata);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
tmp = new byte[38];
|
||||
Array.Copy(ata.Identify, 236 * 2, tmp, 0, 38);
|
||||
|
||||
if(tmp.All(b => b > 0x20) && tmp.All(b => b <= 0x5F)) havePrivacy.Add(ata);
|
||||
}
|
||||
|
||||
return View(havePrivacy);
|
||||
}
|
||||
|
||||
public IActionResult ClearPrivate(int id)
|
||||
{
|
||||
Ata ata = _context.Ata.FirstOrDefault(a => a.Id == id);
|
||||
|
||||
if(ata is null) return RedirectToAction(nameof(CheckPrivate));
|
||||
|
||||
// Serial number
|
||||
for(var i = 0; i < 20; i++) ata.Identify[10 * 2 + i] = 0x20;
|
||||
|
||||
// Media serial number
|
||||
for(var i = 0; i < 40; i++) ata.Identify[176 * 2 + i] = 0x20;
|
||||
|
||||
// WWN and WWN Extension
|
||||
for(var i = 0; i < 16; i++) ata.Identify[108 * 2 + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(CheckPrivate));
|
||||
}
|
||||
|
||||
public IActionResult ClearReserved(int id)
|
||||
{
|
||||
Ata ata = _context.Ata.FirstOrDefault(a => a.Id == id);
|
||||
|
||||
if(ata is null) return RedirectToAction(nameof(CheckPrivate));
|
||||
|
||||
// ReservedWords121
|
||||
for(var i = 0; i < 10; i++) ata.Identify[121 * 2 + i] = 0;
|
||||
|
||||
// ReservedWords129
|
||||
for(var i = 0; i < 40; i++) ata.Identify[129 * 2 + i] = 0;
|
||||
|
||||
// ReservedCFA
|
||||
for(var i = 0; i < 14; i++) ata.Identify[161 * 2 + i] = 0;
|
||||
|
||||
// ReservedCEATA224
|
||||
for(var i = 0; i < 12; i++) ata.Identify[224 * 2 + i] = 0;
|
||||
|
||||
// ReservedWords
|
||||
for(var i = 0; i < 14; i++) ata.Identify[161 * 2 + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(CheckPrivate));
|
||||
}
|
||||
|
||||
public IActionResult ClearPrivateAll()
|
||||
{
|
||||
foreach(Ata ata in _context.Ata)
|
||||
{
|
||||
if(ata is null) return RedirectToAction(nameof(CheckPrivate));
|
||||
|
||||
// Serial number
|
||||
for(var i = 0; i < 20; i++) ata.Identify[10 * 2 + i] = 0x20;
|
||||
|
||||
// Media serial number
|
||||
for(var i = 0; i < 40; i++) ata.Identify[176 * 2 + i] = 0x20;
|
||||
|
||||
// WWN and WWN Extension
|
||||
for(var i = 0; i < 16; i++) ata.Identify[108 * 2 + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(CheckPrivate));
|
||||
}
|
||||
|
||||
public IActionResult ClearReservedAll()
|
||||
{
|
||||
foreach(Ata ata in _context.Ata)
|
||||
{
|
||||
// ReservedWords121
|
||||
for(var i = 0; i < 10; i++) ata.Identify[121 * 2 + i] = 0;
|
||||
|
||||
// ReservedWords129
|
||||
for(var i = 0; i < 40; i++) ata.Identify[129 * 2 + i] = 0;
|
||||
|
||||
// ReservedCFA
|
||||
for(var i = 0; i < 14; i++) ata.Identify[161 * 2 + i] = 0;
|
||||
|
||||
// ReservedCEATA224
|
||||
for(var i = 0; i < 12; i++) ata.Identify[224 * 2 + i] = 0;
|
||||
|
||||
// ReservedWords
|
||||
for(var i = 0; i < 14; i++) ata.Identify[161 * 2 + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(CheckPrivate));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class BlockDescriptorsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public BlockDescriptorsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/BlockDescriptors
|
||||
public async Task<IActionResult> Index() => View(await _context.BlockDescriptor.OrderBy(b => b.BlockLength)
|
||||
.ThenBy(b => b.Blocks)
|
||||
.ThenBy(b => b.Density)
|
||||
.ToListAsync());
|
||||
}
|
||||
91
Aaru.Server.Old/Areas/Admin/Controllers/ChsController.cs
Normal file
91
Aaru.Server.Old/Areas/Admin/Controllers/ChsController.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class ChsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public ChsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Chs
|
||||
public async Task<IActionResult> Index() => View(await _context.Chs.OrderBy(c => c.Cylinders)
|
||||
.ThenBy(c => c.Heads)
|
||||
.ThenBy(c => c.Sectors)
|
||||
.ToListAsync());
|
||||
|
||||
public IActionResult Consolidate()
|
||||
{
|
||||
var dups = _context.Chs.GroupBy(x => new
|
||||
{
|
||||
x.Cylinders,
|
||||
x.Heads,
|
||||
x.Sectors
|
||||
})
|
||||
.Where(x => x.Count() > 1)
|
||||
.Select(x => new ChsModel
|
||||
{
|
||||
Cylinders = x.Key.Cylinders,
|
||||
Heads = x.Key.Heads,
|
||||
Sectors = x.Key.Sectors
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return View(new ChsModelForView
|
||||
{
|
||||
List = dups,
|
||||
Json = JsonConvert.SerializeObject(dups)
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Consolidate")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult ConsolidateConfirmed(string models)
|
||||
{
|
||||
ChsModel[] duplicates;
|
||||
|
||||
try
|
||||
{
|
||||
duplicates = JsonConvert.DeserializeObject<ChsModel[]>(models);
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if(duplicates is null) return BadRequest();
|
||||
|
||||
foreach(ChsModel duplicate in duplicates)
|
||||
{
|
||||
Chs master = _context.Chs.FirstOrDefault(m => m.Cylinders == duplicate.Cylinders &&
|
||||
m.Heads == duplicate.Heads &&
|
||||
m.Sectors == duplicate.Sectors);
|
||||
|
||||
if(master is null) continue;
|
||||
|
||||
foreach(Chs chs in _context.Chs.Where(m => m.Cylinders == duplicate.Cylinders &&
|
||||
m.Heads == duplicate.Heads &&
|
||||
m.Sectors == duplicate.Sectors)
|
||||
.Skip(1)
|
||||
.ToArray())
|
||||
{
|
||||
foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CHS.Id == chs.Id)) media.CHS = master;
|
||||
|
||||
foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CurrentCHS.Id == chs.Id))
|
||||
media.CurrentCHS = master;
|
||||
|
||||
_context.Chs.Remove(chs);
|
||||
}
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class CommandsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public CommandsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Commands
|
||||
public async Task<IActionResult> Index() => View(await _context.Commands.OrderBy(c => c.Name).ToListAsync());
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class CompactDiscOffsetsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public CompactDiscOffsetsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/CompactDiscOffsets
|
||||
public async Task<IActionResult> Index() => View(await _context.CdOffsets.OrderBy(o => o.Manufacturer)
|
||||
.ThenBy(o => o.Model)
|
||||
.ThenBy(o => o.Offset)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/CompactDiscOffsets/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id);
|
||||
|
||||
if(compactDiscOffset == null) return NotFound();
|
||||
|
||||
return View(compactDiscOffset);
|
||||
}
|
||||
|
||||
// POST: Admin/CompactDiscOffsets/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,Manufacturer,Model,Offset,Submissions,Agreement")] CompactDiscOffset changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
CompactDiscOffset model = await _context.CdOffsets.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.Model = changedModel.Model;
|
||||
model.Offset = changedModel.Offset;
|
||||
model.Submissions = changedModel.Submissions;
|
||||
model.Agreement = changedModel.Agreement;
|
||||
model.ModifiedWhen = DateTime.UtcNow;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/CompactDiscOffsets/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(compactDiscOffset == null) return NotFound();
|
||||
|
||||
return View(compactDiscOffset);
|
||||
}
|
||||
|
||||
// POST: Admin/CompactDiscOffsets/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id);
|
||||
_context.CdOffsets.Remove(compactDiscOffset);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Update() => throw new NotImplementedException();
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class DeviceStatsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public DeviceStatsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/DeviceStats
|
||||
public async Task<IActionResult> Index() => View(await _context.DeviceStats.OrderBy(d => d.Manufacturer)
|
||||
.ThenBy(d => d.Model)
|
||||
.ThenBy(d => d.Bus)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/DeviceStats/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id);
|
||||
|
||||
if(deviceStat == null) return NotFound();
|
||||
|
||||
return View(deviceStat);
|
||||
}
|
||||
|
||||
// POST: Admin/DeviceStats/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,Manufacturer,Model,Revision,Bus")] DeviceStat changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
DeviceStat model = await _context.DeviceStats.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.Model = changedModel.Model;
|
||||
model.Revision = changedModel.Revision;
|
||||
model.Bus = changedModel.Bus;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/DeviceStats/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
DeviceStat deviceStat = await _context.DeviceStats.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(deviceStat == null) return NotFound();
|
||||
|
||||
return View(deviceStat);
|
||||
}
|
||||
|
||||
// POST: Admin/DeviceStats/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id);
|
||||
_context.DeviceStats.Remove(deviceStat);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
389
Aaru.Server.Old/Areas/Admin/Controllers/DevicesController.cs
Normal file
389
Aaru.Server.Old/Areas/Admin/Controllers/DevicesController.cs
Normal file
@@ -0,0 +1,389 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class DevicesController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public DevicesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Devices
|
||||
public async Task<IActionResult> Index() => View(await _context.Devices.OrderBy(d => d.Manufacturer)
|
||||
.ThenBy(d => d.Model)
|
||||
.ThenBy(d => d.Revision)
|
||||
.ThenBy(d => d.CompactFlash)
|
||||
.ThenBy(d => d.Type)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/Devices/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
var model = new DeviceDetails
|
||||
{
|
||||
Report = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id)
|
||||
};
|
||||
|
||||
if(model.Report is null) return NotFound();
|
||||
|
||||
model.ReportAll = _context.Reports
|
||||
.Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||
d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision)
|
||||
.Select(d => d.Id)
|
||||
.ToList();
|
||||
|
||||
model.ReportButManufacturer = _context.Reports
|
||||
.Where(d => d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision)
|
||||
.Select(d => d.Id)
|
||||
.Where(d => model.ReportAll.All(r => r != d))
|
||||
.ToList();
|
||||
|
||||
model.SameAll = _context.Devices
|
||||
.Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||
d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision &&
|
||||
d.Id != id)
|
||||
.Select(d => d.Id)
|
||||
.ToList();
|
||||
|
||||
model.SameButManufacturer = _context.Devices
|
||||
.Where(d => d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision &&
|
||||
d.Id != id)
|
||||
.Select(d => d.Id)
|
||||
.Where(d => model.SameAll.All(r => r != d))
|
||||
.ToList();
|
||||
|
||||
model.StatsAll = _context.DeviceStats
|
||||
.Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||
d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision &&
|
||||
d.Report.Id != model.Report.Id)
|
||||
.ToList();
|
||||
|
||||
model.StatsButManufacturer = _context.DeviceStats
|
||||
.Where(d => d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision &&
|
||||
d.Report.Id != model.Report.Id)
|
||||
.AsEnumerable()
|
||||
.Where(d => model.StatsAll.All(s => s.Id != d.Id))
|
||||
.ToList();
|
||||
|
||||
model.ReadCapabilitiesId =
|
||||
model.Report.ATA?.ReadCapabilities?.Id ?? model.Report.SCSI?.ReadCapabilities?.Id ?? 0;
|
||||
|
||||
// So we can check, as we know IDs with 0 will never exist, and EFCore does not allow null propagation in the LINQ
|
||||
int ataId = model.Report.ATA?.Id ?? 0;
|
||||
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);
|
||||
}
|
||||
|
||||
// GET: Admin/Devices/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Device device = await _context.Devices.FindAsync(id);
|
||||
|
||||
if(device == null) return NotFound();
|
||||
|
||||
return View(device);
|
||||
}
|
||||
|
||||
// POST: Admin/Devices/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id,
|
||||
[Bind("OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")] Device changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
Device model = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.CanReadGdRomUsingSwapDisc = changedModel.CanReadGdRomUsingSwapDisc;
|
||||
model.OptimalMultipleSectorsRead = changedModel.OptimalMultipleSectorsRead;
|
||||
model.CompactFlash = changedModel.CompactFlash;
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.Model = changedModel.Model;
|
||||
model.Revision = changedModel.Revision;
|
||||
model.Type = changedModel.Type;
|
||||
model.ModifiedWhen = DateTime.UtcNow;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/Devices/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Device device = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(device == null) return NotFound();
|
||||
|
||||
return View(device);
|
||||
}
|
||||
|
||||
// POST: Admin/Devices/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Device device = await _context.Devices.FindAsync(id);
|
||||
_context.Devices.Remove(device);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool DeviceExists(int id) => _context.Devices.Any(e => e.Id == id);
|
||||
|
||||
public IActionResult Merge(int? master, int? slave)
|
||||
{
|
||||
if(master is null || slave is null) return NotFound();
|
||||
|
||||
Device masterDevice = _context.Devices.FirstOrDefault(m => m.Id == master);
|
||||
Device slaveDevice = _context.Devices.FirstOrDefault(m => m.Id == slave);
|
||||
|
||||
if(masterDevice is null || slaveDevice is null) return NotFound();
|
||||
|
||||
if(masterDevice.ATAId != null && masterDevice.ATAId != slaveDevice.ATAId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveDevice.ATAId))
|
||||
{
|
||||
testedMedia.AtaId = masterDevice.ATAId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterDevice.ATAId == null && slaveDevice.ATAId != null)
|
||||
{
|
||||
masterDevice.ATAId = slaveDevice.ATAId;
|
||||
_context.Update(masterDevice);
|
||||
}
|
||||
|
||||
if(masterDevice.ATAPIId != null && masterDevice.ATAPIId != slaveDevice.ATAPIId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveDevice.ATAPIId))
|
||||
{
|
||||
testedMedia.AtaId = masterDevice.ATAPIId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterDevice.ATAPIId == null && slaveDevice.ATAPIId != null)
|
||||
{
|
||||
masterDevice.ATAPIId = slaveDevice.ATAPIId;
|
||||
_context.Update(masterDevice);
|
||||
}
|
||||
|
||||
if(masterDevice.SCSIId != null && masterDevice.SCSIId != slaveDevice.SCSIId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == slaveDevice.SCSIId))
|
||||
{
|
||||
testedMedia.ScsiId = masterDevice.SCSIId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterDevice.SCSIId == null && slaveDevice.SCSIId != null)
|
||||
{
|
||||
masterDevice.SCSIId = slaveDevice.SCSIId;
|
||||
_context.Update(masterDevice);
|
||||
}
|
||||
|
||||
masterDevice.ModifiedWhen = DateTime.UtcNow;
|
||||
_context.Update(masterDevice);
|
||||
_context.Remove(slaveDevice);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Details),
|
||||
new
|
||||
{
|
||||
Id = master
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult MergeReports(int? deviceId, int? reportId)
|
||||
{
|
||||
if(deviceId is null || reportId is null) return NotFound();
|
||||
|
||||
Device device = _context.Devices.FirstOrDefault(m => m.Id == deviceId);
|
||||
UploadedReport report = _context.Reports.FirstOrDefault(m => m.Id == reportId);
|
||||
|
||||
if(device is null || report is null) return NotFound();
|
||||
|
||||
if(device.ATAId != null && device.ATAId != report.ATAId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == report.ATAId))
|
||||
{
|
||||
testedMedia.AtaId = device.ATAId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
|
||||
if(device.ATA != null && device.ATA.ReadCapabilities is null && report.ATA?.ReadCapabilities != null)
|
||||
{
|
||||
device.ATA.ReadCapabilities = report.ATA.ReadCapabilities;
|
||||
_context.Update(device.ATA);
|
||||
}
|
||||
}
|
||||
else if(device.ATAId == null && report.ATAId != null)
|
||||
{
|
||||
device.ATAId = report.ATAId;
|
||||
_context.Update(device);
|
||||
}
|
||||
|
||||
if(device.ATAPIId != null && device.ATAPIId != report.ATAPIId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == report.ATAPIId))
|
||||
{
|
||||
testedMedia.AtaId = device.ATAPIId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(device.ATAPIId == null && report.ATAPIId != null)
|
||||
{
|
||||
device.ATAPIId = report.ATAPIId;
|
||||
_context.Update(device);
|
||||
}
|
||||
|
||||
if(device.SCSIId != null && device.SCSIId != report.SCSIId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == report.SCSIId))
|
||||
{
|
||||
testedMedia.ScsiId = device.SCSIId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
|
||||
if(device.SCSI != null && device.SCSI.ReadCapabilities is null && report.SCSI?.ReadCapabilities != null)
|
||||
{
|
||||
device.SCSI.ReadCapabilities = report.SCSI.ReadCapabilities;
|
||||
_context.Update(device.SCSI);
|
||||
}
|
||||
|
||||
if(device.SCSI != null && device.SCSI.MultiMediaDevice is null && report.SCSI?.MultiMediaDevice != null)
|
||||
{
|
||||
device.SCSI.MultiMediaDevice = report.SCSI.MultiMediaDevice;
|
||||
_context.Update(device.SCSI);
|
||||
}
|
||||
else if(device.SCSI?.MultiMediaDevice != null && report.SCSI?.MultiMediaDevice != null)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.MmcId ==
|
||||
report.SCSI.MultiMediaDevice.Id))
|
||||
{
|
||||
testedMedia.MmcId = device.SCSI.MultiMediaDevice.Id;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
|
||||
if(device.SCSI != null && device.SCSI.SequentialDevice is null && report.SCSI?.SequentialDevice != null)
|
||||
{
|
||||
device.SCSI.SequentialDevice = report.SCSI.SequentialDevice;
|
||||
_context.Update(device.SCSI);
|
||||
}
|
||||
else if(device.SCSI?.SequentialDevice != null && report.SCSI?.SequentialDevice != null)
|
||||
{
|
||||
foreach(TestedSequentialMedia testedSequentialMedia in
|
||||
_context.TestedSequentialMedia.Where(d => d.SscId == report.SCSI.SequentialDevice.Id))
|
||||
{
|
||||
testedSequentialMedia.SscId = device.SCSI.SequentialDevice.Id;
|
||||
_context.Update(testedSequentialMedia);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(device.SCSIId == null && report.SCSIId != null)
|
||||
{
|
||||
device.SCSIId = report.SCSIId;
|
||||
_context.Update(device);
|
||||
}
|
||||
|
||||
_context.Remove(report);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Details),
|
||||
new
|
||||
{
|
||||
Id = deviceId
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult LinkReports(int? statsId, int? deviceId)
|
||||
{
|
||||
if(statsId is null || deviceId is null) return NotFound();
|
||||
|
||||
Device device = _context.Devices.FirstOrDefault(m => m.Id == deviceId);
|
||||
DeviceStat stat = _context.DeviceStats.FirstOrDefault(m => m.Id == statsId);
|
||||
|
||||
if(device is null || stat is null) return NotFound();
|
||||
|
||||
stat.Report = device;
|
||||
_context.Update(stat);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Details),
|
||||
new
|
||||
{
|
||||
Id = deviceId
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult Find(int id, string manufacturer, string model, string revision, string bus)
|
||||
{
|
||||
if(model is null) return NotFound();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class FilesystemsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public FilesystemsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Filesystems
|
||||
public async Task<IActionResult> Index() => View(await _context.Filesystems.OrderBy(f => f.Name).ToListAsync());
|
||||
}
|
||||
15
Aaru.Server.Old/Areas/Admin/Controllers/FiltersController.cs
Normal file
15
Aaru.Server.Old/Areas/Admin/Controllers/FiltersController.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class FiltersController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public FiltersController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Filters
|
||||
public async Task<IActionResult> Index() => View(await _context.Filters.OrderBy(f => f.Name).ToListAsync());
|
||||
}
|
||||
172
Aaru.Server.Old/Areas/Admin/Controllers/FireWiresController.cs
Normal file
172
Aaru.Server.Old/Areas/Admin/Controllers/FireWiresController.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class FireWiresController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public FireWiresController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/FireWires
|
||||
public async Task<IActionResult> Index() =>
|
||||
View(await _context.FireWire.OrderBy(f => f.Manufacturer).ThenBy(f => f.Product).ToListAsync());
|
||||
|
||||
// GET: Admin/FireWires/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
||||
|
||||
if(fireWire == null) return NotFound();
|
||||
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// POST: Admin/FireWires/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] FireWire changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
FireWire model = await _context.FireWire.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.VendorID = changedModel.VendorID;
|
||||
model.ProductID = changedModel.ProductID;
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.Product = changedModel.Product;
|
||||
model.RemovableMedia = changedModel.RemovableMedia;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/FireWires/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
FireWire fireWire = await _context.FireWire.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(fireWire == null) return NotFound();
|
||||
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// POST: Admin/FireWires/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
||||
_context.FireWire.Remove(fireWire);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool FireWireExists(int id) => _context.FireWire.Any(e => e.Id == id);
|
||||
|
||||
public IActionResult Consolidate()
|
||||
{
|
||||
var dups = _context.FireWire.GroupBy(x => new
|
||||
{
|
||||
x.VendorID,
|
||||
x.ProductID,
|
||||
x.Manufacturer,
|
||||
x.Product,
|
||||
x.RemovableMedia
|
||||
})
|
||||
.Where(x => x.Count() > 1)
|
||||
.Select(x => new FireWireModel
|
||||
{
|
||||
VendorID = x.Key.VendorID,
|
||||
ProductID = x.Key.ProductID,
|
||||
Manufacturer = x.Key.Manufacturer,
|
||||
Product = x.Key.Product,
|
||||
RemovableMedia = x.Key.RemovableMedia
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return View(new FireWireModelForView
|
||||
{
|
||||
List = dups,
|
||||
Json = JsonConvert.SerializeObject(dups)
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Consolidate")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult ConsolidateConfirmed(string models)
|
||||
{
|
||||
FireWireModel[] duplicates;
|
||||
|
||||
try
|
||||
{
|
||||
duplicates = JsonConvert.DeserializeObject<FireWireModel[]>(models);
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if(duplicates is null) return BadRequest();
|
||||
|
||||
foreach(FireWireModel duplicate in duplicates)
|
||||
{
|
||||
FireWire master = _context.FireWire.FirstOrDefault(m => m.VendorID == duplicate.VendorID &&
|
||||
m.ProductID == duplicate.ProductID &&
|
||||
m.Manufacturer == duplicate.Manufacturer &&
|
||||
m.Product == duplicate.Product &&
|
||||
m.RemovableMedia == duplicate.RemovableMedia);
|
||||
|
||||
if(master is null) continue;
|
||||
|
||||
foreach(FireWire firewire in _context.FireWire.Where(m => m.VendorID == duplicate.VendorID &&
|
||||
m.ProductID == duplicate.ProductID &&
|
||||
m.Manufacturer == duplicate.Manufacturer &&
|
||||
m.Product == duplicate.Product &&
|
||||
m.RemovableMedia == duplicate.RemovableMedia)
|
||||
.Skip(1)
|
||||
.ToArray())
|
||||
{
|
||||
foreach(Device device in _context.Devices.Where(d => d.FireWire.Id == firewire.Id))
|
||||
device.FireWire = master;
|
||||
|
||||
foreach(UploadedReport report in _context.Reports.Where(d => d.FireWire.Id == firewire.Id))
|
||||
report.FireWire = master;
|
||||
|
||||
_context.FireWire.Remove(firewire);
|
||||
}
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,361 @@
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Decoders.CD;
|
||||
using Aaru.Helpers;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public GdRomSwapDiscCapabilitiesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/GdRomSwapDiscCapabilities/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(caps == null) return NotFound();
|
||||
|
||||
return View(caps);
|
||||
}
|
||||
|
||||
// GET: Admin/GdRomSwapDiscCapabilities/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(caps == null) return NotFound();
|
||||
|
||||
return View(caps);
|
||||
}
|
||||
|
||||
// POST: Admin/GdRomSwapDiscCapabilities/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FindAsync(id);
|
||||
_context.GdRomSwapDiscCapabilities.Remove(caps);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction("Index", "Admin");
|
||||
}
|
||||
|
||||
public IActionResult ViewData(int id, string data)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(data)) return NotFound();
|
||||
|
||||
GdRomSwapDiscCapabilities caps = _context.GdRomSwapDiscCapabilities.FirstOrDefault(m => m.Id == id);
|
||||
|
||||
if(caps == null) return NotFound();
|
||||
|
||||
var model = new TestedMediaDataModel
|
||||
{
|
||||
TestedMediaId = id,
|
||||
DataName = data
|
||||
};
|
||||
|
||||
byte[] buffer;
|
||||
var sb = new StringBuilder();
|
||||
var sector = new byte[2352];
|
||||
var subq = new byte[16];
|
||||
var fullsub = new byte[96];
|
||||
|
||||
var audio = true;
|
||||
var pq = false;
|
||||
var rw = false;
|
||||
|
||||
switch(data)
|
||||
{
|
||||
case nameof(caps.Lba0Data):
|
||||
buffer = caps.Lba0Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba0ScrambledData):
|
||||
buffer = caps.Lba0ScrambledData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba44990Data):
|
||||
buffer = caps.Lba44990Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba44990PqData):
|
||||
buffer = caps.Lba44990PqData;
|
||||
audio = false;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba44990RwData):
|
||||
buffer = caps.Lba44990RwData;
|
||||
audio = false;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba44990AudioData):
|
||||
buffer = caps.Lba44990AudioData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba44990AudioPqData):
|
||||
buffer = caps.Lba44990AudioPqData;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba44990AudioRwData):
|
||||
buffer = caps.Lba44990AudioRwData;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba45000Data):
|
||||
buffer = caps.Lba45000Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba45000PqData):
|
||||
buffer = caps.Lba45000PqData;
|
||||
audio = false;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba45000RwData):
|
||||
buffer = caps.Lba45000RwData;
|
||||
audio = false;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba45000AudioData):
|
||||
buffer = caps.Lba45000AudioData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba45000AudioPqData):
|
||||
buffer = caps.Lba45000AudioPqData;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba45000AudioRwData):
|
||||
buffer = caps.Lba45000AudioRwData;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba50000Data):
|
||||
buffer = caps.Lba50000Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba50000PqData):
|
||||
buffer = caps.Lba50000PqData;
|
||||
audio = false;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba50000RwData):
|
||||
buffer = caps.Lba50000RwData;
|
||||
audio = false;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba50000AudioData):
|
||||
buffer = caps.Lba50000AudioData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba50000AudioPqData):
|
||||
buffer = caps.Lba50000AudioPqData;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba50000AudioRwData):
|
||||
buffer = caps.Lba50000AudioRwData;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba100000Data):
|
||||
buffer = caps.Lba100000Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba100000PqData):
|
||||
buffer = caps.Lba100000PqData;
|
||||
audio = false;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba100000RwData):
|
||||
buffer = caps.Lba100000RwData;
|
||||
audio = false;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba100000AudioData):
|
||||
buffer = caps.Lba100000AudioData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba100000AudioPqData):
|
||||
buffer = caps.Lba100000AudioPqData;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba100000AudioRwData):
|
||||
buffer = caps.Lba100000AudioRwData;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba400000Data):
|
||||
buffer = caps.Lba400000Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba400000PqData):
|
||||
buffer = caps.Lba400000PqData;
|
||||
audio = false;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba400000RwData):
|
||||
buffer = caps.Lba400000RwData;
|
||||
audio = false;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba400000AudioData):
|
||||
buffer = caps.Lba400000AudioData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba400000AudioPqData):
|
||||
buffer = caps.Lba400000AudioPqData;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba400000AudioRwData):
|
||||
buffer = caps.Lba400000AudioRwData;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba450000Data):
|
||||
buffer = caps.Lba450000Data;
|
||||
audio = false;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba450000PqData):
|
||||
buffer = caps.Lba450000PqData;
|
||||
audio = false;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba450000RwData):
|
||||
buffer = caps.Lba450000RwData;
|
||||
audio = false;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba450000AudioData):
|
||||
buffer = caps.Lba450000AudioData;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba450000AudioPqData):
|
||||
buffer = caps.Lba450000AudioPqData;
|
||||
pq = true;
|
||||
|
||||
break;
|
||||
case nameof(caps.Lba450000AudioRwData):
|
||||
buffer = caps.Lba450000AudioRwData;
|
||||
rw = true;
|
||||
|
||||
break;
|
||||
default:
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if(pq && buffer != null && buffer.Length % 2368 != 0) pq = false;
|
||||
|
||||
if(rw && buffer != null && buffer.Length % 2448 != 0) rw = false;
|
||||
|
||||
int blockSize = pq
|
||||
? 2368
|
||||
: rw
|
||||
? 2448
|
||||
: 2352;
|
||||
|
||||
model.RawDataAsHex = PrintHex.ByteArrayToHexArrayString(buffer);
|
||||
|
||||
if(model.RawDataAsHex != null)
|
||||
model.RawDataAsHex = HttpUtility.HtmlEncode(model.RawDataAsHex).Replace("\n", "<br/>");
|
||||
|
||||
if(buffer == null) return View(model);
|
||||
|
||||
for(var i = 0; i < buffer.Length; i += blockSize)
|
||||
{
|
||||
if(audio)
|
||||
sb.AppendLine("Audio or scrambled data sector.");
|
||||
else
|
||||
{
|
||||
Array.Copy(buffer, i, sector, 0, 2352);
|
||||
|
||||
sb.AppendLine(Sector.Prettify(sector));
|
||||
}
|
||||
|
||||
if(pq)
|
||||
{
|
||||
Array.Copy(buffer, i + 2352, subq, 0, 16);
|
||||
fullsub = Subchannel.ConvertQToRaw(subq);
|
||||
|
||||
sb.AppendLine(GetPrettySub(fullsub));
|
||||
}
|
||||
else if(rw)
|
||||
{
|
||||
Array.Copy(buffer, i + 2352, fullsub, 0, 96);
|
||||
|
||||
sb.AppendLine(GetPrettySub(fullsub));
|
||||
}
|
||||
|
||||
sb.AppendLine();
|
||||
}
|
||||
|
||||
model.Decoded = HttpUtility.HtmlEncode(sb.ToString()).Replace("\n", "<br/>");
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
static string GetPrettySub(byte[] sub)
|
||||
{
|
||||
byte[] deint = Subchannel.Deinterleave(sub);
|
||||
|
||||
var validP = true;
|
||||
var validRw = true;
|
||||
|
||||
for(var i = 0; i < 12; i++)
|
||||
{
|
||||
if(deint[i] == 0x00 || deint[i] == 0xFF) continue;
|
||||
|
||||
validP = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
for(var i = 24; i < 96; i++)
|
||||
{
|
||||
if(deint[i] == 0x00) continue;
|
||||
|
||||
validRw = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
var q = new byte[12];
|
||||
Array.Copy(deint, 12, q, 0, 12);
|
||||
|
||||
return Subchannel.PrettifyQ(q, deint[21] > 0x10, 16, !validP, false, validRw);
|
||||
}
|
||||
}
|
||||
40
Aaru.Server.Old/Areas/Admin/Controllers/HomeController.cs
Normal file
40
Aaru.Server.Old/Areas/Admin/Controllers/HomeController.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : HomeController.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : Aaru Server.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Provides documentation data for razor views.
|
||||
//
|
||||
// --[ 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
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class HomeController : Controller
|
||||
{
|
||||
public ActionResult Index() => View();
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MediaFormatsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public MediaFormatsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MediaFormats
|
||||
public async Task<IActionResult> Index() => View(await _context.MediaFormats.OrderBy(mf => mf.Name).ToListAsync());
|
||||
|
||||
// GET: Admin/MediaFormats/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
MediaFormat mediaFormat = await _context.MediaFormats.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mediaFormat == null) return NotFound();
|
||||
|
||||
return View(mediaFormat);
|
||||
}
|
||||
|
||||
// POST: Admin/MediaFormats/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
MediaFormat mediaFormat = await _context.MediaFormats.FindAsync(id);
|
||||
_context.MediaFormats.Remove(mediaFormat);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
56
Aaru.Server.Old/Areas/Admin/Controllers/MediasController.cs
Normal file
56
Aaru.Server.Old/Areas/Admin/Controllers/MediasController.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MediasController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public MediasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Medias
|
||||
public IActionResult Index(bool? real)
|
||||
{
|
||||
switch(real)
|
||||
{
|
||||
case null:
|
||||
return View(_context.Medias.ToList()
|
||||
.OrderBy(m => m.PhysicalType)
|
||||
.ThenBy(m => m.LogicalType)
|
||||
.ThenBy(m => m.Real));
|
||||
default:
|
||||
return View(_context.Medias.Where(m => m.Real == real)
|
||||
.ToList()
|
||||
.OrderBy(m => m.PhysicalType)
|
||||
.ThenBy(m => m.LogicalType));
|
||||
}
|
||||
}
|
||||
|
||||
// GET: Admin/Medias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Media media = await _context.Medias.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(media == null) return NotFound();
|
||||
|
||||
return View(media);
|
||||
}
|
||||
|
||||
// POST: Admin/Medias/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Media media = await _context.Medias.FindAsync(id);
|
||||
_context.Medias.Remove(media);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
81
Aaru.Server.Old/Areas/Admin/Controllers/MmcController.cs
Normal file
81
Aaru.Server.Old/Areas/Admin/Controllers/MmcController.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MmcController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public MmcController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Mmc
|
||||
public IActionResult Index() => View(_context.Mmc.Where(m => m.ModeSense2AData != null)
|
||||
.Select(m => new MmcModelForView
|
||||
{
|
||||
Id = m.Id,
|
||||
FeaturesId = m.FeaturesId,
|
||||
DataLength = m.ModeSense2AData.Length
|
||||
})
|
||||
.ToList()
|
||||
.Concat(_context.Mmc.Where(m => m.ModeSense2AData == null)
|
||||
.Select(m => new MmcModelForView
|
||||
{
|
||||
Id = m.Id,
|
||||
FeaturesId = m.FeaturesId,
|
||||
DataLength = 0
|
||||
})
|
||||
.ToList())
|
||||
.OrderBy(m => m.Id));
|
||||
|
||||
// GET: Admin/Mmc/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmc == null) return NotFound();
|
||||
|
||||
return View(mmc);
|
||||
}
|
||||
|
||||
// GET: Admin/Mmc/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmc == null) return NotFound();
|
||||
|
||||
return View(mmc);
|
||||
}
|
||||
|
||||
// POST: Admin/Mmc/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Mmc mmc = await _context.Mmc.FindAsync(id);
|
||||
MmcFeatures feature = await _context.MmcFeatures.FirstOrDefaultAsync(f => f.Id == mmc.FeaturesId);
|
||||
|
||||
_context.MmcFeatures.Remove(feature);
|
||||
_context.Mmc.Remove(mmc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public async Task<IActionResult> Clean()
|
||||
{
|
||||
_context.Mmc.RemoveRange(_context.Mmc.Where(m => m.FeaturesId == null && m.ModeSense2AData == null));
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MmcFeaturesController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public MmcFeaturesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MmcFeatures
|
||||
public async Task<IActionResult> Index() => View(await _context.MmcFeatures.ToListAsync());
|
||||
|
||||
// GET: Admin/MmcFeatures/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
MmcFeatures mmcFeatures = await _context.MmcFeatures.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcFeatures == null) return NotFound();
|
||||
|
||||
return View(mmcFeatures);
|
||||
}
|
||||
}
|
||||
53
Aaru.Server.Old/Areas/Admin/Controllers/MmcSdsController.cs
Normal file
53
Aaru.Server.Old/Areas/Admin/Controllers/MmcSdsController.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MmcSdsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public MmcSdsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MmcSds
|
||||
public async Task<IActionResult> Index() => View(await _context.MmcSd.ToListAsync());
|
||||
|
||||
// GET: Admin/MmcSds/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcSd == null) return NotFound();
|
||||
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcSds/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcSd == null) return NotFound();
|
||||
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// POST: Admin/MmcSds/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
MmcSd mmcSd = await _context.MmcSd.FindAsync(id);
|
||||
_context.MmcSd.Remove(mmcSd);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class OperatingSystemsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public OperatingSystemsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/OperatingSystems
|
||||
public async Task<IActionResult> Index() =>
|
||||
View(await _context.OperatingSystems.OrderBy(o => o.Name).ThenBy(o => o.Version).ToListAsync());
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class PartitionsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public PartitionsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Partitions
|
||||
public async Task<IActionResult> Index() => View(await _context.Partitions.OrderBy(p => p.Name).ToListAsync());
|
||||
}
|
||||
41
Aaru.Server.Old/Areas/Admin/Controllers/PcmciasController.cs
Normal file
41
Aaru.Server.Old/Areas/Admin/Controllers/PcmciasController.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class PcmciasController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public PcmciasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Pcmcias
|
||||
public async Task<IActionResult> Index() => View(await _context.Pcmcia.ToListAsync());
|
||||
|
||||
// GET: Admin/Pcmcias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(pcmcia == null) return NotFound();
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// POST: Admin/Pcmcias/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FindAsync(id);
|
||||
_context.Pcmcia.Remove(pcmcia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
292
Aaru.Server.Old/Areas/Admin/Controllers/ReportsController.cs
Normal file
292
Aaru.Server.Old/Areas/Admin/Controllers/ReportsController.cs
Normal file
@@ -0,0 +1,292 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class ReportsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public ReportsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Reports
|
||||
public async Task<IActionResult> Index() => View(await _context.Reports.OrderBy(r => r.Manufacturer)
|
||||
.ThenBy(r => r.Model)
|
||||
.ThenBy(r => r.Revision)
|
||||
.ThenBy(r => r.CompactFlash)
|
||||
.ThenBy(r => r.Type)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/Reports/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
var model = new UploadedReportDetails
|
||||
{
|
||||
Report = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id)
|
||||
};
|
||||
|
||||
if(model.Report is null) return NotFound();
|
||||
|
||||
model.ReportAll = _context.Devices
|
||||
.Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||
d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision)
|
||||
.Select(d => d.Id)
|
||||
.ToList();
|
||||
|
||||
model.ReportButManufacturer = _context.Devices
|
||||
.Where(d => d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision)
|
||||
.Select(d => d.Id)
|
||||
.Where(d => model.ReportAll.All(r => r != d))
|
||||
.ToList();
|
||||
|
||||
model.SameAll = _context.Reports
|
||||
.Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||
d.Model == model.Report.Model &&
|
||||
d.Revision == model.Report.Revision &&
|
||||
d.Id != id)
|
||||
.Select(d => d.Id)
|
||||
.ToList();
|
||||
|
||||
model.SameButManufacturer = _context.Reports
|
||||
.Where(d => d.Model == model.Report.Model &&
|
||||
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;
|
||||
|
||||
// So we can check, as we know IDs with 0 will never exist, and EFCore does not allow null propagation in the LINQ
|
||||
int ataId = model.Report.ATA?.Id ?? 0;
|
||||
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);
|
||||
}
|
||||
|
||||
// GET: Admin/Reports/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
UploadedReport uploadedReport = await _context.Reports.FindAsync(id);
|
||||
|
||||
if(uploadedReport == null) return NotFound();
|
||||
|
||||
return View(uploadedReport);
|
||||
}
|
||||
|
||||
// POST: Admin/Reports/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,CompactFlash,Manufacturer,Model,Revision,Type")] UploadedReport changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
UploadedReport model = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.CompactFlash = changedModel.CompactFlash;
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.Model = changedModel.Model;
|
||||
model.Revision = changedModel.Revision;
|
||||
model.Type = changedModel.Type;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/Reports/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
UploadedReport uploadedReport = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(uploadedReport == null) return NotFound();
|
||||
|
||||
return View(uploadedReport);
|
||||
}
|
||||
|
||||
// POST: Admin/Reports/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
UploadedReport uploadedReport = await _context.Reports.FindAsync(id);
|
||||
_context.Reports.Remove(uploadedReport);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Promote(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
UploadedReport uploadedReport = _context.Reports.FirstOrDefault(m => m.Id == id);
|
||||
|
||||
if(uploadedReport == null) return NotFound();
|
||||
|
||||
var device = new Device(uploadedReport.ATAId,
|
||||
uploadedReport.ATAPIId,
|
||||
uploadedReport.FireWireId,
|
||||
uploadedReport.MultiMediaCardId,
|
||||
uploadedReport.PCMCIAId,
|
||||
uploadedReport.SecureDigitalId,
|
||||
uploadedReport.SCSIId,
|
||||
uploadedReport.USBId,
|
||||
uploadedReport.UploadedWhen,
|
||||
uploadedReport.Manufacturer,
|
||||
uploadedReport.Model,
|
||||
uploadedReport.Revision,
|
||||
uploadedReport.CompactFlash,
|
||||
uploadedReport.Type,
|
||||
uploadedReport.GdRomSwapDiscCapabilitiesId);
|
||||
|
||||
EntityEntry<Device> res = _context.Devices.Add(device);
|
||||
_context.Reports.Remove(uploadedReport);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(DevicesController.Details),
|
||||
"Devices",
|
||||
new
|
||||
{
|
||||
id = res.Entity.Id
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult Merge(int? master, int? slave)
|
||||
{
|
||||
if(master is null || slave is null) return NotFound();
|
||||
|
||||
UploadedReport masterReport = _context.Reports.FirstOrDefault(m => m.Id == master);
|
||||
UploadedReport slaveReport = _context.Reports.FirstOrDefault(m => m.Id == slave);
|
||||
|
||||
if(masterReport is null || slaveReport is null) return NotFound();
|
||||
|
||||
if(masterReport.ATAId != null && masterReport.ATAId != slaveReport.ATAId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveReport.ATAId))
|
||||
{
|
||||
testedMedia.AtaId = masterReport.ATAId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterReport.ATAId == null && slaveReport.ATAId != null)
|
||||
{
|
||||
masterReport.ATAId = slaveReport.ATAId;
|
||||
_context.Update(masterReport);
|
||||
}
|
||||
|
||||
if(masterReport.ATAPIId != null && masterReport.ATAPIId != slaveReport.ATAPIId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveReport.ATAPIId))
|
||||
{
|
||||
testedMedia.AtaId = masterReport.ATAPIId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterReport.ATAPIId == null && slaveReport.ATAPIId != null)
|
||||
{
|
||||
masterReport.ATAPIId = slaveReport.ATAPIId;
|
||||
_context.Update(masterReport);
|
||||
}
|
||||
|
||||
if(masterReport.SCSIId != null && masterReport.SCSIId != slaveReport.SCSIId)
|
||||
{
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == slaveReport.SCSIId))
|
||||
{
|
||||
testedMedia.ScsiId = masterReport.SCSIId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterReport.SCSIId == null && slaveReport.SCSIId != null)
|
||||
{
|
||||
masterReport.SCSIId = slaveReport.SCSIId;
|
||||
_context.Update(masterReport);
|
||||
}
|
||||
|
||||
if(masterReport.SCSI?.SequentialDeviceId != null &&
|
||||
masterReport.SCSI?.SequentialDeviceId != slaveReport.SCSI?.SequentialDeviceId)
|
||||
{
|
||||
foreach(TestedSequentialMedia testedMedia in
|
||||
_context.TestedSequentialMedia.Where(d => d.SscId == slaveReport.SCSI.SequentialDeviceId))
|
||||
{
|
||||
testedMedia.SscId = masterReport.SCSI.SequentialDeviceId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
}
|
||||
else if(masterReport.SCSI != null &&
|
||||
masterReport.SCSI?.SequentialDeviceId == null &&
|
||||
slaveReport.SCSI?.SequentialDeviceId != null)
|
||||
{
|
||||
masterReport.SCSI.SequentialDeviceId = slaveReport.SCSI.SequentialDeviceId;
|
||||
_context.Update(masterReport);
|
||||
}
|
||||
|
||||
if(masterReport.GdRomSwapDiscCapabilitiesId == null && slaveReport.GdRomSwapDiscCapabilitiesId != null)
|
||||
{
|
||||
masterReport.GdRomSwapDiscCapabilitiesId = slaveReport.GdRomSwapDiscCapabilitiesId;
|
||||
_context.Update(masterReport);
|
||||
}
|
||||
else if(masterReport.GdRomSwapDiscCapabilitiesId != null && slaveReport.GdRomSwapDiscCapabilitiesId != null)
|
||||
{
|
||||
masterReport.GdRomSwapDiscCapabilitiesId = slaveReport.GdRomSwapDiscCapabilitiesId;
|
||||
_context.Update(masterReport);
|
||||
}
|
||||
|
||||
_context.Remove(slaveReport);
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Details),
|
||||
new
|
||||
{
|
||||
Id = master
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class ScsiModesController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public ScsiModesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/ScsiModes
|
||||
public async Task<IActionResult> Index() => View(await _context.ScsiMode.ToListAsync());
|
||||
|
||||
// GET: Admin/ScsiModes/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiMode == null) return NotFound();
|
||||
|
||||
return View(scsiMode);
|
||||
}
|
||||
|
||||
// POST: Admin/ScsiModes/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
ScsiMode scsiMode = await _context.ScsiMode.FindAsync(id);
|
||||
_context.ScsiMode.Remove(scsiMode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class ScsiPagesController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public ScsiPagesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/ScsiPages
|
||||
public async Task<IActionResult> Index() => View(await _context.ScsiPage.ToListAsync());
|
||||
|
||||
// GET: Admin/ScsiPages/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiPage == null) return NotFound();
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// POST: Admin/ScsiPages/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||
_context.ScsiPage.Remove(scsiPage);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
355
Aaru.Server.Old/Areas/Admin/Controllers/ScsisController.cs
Normal file
355
Aaru.Server.Old/Areas/Admin/Controllers/ScsisController.cs
Normal file
@@ -0,0 +1,355 @@
|
||||
using System.Reflection;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Helpers;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Aaru.Server.Old.Core;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class ScsisController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public ScsisController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Scsis
|
||||
public IActionResult Index() => View(_context.Scsi.AsEnumerable()
|
||||
.OrderBy(m => StringHandlers
|
||||
.CToString(m.Inquiry?.VendorIdentification))
|
||||
.ThenBy(m => StringHandlers
|
||||
.CToString(m.Inquiry?.ProductIdentification))
|
||||
.ThenBy(m => StringHandlers
|
||||
.CToString(m.Inquiry?.ProductRevisionLevel)));
|
||||
|
||||
// GET: Admin/Scsis/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsi == null) return NotFound();
|
||||
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// GET: Admin/Scsis/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsi == null) return NotFound();
|
||||
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// POST: Admin/Scsis/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Scsi scsi = await _context.Scsi.FindAsync(id);
|
||||
_context.Scsi.Remove(scsi);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Consolidate()
|
||||
{
|
||||
var hashes = _context.Scsi.Where(m => m.InquiryData != null)
|
||||
.Select(m => new IdHashModel(m.Id, Hash.Sha512(m.InquiryData)))
|
||||
.ToList();
|
||||
|
||||
var dups = hashes.GroupBy(x => x.Hash)
|
||||
.Where(g => g.Count() > 1)
|
||||
.Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key))
|
||||
.ToList();
|
||||
|
||||
for(var i = 0; i < dups.Count; i++)
|
||||
{
|
||||
Scsi unique = _context.Scsi.First(a => a.Id == dups[i].Id);
|
||||
|
||||
dups[i].Description =
|
||||
$"{StringHandlers.CToString(unique.Inquiry?.VendorIdentification)} {StringHandlers.CToString(unique.Inquiry?.ProductIdentification)}";
|
||||
|
||||
dups[i].Duplicates = hashes.Where(h => h.Hash == dups[i].Hash).Skip(1).Select(x => x.Id).ToArray();
|
||||
}
|
||||
|
||||
return View(new IdHashModelForView
|
||||
{
|
||||
List = dups,
|
||||
Json = JsonConvert.SerializeObject(dups)
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Consolidate")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult ConsolidateConfirmed(string models)
|
||||
{
|
||||
IdHashModel[] duplicates;
|
||||
|
||||
try
|
||||
{
|
||||
duplicates = JsonConvert.DeserializeObject<IdHashModel[]>(models);
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if(duplicates is null) return BadRequest();
|
||||
|
||||
foreach(IdHashModel duplicate in duplicates)
|
||||
{
|
||||
Scsi master = _context.Scsi.FirstOrDefault(m => m.Id == duplicate.Id);
|
||||
|
||||
if(master is null) continue;
|
||||
|
||||
foreach(int duplicateId in duplicate.Duplicates)
|
||||
{
|
||||
Scsi slave = _context.Scsi.FirstOrDefault(m => m.Id == duplicateId);
|
||||
|
||||
if(slave is null) continue;
|
||||
|
||||
foreach(Device scsiDevice in _context.Devices.Where(d => d.SCSI.Id == duplicateId))
|
||||
scsiDevice.SCSI = master;
|
||||
|
||||
foreach(UploadedReport scsiReport in _context.Reports.Where(d => d.SCSI.Id == duplicateId))
|
||||
scsiReport.SCSI = master;
|
||||
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == duplicateId))
|
||||
{
|
||||
testedMedia.ScsiId = duplicate.Id;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
|
||||
if(master.ReadCapabilities is null && slave.ReadCapabilities != null)
|
||||
master.ReadCapabilities = slave.ReadCapabilities;
|
||||
|
||||
_context.Scsi.Remove(slave);
|
||||
}
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Compare(int id, int rightId)
|
||||
{
|
||||
var model = new CompareModel
|
||||
{
|
||||
LeftId = id,
|
||||
RightId = rightId
|
||||
};
|
||||
|
||||
Scsi left = _context.Scsi.FirstOrDefault(l => l.Id == id);
|
||||
Scsi right = _context.Scsi.FirstOrDefault(r => r.Id == rightId);
|
||||
|
||||
if(left is null)
|
||||
{
|
||||
model.ErrorMessage = $"SCSI with id {id} has not been found";
|
||||
model.HasError = true;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
if(right is null)
|
||||
{
|
||||
model.ErrorMessage = $"SCSI with id {rightId} has not been found";
|
||||
model.HasError = true;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Inquiry? leftNullable = left.Inquiry;
|
||||
Inquiry? rightNullable = right.Inquiry;
|
||||
model.ValueNames = new List<string>();
|
||||
model.LeftValues = new List<string>();
|
||||
model.RightValues = new List<string>();
|
||||
|
||||
if(!leftNullable.HasValue && !rightNullable.HasValue)
|
||||
{
|
||||
model.AreEqual = true;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
if(leftNullable.HasValue && !rightNullable.HasValue)
|
||||
{
|
||||
model.ValueNames.Add("Decoded");
|
||||
model.LeftValues.Add("decoded");
|
||||
model.RightValues.Add("null");
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
if(!leftNullable.HasValue)
|
||||
{
|
||||
model.ValueNames.Add("Decoded");
|
||||
model.LeftValues.Add("null");
|
||||
model.RightValues.Add("decoded");
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Inquiry leftValue = left.Inquiry.Value;
|
||||
Inquiry rightValue = right.Inquiry.Value;
|
||||
|
||||
foreach(FieldInfo fieldInfo in leftValue.GetType().GetFields())
|
||||
{
|
||||
object lv = fieldInfo.GetValue(leftValue);
|
||||
object rv = fieldInfo.GetValue(rightValue);
|
||||
|
||||
if(fieldInfo.FieldType.IsArray)
|
||||
{
|
||||
var la = lv as Array;
|
||||
var ra = rv as Array;
|
||||
|
||||
switch(la)
|
||||
{
|
||||
case null when ra is null:
|
||||
continue;
|
||||
case null:
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("null");
|
||||
model.RightValues.Add("[]");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(ra is null)
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("[]");
|
||||
model.RightValues.Add("null");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
var ll = la.Cast<object>().ToList();
|
||||
var rl = ra.Cast<object>().ToList();
|
||||
|
||||
for(var i = 0; i < ll.Count; i++)
|
||||
{
|
||||
if(ll[i].Equals(rl[i])) continue;
|
||||
|
||||
switch(fieldInfo.Name)
|
||||
{
|
||||
case nameof(Inquiry.KreonIdentifier):
|
||||
case nameof(Inquiry.ProductIdentification):
|
||||
case nameof(Inquiry.ProductRevisionLevel):
|
||||
case nameof(Inquiry.Qt_ModuleRevision):
|
||||
case nameof(Inquiry.Seagate_Copyright):
|
||||
case nameof(Inquiry.Seagate_DriveSerialNumber):
|
||||
case nameof(Inquiry.Seagate_ServoPROMPartNo):
|
||||
case nameof(Inquiry.VendorIdentification):
|
||||
var lb = new byte[ll.Count];
|
||||
var rb = new byte[rl.Count];
|
||||
|
||||
for(var j = 0; j < ll.Count; j++) lb[j] = (byte)ll[j];
|
||||
|
||||
for(var j = 0; j < ll.Count; j++) rb[j] = (byte)rl[j];
|
||||
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add($"{StringHandlers.CToString(lb) ?? "<null>"}");
|
||||
model.RightValues.Add($"{StringHandlers.CToString(rb) ?? "<null>"}");
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("[]");
|
||||
model.RightValues.Add("[]");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(lv == null && rv == null) {}
|
||||
else if(lv != null && rv == null)
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add($"{lv}");
|
||||
model.RightValues.Add("null");
|
||||
}
|
||||
else if(lv == null)
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add("null");
|
||||
model.RightValues.Add($"{rv}");
|
||||
}
|
||||
else if(!lv.Equals(rv))
|
||||
|
||||
{
|
||||
model.ValueNames.Add(fieldInfo.Name);
|
||||
model.LeftValues.Add($"{lv}");
|
||||
model.RightValues.Add($"{rv}");
|
||||
}
|
||||
}
|
||||
|
||||
model.AreEqual = model.LeftValues.Count == 0 && model.RightValues.Count == 0;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public IActionResult ConsolidateWithIds(int masterId, int slaveId)
|
||||
{
|
||||
Scsi master = _context.Scsi.FirstOrDefault(m => m.Id == masterId);
|
||||
|
||||
if(master is null)
|
||||
{
|
||||
return RedirectToAction(nameof(Compare),
|
||||
new
|
||||
{
|
||||
id = masterId,
|
||||
rightId = slaveId
|
||||
});
|
||||
}
|
||||
|
||||
Scsi slave = _context.Scsi.FirstOrDefault(m => m.Id == slaveId);
|
||||
|
||||
if(slave is null)
|
||||
{
|
||||
return RedirectToAction(nameof(Compare),
|
||||
new
|
||||
{
|
||||
id = masterId,
|
||||
rightId = slaveId
|
||||
});
|
||||
}
|
||||
|
||||
foreach(Device scsiDevice in _context.Devices.Where(d => d.SCSI.Id == slaveId)) scsiDevice.SCSI = master;
|
||||
|
||||
foreach(UploadedReport scsiReport in _context.Reports.Where(d => d.SCSI.Id == slaveId))
|
||||
scsiReport.SCSI = master;
|
||||
|
||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == slaveId))
|
||||
{
|
||||
testedMedia.ScsiId = masterId;
|
||||
_context.Update(testedMedia);
|
||||
}
|
||||
|
||||
if(master.ReadCapabilities is null && slave.ReadCapabilities != null)
|
||||
master.ReadCapabilities = slave.ReadCapabilities;
|
||||
|
||||
_context.Scsi.Remove(slave);
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
115
Aaru.Server.Old/Areas/Admin/Controllers/SscsController.cs
Normal file
115
Aaru.Server.Old/Areas/Admin/Controllers/SscsController.cs
Normal file
@@ -0,0 +1,115 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class SscsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public SscsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Sscs
|
||||
public async Task<IActionResult> Index() => View(await _context.Ssc.OrderBy(s => s.MinBlockLength)
|
||||
.ThenBy(s => s.MaxBlockLength)
|
||||
.ThenBy(s => s.BlockSizeGranularity)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/Sscs/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Ssc ssc = await _context.Ssc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ssc == null) return NotFound();
|
||||
|
||||
return View(ssc);
|
||||
}
|
||||
|
||||
// POST: Admin/Sscs/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Ssc ssc = await _context.Ssc.FindAsync(id);
|
||||
_context.Ssc.Remove(ssc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Consolidate()
|
||||
{
|
||||
var dups = _context.Ssc.GroupBy(x => new
|
||||
{
|
||||
x.BlockSizeGranularity,
|
||||
x.MaxBlockLength,
|
||||
x.MinBlockLength
|
||||
})
|
||||
.Where(x => x.Count() > 1)
|
||||
.Select(x => new SscModel
|
||||
{
|
||||
BlockSizeGranularity = x.Key.BlockSizeGranularity,
|
||||
MaxBlockLength = x.Key.MaxBlockLength,
|
||||
MinBlockLength = x.Key.MinBlockLength
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return View(new SscModelForView
|
||||
{
|
||||
List = dups,
|
||||
Json = JsonConvert.SerializeObject(dups)
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Consolidate")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult ConsolidateConfirmed(string models)
|
||||
{
|
||||
SscModel[] duplicates;
|
||||
|
||||
try
|
||||
{
|
||||
duplicates = JsonConvert.DeserializeObject<SscModel[]>(models);
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if(duplicates is null) return BadRequest();
|
||||
|
||||
foreach(SscModel duplicate in duplicates)
|
||||
{
|
||||
Ssc master = _context.Ssc.FirstOrDefault(m => m.BlockSizeGranularity == duplicate.BlockSizeGranularity &&
|
||||
m.MaxBlockLength == duplicate.MaxBlockLength &&
|
||||
m.MinBlockLength == duplicate.MinBlockLength);
|
||||
|
||||
if(master is null) continue;
|
||||
|
||||
foreach(Ssc ssc in _context.Ssc.Where(m => m.BlockSizeGranularity == duplicate.BlockSizeGranularity &&
|
||||
m.MaxBlockLength == duplicate.MaxBlockLength &&
|
||||
m.MinBlockLength == duplicate.MinBlockLength)
|
||||
.Skip(1)
|
||||
.ToArray())
|
||||
{
|
||||
foreach(TestedSequentialMedia media in _context.TestedSequentialMedia.Where(d => d.SscId == ssc.Id))
|
||||
media.SscId = master.Id;
|
||||
|
||||
_context.Ssc.Update(ssc);
|
||||
_context.Ssc.Remove(ssc);
|
||||
}
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class SupportedDensitiesController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public SupportedDensitiesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/SupportedDensities
|
||||
public async Task<IActionResult> Index() => View(await _context.SupportedDensity.OrderBy(d => d.Organization)
|
||||
.ThenBy(d => d.Name)
|
||||
.ThenBy(d => d.Description)
|
||||
.ThenBy(d => d.Capacity)
|
||||
.ThenBy(d => d.PrimaryCode)
|
||||
.ThenBy(d => d.SecondaryCode)
|
||||
.ThenBy(d => d.BitsPerMm)
|
||||
.ThenBy(d => d.Width)
|
||||
.ThenBy(d => d.Tracks)
|
||||
.ThenBy(d => d.DefaultDensity)
|
||||
.ThenBy(d => d.Writable)
|
||||
.ThenBy(d => d.Duplicate)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/SupportedDensities/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(supportedDensity == null) return NotFound();
|
||||
|
||||
return View(supportedDensity);
|
||||
}
|
||||
|
||||
// POST: Admin/SupportedDensities/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
||||
_context.SupportedDensity.Remove(supportedDensity);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,695 @@
|
||||
using System.Web;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Decoders.ATA;
|
||||
using Aaru.Decoders.Bluray;
|
||||
using Aaru.Decoders.CD;
|
||||
using Aaru.Decoders.DVD;
|
||||
using Aaru.Decoders.SCSI;
|
||||
using Aaru.Helpers;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Cartridge = Aaru.Decoders.Bluray.Cartridge;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
using DDS = Aaru.Decoders.Bluray.DDS;
|
||||
using DMI = Aaru.Decoders.Xbox.DMI;
|
||||
using MediaType = Aaru.CommonTypes.MediaType;
|
||||
using Spare = Aaru.Decoders.Bluray.Spare;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class TestedMediasController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public TestedMediasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/TestedMedias
|
||||
public async Task<IActionResult> Index() => View(await _context.TestedMedia.OrderBy(m => m.Manufacturer)
|
||||
.ThenBy(m => m.Model)
|
||||
.ThenBy(m => m.MediumTypeName)
|
||||
.ThenBy(m => m.MediaIsRecognized)
|
||||
.ThenBy(m => m.LongBlockSize)
|
||||
.ThenBy(m => m.BlockSize)
|
||||
.ThenBy(m => m.Blocks)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/TestedMedias/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedMedia == null) return NotFound();
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||
|
||||
if(testedMedia == null) return NotFound();
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// POST: Admin/TestedMedias/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,Blocks,BlockSize,LongBlockSize,Manufacturer,MediumTypeName,Model")] TestedMedia changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
TestedMedia model = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.Blocks = changedModel.Blocks;
|
||||
model.BlockSize = changedModel.BlockSize;
|
||||
model.LongBlockSize = changedModel.LongBlockSize;
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.MediumTypeName = changedModel.MediumTypeName;
|
||||
model.Model = changedModel.Model;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedMedia == null) return NotFound();
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// POST: Admin/TestedMedias/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||
_context.TestedMedia.Remove(testedMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult ViewData(int id, string data)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(data)) return NotFound();
|
||||
|
||||
TestedMedia testedMedia = _context.TestedMedia.FirstOrDefault(m => m.Id == id);
|
||||
|
||||
if(testedMedia == null) return NotFound();
|
||||
|
||||
var model = new TestedMediaDataModel
|
||||
{
|
||||
TestedMediaId = id,
|
||||
DataName = data
|
||||
};
|
||||
|
||||
byte[] buffer;
|
||||
var sector = new byte[2352];
|
||||
var subq = new byte[16];
|
||||
var fullsub = new byte[96];
|
||||
var c2Errors = false;
|
||||
var scrambled = false;
|
||||
|
||||
switch(data)
|
||||
{
|
||||
case nameof(testedMedia.AdipData):
|
||||
buffer = testedMedia.AdipData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.AtipData):
|
||||
buffer = testedMedia.AtipData;
|
||||
model.Decoded = ATIP.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.BluBcaData):
|
||||
buffer = testedMedia.BluBcaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.BluDdsData):
|
||||
buffer = testedMedia.BluDdsData;
|
||||
model.Decoded = DDS.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.BluDiData):
|
||||
buffer = testedMedia.BluDiData;
|
||||
model.Decoded = DI.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.BluPacData):
|
||||
buffer = testedMedia.BluPacData;
|
||||
model.Decoded = Cartridge.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.BluSaiData):
|
||||
buffer = testedMedia.BluSaiData;
|
||||
model.Decoded = Spare.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.C2PointersData):
|
||||
buffer = testedMedia.C2PointersData;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
for(var i = 2352; i < buffer.Length; i++)
|
||||
{
|
||||
if(buffer[i] == 0x00) continue;
|
||||
|
||||
c2Errors = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.CmiData):
|
||||
buffer = testedMedia.CmiData;
|
||||
model.Decoded = CSS_CPRM.PrettifyLeadInCopyright(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.CorrectedSubchannelData):
|
||||
buffer = testedMedia.CorrectedSubchannelData;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
if(buffer.Length < 2448) break;
|
||||
|
||||
Array.Copy(buffer, 2352, fullsub, 0, 96);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.CorrectedSubchannelWithC2Data):
|
||||
buffer = testedMedia.CorrectedSubchannelWithC2Data;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
if(buffer.Length < 2448) break;
|
||||
|
||||
for(var i = 2352; i < 2616; i++)
|
||||
{
|
||||
if(buffer[i] == 0x00) continue;
|
||||
|
||||
c2Errors = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DcbData):
|
||||
buffer = testedMedia.DcbData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DmiData):
|
||||
buffer = testedMedia.DmiData;
|
||||
|
||||
if(DMI.IsXbox(buffer))
|
||||
model.Decoded = DMI.PrettifyXbox(buffer);
|
||||
else if(DMI.IsXbox360(buffer)) model.Decoded = DMI.PrettifyXbox360(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DvdAacsData):
|
||||
buffer = testedMedia.DvdAacsData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DvdBcaData):
|
||||
buffer = testedMedia.DvdBcaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DvdDdsData):
|
||||
buffer = testedMedia.DvdDdsData;
|
||||
model.Decoded = Decoders.DVD.DDS.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DvdLayerData):
|
||||
buffer = testedMedia.DvdLayerData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.DvdSaiData):
|
||||
buffer = testedMedia.DvdSaiData;
|
||||
model.Decoded = Decoders.DVD.Spare.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.EmbossedPfiData):
|
||||
buffer = testedMedia.EmbossedPfiData;
|
||||
model.Decoded = PFI.Prettify(buffer, MediaType.DVDROM); // TODO: Get real media type here
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.FullTocData):
|
||||
buffer = testedMedia.FullTocData;
|
||||
model.Decoded = FullTOC.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.HdCmiData):
|
||||
buffer = testedMedia.HdCmiData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.HLDTSTReadRawDVDData):
|
||||
buffer = testedMedia.HLDTSTReadRawDVDData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.LiteOnReadRawDVDData):
|
||||
buffer = testedMedia.LiteOnReadRawDVDData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.IdentifyData):
|
||||
buffer = testedMedia.IdentifyData;
|
||||
model.Decoded = Identify.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.IntersessionLeadInData):
|
||||
buffer = testedMedia.IntersessionLeadInData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.IntersessionLeadOutData):
|
||||
buffer = testedMedia.IntersessionLeadOutData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.LeadInData):
|
||||
buffer = testedMedia.LeadInData;
|
||||
model.Decoded = Sector.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.LeadOutData):
|
||||
buffer = testedMedia.LeadOutData;
|
||||
model.Decoded = Sector.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ModeSense6Data):
|
||||
buffer = testedMedia.ModeSense6Data;
|
||||
model.Decoded = Modes.PrettifyModeHeader6(buffer, PeripheralDeviceTypes.DirectAccess);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ModeSense10Data):
|
||||
buffer = testedMedia.ModeSense10Data;
|
||||
model.Decoded = Modes.PrettifyModeHeader10(buffer, PeripheralDeviceTypes.DirectAccess);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.NecReadCddaData):
|
||||
buffer = testedMedia.NecReadCddaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PfiData):
|
||||
buffer = testedMedia.PfiData;
|
||||
model.Decoded = PFI.Prettify(buffer, MediaType.DVDROM); // TODO: Get real media type here
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PioneerReadCddaData):
|
||||
buffer = testedMedia.PioneerReadCddaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PioneerReadCddaMsfData):
|
||||
buffer = testedMedia.PioneerReadCddaMsfData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PlextorReadCddaData):
|
||||
buffer = testedMedia.PlextorReadCddaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PlextorReadRawDVDData):
|
||||
buffer = testedMedia.PlextorReadRawDVDData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PmaData):
|
||||
buffer = testedMedia.PmaData;
|
||||
model.Decoded = PMA.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PQSubchannelData):
|
||||
buffer = testedMedia.PQSubchannelData;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
if(buffer.Length < 2368) break;
|
||||
|
||||
Array.Copy(buffer, 2352, subq, 0, 16);
|
||||
fullsub = Subchannel.ConvertQToRaw(subq);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PQSubchannelWithC2Data):
|
||||
buffer = testedMedia.PQSubchannelWithC2Data;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
if(buffer.Length < 2368) break;
|
||||
|
||||
Array.Copy(buffer, 2646, subq, 0, 16);
|
||||
fullsub = Subchannel.ConvertQToRaw(subq);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
for(var i = 2352; i < 2646; i++)
|
||||
{
|
||||
if(buffer[i] == 0x00) continue;
|
||||
|
||||
c2Errors = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.PriData):
|
||||
buffer = testedMedia.PriData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.Read6Data):
|
||||
buffer = testedMedia.Read6Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.Read10Data):
|
||||
buffer = testedMedia.Read10Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.Read12Data):
|
||||
buffer = testedMedia.Read12Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.Read16Data):
|
||||
buffer = testedMedia.Read16Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadCdData):
|
||||
buffer = testedMedia.ReadCdData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadCdFullData):
|
||||
buffer = testedMedia.ReadCdFullData;
|
||||
model.Decoded = Sector.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadCdMsfData):
|
||||
buffer = testedMedia.ReadCdMsfData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadCdMsfFullData):
|
||||
buffer = testedMedia.ReadCdMsfFullData;
|
||||
model.Decoded = Sector.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadDmaData):
|
||||
buffer = testedMedia.ReadDmaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadDmaLba48Data):
|
||||
buffer = testedMedia.ReadDmaLba48Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadDmaLbaData):
|
||||
buffer = testedMedia.ReadDmaLbaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadDmaRetryData):
|
||||
buffer = testedMedia.ReadDmaRetryData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadDmaRetryLbaData):
|
||||
buffer = testedMedia.ReadDmaRetryLbaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLba48Data):
|
||||
buffer = testedMedia.ReadLba48Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLbaData):
|
||||
buffer = testedMedia.ReadLbaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLong10Data):
|
||||
buffer = testedMedia.ReadLong10Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLong16Data):
|
||||
buffer = testedMedia.ReadLong16Data;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLongData):
|
||||
buffer = testedMedia.ReadLongData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLongLbaData):
|
||||
buffer = testedMedia.ReadLongLbaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLongRetryData):
|
||||
buffer = testedMedia.ReadLongRetryData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadLongRetryLbaData):
|
||||
buffer = testedMedia.ReadLongRetryLbaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadRetryLbaData):
|
||||
buffer = testedMedia.ReadRetryLbaData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadSectorsData):
|
||||
buffer = testedMedia.ReadSectorsData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadSectorsRetryData):
|
||||
buffer = testedMedia.ReadSectorsRetryData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.RWSubchannelData):
|
||||
buffer = testedMedia.RWSubchannelData;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
if(buffer.Length < 2448) break;
|
||||
|
||||
Array.Copy(buffer, 2352, fullsub, 0, 96);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.RWSubchannelWithC2Data):
|
||||
buffer = testedMedia.RWSubchannelWithC2Data;
|
||||
|
||||
if(buffer is null || buffer.Length < 2352 || buffer.All(c => c == 0)) break;
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
model.Decoded = Sector.Prettify(sector);
|
||||
|
||||
if(buffer.Length < 2448) break;
|
||||
|
||||
Array.Copy(buffer, 2352, fullsub, 0, 96);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
for(var i = 2448; i < buffer.Length; i++)
|
||||
{
|
||||
if(buffer[i] != 0x00)
|
||||
{
|
||||
c2Errors = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.TocData):
|
||||
buffer = testedMedia.TocData;
|
||||
model.Decoded = TOC.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.Track1PregapData):
|
||||
buffer = testedMedia.Track1PregapData;
|
||||
|
||||
model.Decoded = Sector.Prettify(buffer);
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadCdScrambledData):
|
||||
buffer = testedMedia.ReadCdScrambledData;
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadF1_06Data):
|
||||
buffer = testedMedia.ReadF1_06Data;
|
||||
|
||||
if(buffer.Length != 0xB00)
|
||||
{
|
||||
model.Decoded = Sense.PrettifySense(buffer);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
if((sector[0xD] & 0x80) == 0x80)
|
||||
{
|
||||
scrambled = true;
|
||||
Sector.Scramble(sector);
|
||||
}
|
||||
|
||||
model.Decoded = Sector.Prettify(sector) + "\n" + (scrambled ? "Scrambled." : "Descrambled.");
|
||||
|
||||
Array.Copy(buffer, 2352, fullsub, 0, 96);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
Array.Copy(buffer, 2448, subq, 0, 16);
|
||||
fullsub = Subchannel.ConvertQToRaw(subq);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
for(var i = 2468; i < 2762; i++)
|
||||
{
|
||||
if(buffer[i] == 0x00) continue;
|
||||
|
||||
c2Errors = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||
|
||||
break;
|
||||
case nameof(testedMedia.ReadF1_06LeadOutData):
|
||||
buffer = testedMedia.ReadF1_06LeadOutData;
|
||||
|
||||
if(buffer.Length != 0xB00)
|
||||
{
|
||||
model.Decoded = Sense.PrettifySense(buffer);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Array.Copy(buffer, 0, sector, 0, 2352);
|
||||
|
||||
if((sector[0xD] & 0x80) == 0x80)
|
||||
{
|
||||
scrambled = true;
|
||||
Sector.Scramble(sector);
|
||||
}
|
||||
|
||||
model.Decoded = Sector.Prettify(sector) + "\n" + (scrambled ? "Scrambled." : "Descrambled.");
|
||||
|
||||
Array.Copy(buffer, 2352, fullsub, 0, 96);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
Array.Copy(buffer, 2448, subq, 0, 16);
|
||||
fullsub = Subchannel.ConvertQToRaw(subq);
|
||||
|
||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||
|
||||
for(var i = 2468; i < 2762; i++)
|
||||
{
|
||||
if(buffer[i] == 0x00) continue;
|
||||
|
||||
c2Errors = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||
|
||||
break;
|
||||
default:
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
model.RawDataAsHex = PrintHex.ByteArrayToHexArrayString(buffer);
|
||||
|
||||
if(model.RawDataAsHex != null)
|
||||
model.RawDataAsHex = HttpUtility.HtmlEncode(model.RawDataAsHex).Replace("\n", "<br/>");
|
||||
|
||||
if(model.Decoded != null) model.Decoded = HttpUtility.HtmlEncode(model.Decoded).Replace("\n", "<br/>");
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
static string GetPrettySub(byte[] sub)
|
||||
{
|
||||
byte[] deint = Subchannel.Deinterleave(sub);
|
||||
|
||||
var validP = true;
|
||||
var validRw = true;
|
||||
|
||||
for(var i = 0; i < 12; i++)
|
||||
{
|
||||
if(deint[i] == 0x00 || deint[i] == 0xFF) continue;
|
||||
|
||||
validP = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
for(var i = 24; i < 96; i++)
|
||||
{
|
||||
if(deint[i] == 0x00) continue;
|
||||
|
||||
validRw = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
var q = new byte[12];
|
||||
Array.Copy(deint, 12, q, 0, 12);
|
||||
|
||||
return Subchannel.PrettifyQ(q, deint[21] > 0x10, 16, !validP, false, validRw);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class TestedSequentialMediasController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public TestedSequentialMediasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/TestedSequentialMedias
|
||||
public async Task<IActionResult> Index() => View(await _context.TestedSequentialMedia.OrderBy(m => m.Manufacturer)
|
||||
.ThenBy(m => m.Model)
|
||||
.ThenBy(m => m.MediumTypeName)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||
|
||||
if(testedSequentialMedia == null) return NotFound();
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,Manufacturer,MediumTypeName,Model")] TestedSequentialMedia changedModel)
|
||||
{
|
||||
if(id != changedModel.Id) return NotFound();
|
||||
|
||||
if(!ModelState.IsValid) return View(changedModel);
|
||||
|
||||
TestedSequentialMedia model = await _context.TestedSequentialMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(model is null) return NotFound();
|
||||
|
||||
model.Manufacturer = changedModel.Manufacturer;
|
||||
model.MediumTypeName = changedModel.MediumTypeName;
|
||||
model.Model = changedModel.Model;
|
||||
|
||||
try
|
||||
{
|
||||
_context.Update(model);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
ModelState.AddModelError("Concurrency", "Concurrency error, please report to the administrator.");
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
TestedSequentialMedia testedSequentialMedia =
|
||||
await _context.TestedSequentialMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedSequentialMedia == null) return NotFound();
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||
_context.TestedSequentialMedia.Remove(testedSequentialMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class UsbProductsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public UsbProductsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/UsbProducts
|
||||
public async Task<IActionResult> Index() => View(await _context.UsbProducts.Include(u => u.Vendor)
|
||||
.OrderBy(p => p.Vendor.Vendor)
|
||||
.ThenBy(p => p.Product)
|
||||
.ThenBy(p => p.ProductId)
|
||||
.Select(p => new UsbProductModel
|
||||
{
|
||||
ProductId = p.ProductId,
|
||||
ProductName = p.Product,
|
||||
VendorId = p.Vendor.Id,
|
||||
VendorName = p.Vendor.Vendor
|
||||
})
|
||||
.ToListAsync());
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class UsbVendorsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public UsbVendorsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/UsbVendors
|
||||
public async Task<IActionResult> Index() =>
|
||||
View(await _context.UsbVendors.OrderBy(v => v.Vendor).ThenBy(v => v.VendorId).ToListAsync());
|
||||
|
||||
// GET: Admin/UsbVendors/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
UsbVendor usbVendor = await _context.UsbVendors.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(usbVendor == null) return NotFound();
|
||||
|
||||
return View(new UsbVendorModel
|
||||
{
|
||||
Vendor = usbVendor.Vendor,
|
||||
VendorId = usbVendor.VendorId,
|
||||
Products = _context.UsbProducts.Where(p => p.VendorId == usbVendor.Id)
|
||||
.OrderBy(p => p.Product)
|
||||
.ThenBy(p => p.ProductId)
|
||||
.Select(p => new UsbProductModel
|
||||
{
|
||||
ProductId = p.ProductId,
|
||||
ProductName = p.Product
|
||||
})
|
||||
.ToList()
|
||||
});
|
||||
}
|
||||
}
|
||||
142
Aaru.Server.Old/Areas/Admin/Controllers/UsbsController.cs
Normal file
142
Aaru.Server.Old/Areas/Admin/Controllers/UsbsController.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Old.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class UsbsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public UsbsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Usbs
|
||||
public async Task<IActionResult> Index() => View(await _context.Usb.OrderBy(u => u.Manufacturer)
|
||||
.ThenBy(u => u.Product)
|
||||
.ThenBy(u => u.VendorID)
|
||||
.ThenBy(u => u.ProductID)
|
||||
.ToListAsync());
|
||||
|
||||
// GET: Admin/Usbs/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(usb == null) return NotFound();
|
||||
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// GET: Admin/Usbs/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(usb == null) return NotFound();
|
||||
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// POST: Admin/Usbs/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
Usb usb = await _context.Usb.FindAsync(id);
|
||||
_context.Usb.Remove(usb);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
public IActionResult Consolidate()
|
||||
{
|
||||
var dups = _context.Usb.GroupBy(x => new
|
||||
{
|
||||
x.Manufacturer,
|
||||
x.Product,
|
||||
x.VendorID,
|
||||
x.ProductID
|
||||
})
|
||||
.Where(x => x.Count() > 1)
|
||||
.Select(x => new UsbModel
|
||||
{
|
||||
Manufacturer = x.Key.Manufacturer,
|
||||
Product = x.Key.Product,
|
||||
VendorID = x.Key.VendorID,
|
||||
ProductID = x.Key.ProductID
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return View(new UsbModelForView
|
||||
{
|
||||
List = dups,
|
||||
Json = JsonConvert.SerializeObject(dups)
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Consolidate")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult ConsolidateConfirmed(string models)
|
||||
{
|
||||
UsbModel[] duplicates;
|
||||
|
||||
try
|
||||
{
|
||||
duplicates = JsonConvert.DeserializeObject<UsbModel[]>(models);
|
||||
}
|
||||
catch(JsonSerializationException)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
if(duplicates is null) return BadRequest();
|
||||
|
||||
foreach(UsbModel duplicate in duplicates)
|
||||
{
|
||||
Usb master = _context.Usb.FirstOrDefault(m => m.Manufacturer == duplicate.Manufacturer &&
|
||||
m.Product == duplicate.Product &&
|
||||
m.VendorID == duplicate.VendorID &&
|
||||
m.ProductID == duplicate.ProductID);
|
||||
|
||||
if(master is null) continue;
|
||||
|
||||
foreach(Usb slave in _context.Usb.Where(m => m.Manufacturer == duplicate.Manufacturer &&
|
||||
m.Product == duplicate.Product &&
|
||||
m.VendorID == duplicate.VendorID &&
|
||||
m.ProductID == duplicate.ProductID)
|
||||
.Skip(1)
|
||||
.ToArray())
|
||||
{
|
||||
if(slave.Descriptors != null && master.Descriptors != null)
|
||||
if(!master.Descriptors.SequenceEqual(slave.Descriptors))
|
||||
continue;
|
||||
|
||||
foreach(Device device in _context.Devices.Where(d => d.USB.Id == slave.Id)) device.USB = master;
|
||||
|
||||
foreach(UploadedReport report in _context.Reports.Where(d => d.USB.Id == slave.Id)) report.USB = master;
|
||||
|
||||
if(master.Descriptors is null && slave.Descriptors != null)
|
||||
{
|
||||
master.Descriptors = slave.Descriptors;
|
||||
_context.Usb.Update(master);
|
||||
}
|
||||
|
||||
_context.Usb.Remove(slave);
|
||||
}
|
||||
}
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using DbContext = Aaru.Server.Old.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Old.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class VersionsController : Controller
|
||||
{
|
||||
readonly DbContext _context;
|
||||
|
||||
public VersionsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Versions
|
||||
public async Task<IActionResult> Index() => View(await _context.Versions.OrderBy(v => v.Name).ToListAsync());
|
||||
}
|
||||
138
Aaru.Server.Old/Areas/Admin/Views/Atas/CheckPrivate.cshtml
Normal file
138
Aaru.Server.Old/Areas/Admin/Views/Atas/CheckPrivate.cshtml
Normal file
@@ -0,0 +1,138 @@
|
||||
@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>
|
||||
86
Aaru.Server.Old/Areas/Admin/Views/Atas/Compare.cshtml
Normal file
86
Aaru.Server.Old/Areas/Admin/Views/Atas/Compare.cshtml
Normal file
@@ -0,0 +1,86 @@
|
||||
@model Aaru.Server.Database.Models.CompareModel
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h2>Comparing ATA IDENTIFY ID @Model.LeftId with ID @Model.RightId</h2>
|
||||
@if(Model.AreEqual)
|
||||
{
|
||||
<p>No differences found.</p>
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@if(Model.HasError)
|
||||
{
|
||||
<p class="alert-info">@Model.ErrorMessage</p>
|
||||
|
||||
return;
|
||||
}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Value name
|
||||
</th>
|
||||
<th>
|
||||
ID: @Model.LeftId
|
||||
</th>
|
||||
<th>
|
||||
ID: @Model.RightId
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for(var i = 0; i < Model.ValueNames.Count; i++)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Model.ValueNames[i]
|
||||
</td>
|
||||
<td>
|
||||
@Model.LeftValues[i]
|
||||
</td>
|
||||
<td>
|
||||
@Model.RightValues[i]
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<a asp-action="Delete" asp-route-id="@Model.LeftId" class="btn btn-danger">Delete ID @Model.LeftId</a>
|
||||
<a asp-action="Delete" asp-route-id="@Model.RightId" class="btn btn-danger">Delete ID @Model.RightId</a>
|
||||
<a asp-action="ConsolidateWithIds" asp-route-masterId="@Model.LeftId" asp-route-slaveId="@Model.RightId" class="btn btn-secondary">Replace all dependencies from ID @Model.RightId with ID @Model.LeftId</a>
|
||||
<a asp-action="ConsolidateWithIds" asp-route-masterId="@Model.RightId" asp-route-slaveId="@Model.LeftId" class="btn btn-secondary">Replace all dependencies from ID @Model.LeftId with ID @Model.RightId</a>
|
||||
32
Aaru.Server.Old/Areas/Admin/Views/Atas/Consolidate.cshtml
Normal file
32
Aaru.Server.Old/Areas/Admin/Views/Atas/Consolidate.cshtml
Normal file
@@ -0,0 +1,32 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.IdHashModelForView
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Consolidate duplicate ATAs";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<h2>Consolidate duplicate ATAs</h2>
|
||||
<div>
|
||||
The following ATA IDENTIFY DEVICE have duplicates.
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tbody>
|
||||
@foreach(IdHashModel item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
Do you want to remove the duplicates?
|
||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||
<input asp-for="Json" name="models" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||
</form>
|
||||
</div>
|
||||
50
Aaru.Server.Old/Areas/Admin/Views/Atas/Delete.cshtml
Normal file
50
Aaru.Server.Old/Areas/Admin/Views/Atas/Delete.cshtml
Normal file
@@ -0,0 +1,50 @@
|
||||
@using Aaru.Decoders.ATA
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.Ata
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
||||
<hr/>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
||||
</div>
|
||||
<div>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
51
Aaru.Server.Old/Areas/Admin/Views/Atas/Details.cshtml
Normal file
51
Aaru.Server.Old/Areas/Admin/Views/Atas/Details.cshtml
Normal file
@@ -0,0 +1,51 @@
|
||||
@using Aaru.Decoders.ATA
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.Ata
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
||||
<hr/>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
||||
</div>
|
||||
<div>
|
||||
<form asp-action="Compare">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
Compare to:
|
||||
<input name="RightId" type="number"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
<input class="btn btn-primary" type="submit" value="Compare"/>
|
||||
</form>
|
||||
</div>
|
||||
77
Aaru.Server.Old/Areas/Admin/Views/Atas/Index.cshtml
Normal file
77
Aaru.Server.Old/Areas/Admin/Views/Atas/Index.cshtml
Normal file
@@ -0,0 +1,77 @@
|
||||
@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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>ATA IDENTIFY DEVICE responses</h4>
|
||||
<div>
|
||||
<a asp-action="CheckPrivate" class="btn btn-primary">Check private fields</a>
|
||||
<a asp-action="Consolidate" class="btn btn-danger">Consolidate duplicates</a>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Id)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.Model)
|
||||
</th>
|
||||
<th>
|
||||
Firmware revision
|
||||
</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.FirmwareRevision)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,68 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.BlockDescriptor>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Block descriptors</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Density)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Blocks)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BlockLength)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(BlockDescriptor item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Density)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Blocks)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BlockLength)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
32
Aaru.Server.Old/Areas/Admin/Views/Chs/Consolidate.cshtml
Normal file
32
Aaru.Server.Old/Areas/Admin/Views/Chs/Consolidate.cshtml
Normal file
@@ -0,0 +1,32 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.ChsModelForView
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Consolidate duplicate CHS";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<h2>Consolidate duplicate CHS</h2>
|
||||
<div>
|
||||
The following CHS have duplicates.
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tbody>
|
||||
@foreach(ChsModel item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Cylinders)/@Html.DisplayFor(modelItem => item.Heads)/@Html.DisplayFor(modelItem => item.Sectors)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
Do you want to remove the duplicates?
|
||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||
<input asp-for="Json" name="models" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||
</form>
|
||||
</div>
|
||||
70
Aaru.Server.Old/Areas/Admin/Views/Chs/Index.cshtml
Normal file
70
Aaru.Server.Old/Areas/Admin/Views/Chs/Index.cshtml
Normal file
@@ -0,0 +1,70 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Chs>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<a asp-action="Consolidate" class="btn btn-danger">Consolidate duplicates</a>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Cylinders)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Heads)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Sectors)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Chs item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Cylinders)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Heads)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Sectors)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
63
Aaru.Server.Old/Areas/Admin/Views/Commands/Index.cshtml
Normal file
63
Aaru.Server.Old/Areas/Admin/Views/Commands/Index.cshtml
Normal file
@@ -0,0 +1,63 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.Command>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Commands</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Command item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,89 @@
|
||||
@model Aaru.Server.Database.Models.CompactDiscOffset
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Compact disc offset</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AddedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ModifiedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ModifiedWhen)
|
||||
</dd>
|
||||
<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.Offset)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Offset)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Submissions)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Submissions)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Agreement)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Agreement)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,74 @@
|
||||
@model Aaru.Server.Database.Models.CompactDiscOffset
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Compact disc offset</h4>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control"/>
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Model" class="control-label"></label>
|
||||
<input asp-for="Model" class="form-control"/>
|
||||
<span asp-validation-for="Model" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Offset" class="control-label"></label>
|
||||
<input asp-for="Offset" class="form-control"/>
|
||||
<span asp-validation-for="Offset" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Submissions" class="control-label"></label>
|
||||
<input asp-for="Submissions" class="form-control"/>
|
||||
<span asp-validation-for="Submissions" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Agreement" class="control-label"></label>
|
||||
<input asp-for="Agreement" class="form-control"/>
|
||||
<span asp-validation-for="Agreement" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,107 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.CompactDiscOffset>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<a asp-action="Update" class="btn btn-primary">Update from AccurateRip</a>
|
||||
<h4>Compact Disc offsets</h4>
|
||||
<table class="table" id="tblOffsets">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Offset)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Submissions)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Agreement)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ModifiedWhen)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(CompactDiscOffset item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Offset)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Submissions)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Agreement)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AddedWhen)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ModifiedWhen)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@section scripts{
|
||||
<script crossorigin="anonymous" integrity="sha256-L4cf7m/cgC51e7BFPxQcKZcXryzSju7VYBKJLOKPHvQ=" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
|
||||
<script language="javascript">
|
||||
$(document).ready(function() {
|
||||
$('#tblOffsets').DataTable();
|
||||
} );
|
||||
</script>
|
||||
}
|
||||
71
Aaru.Server.Old/Areas/Admin/Views/DeviceStats/Delete.cshtml
Normal file
71
Aaru.Server.Old/Areas/Admin/Views/DeviceStats/Delete.cshtml
Normal file
@@ -0,0 +1,71 @@
|
||||
@model Aaru.Server.Database.Models.DeviceStat
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Device statistic</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>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
69
Aaru.Server.Old/Areas/Admin/Views/DeviceStats/Edit.cshtml
Normal file
69
Aaru.Server.Old/Areas/Admin/Views/DeviceStats/Edit.cshtml
Normal file
@@ -0,0 +1,69 @@
|
||||
@model Aaru.Server.Database.Models.DeviceStat
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Device statistic</h4>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control"/>
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Model" class="control-label"></label>
|
||||
<input asp-for="Model" class="form-control"/>
|
||||
<span asp-validation-for="Model" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Revision" class="control-label"></label>
|
||||
<input asp-for="Revision" class="form-control"/>
|
||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Bus" class="control-label"></label>
|
||||
<input asp-for="Bus" class="form-control"/>
|
||||
<span asp-validation-for="Bus" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
94
Aaru.Server.Old/Areas/Admin/Views/DeviceStats/Index.cshtml
Normal file
94
Aaru.Server.Old/Areas/Admin/Views/DeviceStats/Index.cshtml
Normal file
@@ -0,0 +1,94 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.DeviceStat>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Device statistics</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bus)
|
||||
</th>
|
||||
<th>
|
||||
Has report?
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(DeviceStat item in Model)
|
||||
{
|
||||
<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.Bus)
|
||||
</td>
|
||||
<td>
|
||||
@if(item.Report is null)
|
||||
{
|
||||
@("No")
|
||||
|
||||
<a asp-action="Find" asp-controller="Devices" asp-route-bus="@item.Bus" asp-route-id="@item.Id" asp-route-manufacturer="@item.Manufacturer" asp-route-model="@item.Model" asp-route-revision="@item.Revision" target="_blank">(Find)</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-action="Details" asp-controller="Devices" asp-route-id="@item.Report.Id" target="_blank">Yes</a>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
101
Aaru.Server.Old/Areas/Admin/Views/Devices/Delete.cshtml
Normal file
101
Aaru.Server.Old/Areas/Admin/Views/Devices/Delete.cshtml
Normal file
@@ -0,0 +1,101 @@
|
||||
@model Aaru.Server.Database.Models.Device
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Device report</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AddedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ModifiedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ModifiedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.OptimalMultipleSectorsRead)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadGdRomUsingSwapDisc)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadGdRomUsingSwapDisc)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CompactFlash)
|
||||
</dd>
|
||||
<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.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
490
Aaru.Server.Old/Areas/Admin/Views/Devices/Details.cshtml
Normal file
490
Aaru.Server.Old/Areas/Admin/Views/Devices/Details.cshtml
Normal file
@@ -0,0 +1,490 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.DeviceDetails
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>Device report</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.AddedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.AddedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.ModifiedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.ModifiedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Manufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Manufacturer)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Model)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Model)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Revision)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Revision)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.CompactFlash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.CompactFlash)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.OptimalMultipleSectorsRead)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.OptimalMultipleSectorsRead)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.CanReadGdRomUsingSwapDisc)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.CanReadGdRomUsingSwapDisc)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Type)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Report.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@if(Model.ReadCapabilitiesId != 0)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="TestedMedias" asp-route-id="@Model.ReadCapabilitiesId" target="_blank">Read capabilities</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.ATA != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Atas" asp-route-id="@Model.Report.ATA.Id" target="_blank">ATA report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.ATAPI != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Atas" asp-route-id="@Model.Report.ATAPI.Id" target="_blank">ATAPI report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.SCSI != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Scsis" asp-route-id="@Model.Report.SCSI.Id" target="_blank">SCSI report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.MultiMediaCard != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="MmcSds" asp-route-id="@Model.Report.MultiMediaCard.Id" target="_blank">MultiMediaCard report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.SecureDigital != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="MmcSds" asp-route-id="@Model.Report.SecureDigital.Id" target="_blank">SecureDigital report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.USB != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Usbs" asp-route-id="@Model.Report.USB.Id" target="_blank">USB report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.GdRomSwapDiscCapabilitiesId != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="GdRomSwapDiscCapabilities" asp-route-id="@Model.Report.GdRomSwapDiscCapabilitiesId" target="_blank">GD-ROM swap-trick capabilities report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.FireWire != null)
|
||||
{
|
||||
<div>
|
||||
Has a FireWire report.
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.PCMCIA != null)
|
||||
{
|
||||
<div>
|
||||
Has a PCMCIA report.
|
||||
</div>
|
||||
}
|
||||
@if(Model.SameAll.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Other device reports with same manufacturer, model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.SameAll)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="Merge" asp-route-master="@Model.Report.Id" asp-route-slave="@item" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.SameButManufacturer.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Other device reports with same model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.SameButManufacturer)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="Merge" asp-route-master="@Model.Report.Id" asp-route-slave="@item" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.ReportAll.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Uploaded reports with same manufacturer, model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.ReportAll)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-controller="Reports" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="MergeReports" asp-route-deviceId="@Model.Report.Id" asp-route-reportId="@item" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.ReportButManufacturer.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Device reports with same model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.ReportButManufacturer)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-controller="Reports" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="MergeReports" asp-route-deviceId="@Model.Report.Id" asp-route-reportId="@item" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.StatsAll.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Device statistics with same manufacturer, model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsAll[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsAll[0].Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsAll[0].Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsAll[0].Bus)
|
||||
</th>
|
||||
<th>
|
||||
Has a linked report?
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(DeviceStat item in Model.StatsAll)
|
||||
{
|
||||
<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.Bus)
|
||||
</td>
|
||||
<td>
|
||||
@if(item.Report is null)
|
||||
{
|
||||
@("No")
|
||||
}
|
||||
else
|
||||
{
|
||||
@if(item.Report.Id == Model.Report.Id)
|
||||
{
|
||||
@("Us")
|
||||
}
|
||||
else
|
||||
{
|
||||
@("Yes")
|
||||
}
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="LinkReports" asp-route-deviceId="@Model.Report.Id" asp-route-statsId="@item.Id" class="btn btn-secondary">Link</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.StatsButManufacturer.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Device statistics with same model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsButManufacturer[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsButManufacturer[0].Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsButManufacturer[0].Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StatsButManufacturer[0].Bus)
|
||||
</th>
|
||||
<th>
|
||||
Has a linked report?
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(DeviceStat item in Model.StatsButManufacturer)
|
||||
{
|
||||
<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.Bus)
|
||||
</td>
|
||||
<td>
|
||||
@if(item.Report is null)
|
||||
{
|
||||
@("No")
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-action="Details" asp-route-id="@item.Report.Id" target="_blank">Yes</a>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="LinkReports" asp-route-deviceId="@Model.Report.Id" asp-route-statsId="@item.Id" class="btn btn-secondary">Link</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.TestedMedias.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Tested media:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedMedias[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedMedias[0].Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedMedias[0].MediumTypeName)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(TestedMedia item in Model.TestedMedias)
|
||||
{
|
||||
<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-action="Details" asp-controller="TestedMedias" asp-route-id="@item.Id" class="btn btn-secondary" target="_blank">Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</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(TestedSequentialMedia 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-action="Delete" asp-controller="TestedSequentialMedias" asp-route-id="@item.Id" class="btn btn-danger" target="_blank">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
85
Aaru.Server.Old/Areas/Admin/Views/Devices/Edit.cshtml
Normal file
85
Aaru.Server.Old/Areas/Admin/Views/Devices/Edit.cshtml
Normal file
@@ -0,0 +1,85 @@
|
||||
@using Aaru.CommonTypes.Enums
|
||||
@model Aaru.Server.Database.Models.Device
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Device report</h4>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control"/>
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Model" class="control-label"></label>
|
||||
<input asp-for="Model" class="form-control"/>
|
||||
<span asp-validation-for="Model" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Revision" class="control-label"></label>
|
||||
<input asp-for="Revision" class="form-control"/>
|
||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input asp-for="CompactFlash" class="form-check-input"/> @Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OptimalMultipleSectorsRead" class="control-label"></label>
|
||||
<input asp-for="OptimalMultipleSectorsRead" class="form-control"/>
|
||||
<span asp-validation-for="OptimalMultipleSectorsRead" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="CanReadGdRomUsingSwapDisc" class="control-label"></label>
|
||||
<input asp-for="CanReadGdRomUsingSwapDisc" class="form-control"/>
|
||||
<span asp-validation-for="CanReadGdRomUsingSwapDisc" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label"></label>
|
||||
<select asp-for="Type" asp-items="Html.GetEnumSelectList<DeviceType>()" class="form-control"></select>
|
||||
<span asp-validation-for="Type" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
120
Aaru.Server.Old/Areas/Admin/Views/Devices/Find.cshtml
Normal file
120
Aaru.Server.Old/Areas/Admin/Views/Devices/Find.cshtml
Normal file
@@ -0,0 +1,120 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.FindReportModel
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Find.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<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(Device 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-deviceId="@item.Id" asp-route-statsId="@Model.Id" class="btn btn-secondary">Link</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
98
Aaru.Server.Old/Areas/Admin/Views/Devices/Index.cshtml
Normal file
98
Aaru.Server.Old/Areas/Admin/Views/Devices/Index.cshtml
Normal file
@@ -0,0 +1,98 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.Device>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Device reports</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadGdRomUsingSwapDisc)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Device item in Model)
|
||||
{
|
||||
<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.OptimalMultipleSectorsRead)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadGdRomUsingSwapDisc)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Type)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
62
Aaru.Server.Old/Areas/Admin/Views/Filesystems/Index.cshtml
Normal file
62
Aaru.Server.Old/Areas/Admin/Views/Filesystems/Index.cshtml
Normal file
@@ -0,0 +1,62 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.Filesystem>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Filesystems</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Filesystem item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
62
Aaru.Server.Old/Areas/Admin/Views/Filters/Index.cshtml
Normal file
62
Aaru.Server.Old/Areas/Admin/Views/Filters/Index.cshtml
Normal file
@@ -0,0 +1,62 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.Filter>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Filters</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Filter item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,62 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.FireWireModelForView
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Consolidate duplicate FireWire";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<h2>Consolidate duplicate FireWire</h2>
|
||||
<div>
|
||||
The following FireWire have duplicates.
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].Product)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].VendorID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].ProductID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].RemovableMedia)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(FireWireModel item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Product)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.VendorID)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductID)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.RemovableMedia)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
Do you want to remove the duplicates?
|
||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||
<input asp-for="Json" name="models" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||
</form>
|
||||
</div>
|
||||
77
Aaru.Server.Old/Areas/Admin/Views/FireWires/Delete.cshtml
Normal file
77
Aaru.Server.Old/Areas/Admin/Views/FireWires/Delete.cshtml
Normal file
@@ -0,0 +1,77 @@
|
||||
@model Aaru.CommonTypes.Metadata.FireWire
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>FireWire registers</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.VendorID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.VendorID)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ProductID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ProductID)
|
||||
</dd>
|
||||
<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.Product)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Product)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.RemovableMedia)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
74
Aaru.Server.Old/Areas/Admin/Views/FireWires/Edit.cshtml
Normal file
74
Aaru.Server.Old/Areas/Admin/Views/FireWires/Edit.cshtml
Normal file
@@ -0,0 +1,74 @@
|
||||
@model Aaru.CommonTypes.Metadata.FireWire
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>FireWire registers</h4>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<div class="form-group">
|
||||
<label asp-for="VendorID" class="control-label"></label>
|
||||
<input asp-for="VendorID" class="form-control"/>
|
||||
<span asp-validation-for="VendorID" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ProductID" class="control-label"></label>
|
||||
<input asp-for="ProductID" class="form-control"/>
|
||||
<span asp-validation-for="ProductID" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control"/>
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Product" class="control-label"></label>
|
||||
<input asp-for="Product" class="form-control"/>
|
||||
<span asp-validation-for="Product" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input asp-for="RemovableMedia" class="form-check-input"/> @Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
86
Aaru.Server.Old/Areas/Admin/Views/FireWires/Index.cshtml
Normal file
86
Aaru.Server.Old/Areas/Admin/Views/FireWires/Index.cshtml
Normal file
@@ -0,0 +1,86 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.FireWire>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<a asp-action="Consolidate" class="btn btn-primary">Consolidate</a>
|
||||
<h4>FireWire registers</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Product)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.VendorID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(FireWire item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Product)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.VendorID)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductID)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.RemovableMedia)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
@model Aaru.Server.Database.Models.TestedMediaDataModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"{Model.DataName} data";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<h2>Showing data from @Model.DataName for GD-ROM capabilities id @Model.TestedMediaId</h2>
|
||||
@if(Model.Decoded is null && Model.RawDataAsHex is null)
|
||||
{
|
||||
<div>No data found</div>
|
||||
}
|
||||
|
||||
@if(Model.RawDataAsHex != null)
|
||||
{
|
||||
<h4>Hex dump:</h4>
|
||||
<div>
|
||||
<code style="white-space: pre">@Html.Raw(Model.RawDataAsHex)</code>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(Model.Decoded != null)
|
||||
{
|
||||
<h4>Decoded information:</h4>
|
||||
<div>
|
||||
@Html.Raw(Model.Decoded)
|
||||
</div>
|
||||
}
|
||||
97
Aaru.Server.Old/Areas/Admin/Views/Home/Index.cshtml
Normal file
97
Aaru.Server.Old/Areas/Admin/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,97 @@
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<a asp-action="Index" asp-controller="Atas">ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE responses</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="BlockDescriptors">SCSI Streaming Devices Block Descriptors</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Chs">Cylinders / Heads / Sectors triplets</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Commands">Commands used</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="CompactDiscOffsets">Compact Disc Offsets</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Devices">Device reports</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="DeviceStats">Device statistics</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Filesystems">Filesystems detected</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Filters">Filters detected</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="FireWires">FireWire devices reported</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="MediaFormats">Media image formats detected</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Medias">Media types detected</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Medias" asp-route-real="true">Media types detected in real devices</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Medias" asp-route-real="false">Media types detected in images</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Mmc">MODE SENSE page 2Ah responses</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="MmcFeatures">MMC GET FEATURES responses</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="MmcSds">MultiMediaCard / SecureDigital registers</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="OperatingSystems">Operating systems detected</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Partitions">Partitioning schemes detected</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Pcmcias">PCMCIA card registers</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Reports">Uploaded reports</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="ScsiModes">SCSI MODE SENSE responses</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="ScsiPages">SCSI MODE SENSE pages</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Scsis">SCSI INQUIRY responses</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Sscs">SCSI STREAMING COMMANDS limits</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="SupportedDensities">SCSI supported densities</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="TestedMedias">Tested media</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="TestedSequentialMedias">Tested media on SCSI streaming devices</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Usbs">USB devices</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="UsbProducts">USB products</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="UsbVendors">USB vendors</a>
|
||||
<br/>
|
||||
<a asp-action="Index" asp-controller="Versions">Aaru versions used</a>
|
||||
<br/>
|
||||
59
Aaru.Server.Old/Areas/Admin/Views/MediaFormats/Delete.cshtml
Normal file
59
Aaru.Server.Old/Areas/Admin/Views/MediaFormats/Delete.cshtml
Normal file
@@ -0,0 +1,59 @@
|
||||
@model Aaru.Server.Database.Models.MediaFormat
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Media image format</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Count)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
66
Aaru.Server.Old/Areas/Admin/Views/MediaFormats/Index.cshtml
Normal file
66
Aaru.Server.Old/Areas/Admin/Views/MediaFormats/Index.cshtml
Normal file
@@ -0,0 +1,66 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.MediaFormat>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Media image formats</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(MediaFormat item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
65
Aaru.Server.Old/Areas/Admin/Views/Medias/Delete.cshtml
Normal file
65
Aaru.Server.Old/Areas/Admin/Views/Medias/Delete.cshtml
Normal file
@@ -0,0 +1,65 @@
|
||||
@model Aaru.Server.Database.Models.Media
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Media</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Real)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Real)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Count)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
78
Aaru.Server.Old/Areas/Admin/Views/Medias/Index.cshtml
Normal file
78
Aaru.Server.Old/Areas/Admin/Views/Medias/Index.cshtml
Normal file
@@ -0,0 +1,78 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.Media>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Medias</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PhysicalType)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LogicalType)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Real)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Media item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PhysicalType)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LogicalType)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Real)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
48
Aaru.Server.Old/Areas/Admin/Views/Mmc/Delete.cshtml
Normal file
48
Aaru.Server.Old/Areas/Admin/Views/Mmc/Delete.cshtml
Normal file
@@ -0,0 +1,48 @@
|
||||
@using Aaru.Decoders.SCSI
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.Mmc
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>SCSI CD-ROM capabilities page - ID = @Model.Id</h4>
|
||||
<hr/>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
45
Aaru.Server.Old/Areas/Admin/Views/Mmc/Details.cshtml
Normal file
45
Aaru.Server.Old/Areas/Admin/Views/Mmc/Details.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
@using Aaru.Decoders.SCSI
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.Mmc
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>SCSI CD-ROM capabilities page - ID = @Model.Id</h4>
|
||||
<hr/>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
81
Aaru.Server.Old/Areas/Admin/Views/Mmc/Index.cshtml
Normal file
81
Aaru.Server.Old/Areas/Admin/Views/Mmc/Index.cshtml
Normal file
@@ -0,0 +1,81 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.MmcModelForView>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<a asp-action="Clean" class="btn btn-danger">Clean</a>
|
||||
<h4>SCSI CD-ROM capabilities pages</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Id)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FeaturesId)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DataLength)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(MmcModelForView item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
</td>
|
||||
<td>
|
||||
@if(item.FeaturesId != null)
|
||||
{
|
||||
<a asp-action="details" asp-controller="MmcFeatures" asp-route-id="@item.FeaturesId" target="_blank">@Html.DisplayFor(modelItem => item.FeaturesId)</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.DisplayFor(modelItem => item.FeaturesId)
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DataLength)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
782
Aaru.Server.Old/Areas/Admin/Views/MmcFeatures/Details.cshtml
Normal file
782
Aaru.Server.Old/Areas/Admin/Views/MmcFeatures/Details.cshtml
Normal file
@@ -0,0 +1,782 @@
|
||||
@model Aaru.CommonTypes.Metadata.MmcFeatures
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>MMC FEATURES</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AACSVersion)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AACSVersion)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AGIDs)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AGIDs)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BindingNonceBlocks)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BindingNonceBlocks)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BlocksPerReadableUnit)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BlocksPerReadableUnit)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BufferUnderrunFreeInDVD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BufferUnderrunFreeInDVD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BufferUnderrunFreeInSAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BufferUnderrunFreeInSAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BufferUnderrunFreeInTAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BufferUnderrunFreeInTAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanAudioScan)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanAudioScan)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanEject)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanEject)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanEraseSector)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanEraseSector)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanExpandBDRESpareArea)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanExpandBDRESpareArea)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanFormat)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanFormat)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanFormatBDREWithoutSpare)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanFormatBDREWithoutSpare)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanFormatCert)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanFormatCert)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanFormatFRF)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanFormatFRF)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanFormatQCert)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanFormatQCert)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanFormatRRM)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanFormatRRM)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanGenerateBindingNonce)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanGenerateBindingNonce)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanLoad)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanLoad)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanMuteSeparateChannels)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanMuteSeparateChannels)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanOverwriteSAOTrack)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanOverwriteSAOTrack)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanOverwriteTAOTrack)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanOverwriteTAOTrack)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanPlayCDAudio)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanPlayCDAudio)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanPseudoOverwriteBDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanPseudoOverwriteBDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadAllDualR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadAllDualR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadAllDualRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadAllDualRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadBD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadBD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadBDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadBDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadBDRE1)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadBDRE1)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadBDRE2)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadBDRE2)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadBDROM)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadBDROM)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadBluBCA)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadBluBCA)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadCD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadCD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadCDMRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadCDMRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadCPRM_MKB)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadCPRM_MKB)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDDCD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDDCD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDVD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDVD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusMRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDVDPlusMRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDVDPlusR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusRDL)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDVDPlusRDL)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDVDPlusRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusRWDL)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDVDPlusRWDL)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadDriveAACSCertificate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadDriveAACSCertificate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadHDDVD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadHDDVD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadHDDVDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadHDDVDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadHDDVDRAM)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadHDDVDRAM)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadLeadInCDText)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadLeadInCDText)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadOldBDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadOldBDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadOldBDRE)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadOldBDRE)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadOldBDROM)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadOldBDROM)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReadSpareAreaInformation)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReadSpareAreaInformation)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReportDriveSerial)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReportDriveSerial)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanReportMediaSerial)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanReportMediaSerial)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteDDCDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanTestWriteDDCDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteDVD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanTestWriteDVD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteInSAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanTestWriteInSAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteInTAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanTestWriteInTAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanUpgradeFirmware)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanUpgradeFirmware)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteBD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteBD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteBDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteBDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteBDRE1)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteBDRE1)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteBDRE2)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteBDRE2)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteBusEncryptedBlocks)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteBusEncryptedBlocks)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDMRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteCDMRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteCDRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDRWCAV)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteCDRWCAV)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDSAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteCDSAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDTAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteCDTAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteCSSManagedDVD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteCSSManagedDVD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDDCDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDDCDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDDCDRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDDCDRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusMRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDPlusMRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDPlusR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusRDL)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDPlusRDL)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDPlusRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusRWDL)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDPlusRWDL)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDRDL)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDRDL)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDRW)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteDVDRW)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteHDDVDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteHDDVDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteHDDVDRAM)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteHDDVDRAM)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteOldBDR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteOldBDR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteOldBDRE)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteOldBDRE)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWritePackedSubchannelInTAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWritePackedSubchannelInTAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteRWSubchannelInSAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteRWSubchannelInSAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteRWSubchannelInTAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteRWSubchannelInTAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteRaw)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteRaw)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteRawMultiSession)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteRawMultiSession)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CanWriteRawSubchannelInTAO)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CanWriteRawSubchannelInTAO)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ChangerIsSideChangeCapable)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ChangerIsSideChangeCapable)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ChangerSlots)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ChangerSlots)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ChangerSupportsDiscPresent)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ChangerSupportsDiscPresent)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CPRMVersion)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CPRMVersion)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSSVersion)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CSSVersion)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.DBML)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.DBML)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.DVDMultiRead)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.DVDMultiRead)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.EmbeddedChanger)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.EmbeddedChanger)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ErrorRecoveryPage)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ErrorRecoveryPage)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.FirmwareDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.FirmwareDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LoadingMechanismType)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LoadingMechanismType)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Locked)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Locked)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LogicalBlockSize)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LogicalBlockSize)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.MultiRead)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.MultiRead)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.PhysicalInterfaceStandardNumber)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.PhysicalInterfaceStandardNumber)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.PreventJumper)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.PreventJumper)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsAACS)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsAACS)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsBusEncryption)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsBusEncryption)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsC2)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsC2)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsCPRM)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsCPRM)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsCSS)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsCSS)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsDAP)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsDAP)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsDeviceBusyEvent)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsDeviceBusyEvent)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsHybridDiscs)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsHybridDiscs)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsModePage1Ch)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsModePage1Ch)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsOSSC)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsOSSC)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsPWP)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsPWP)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsSWPP)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsSWPP)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsSecurDisc)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsSecurDisc)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsSeparateVolume)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsSeparateVolume)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsVCPS)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsVCPS)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsWriteInhibitDCB)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsWriteInhibitDCB)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SupportsWriteProtectPAC)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SupportsWriteProtectPAC)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.VolumeLevels)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.VolumeLevels)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
792
Aaru.Server.Old/Areas/Admin/Views/MmcFeatures/Index.cshtml
Normal file
792
Aaru.Server.Old/Areas/Admin/Views/MmcFeatures/Index.cshtml
Normal file
@@ -0,0 +1,792 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.MmcFeatures>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>MMC FEATURES</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.AACSVersion)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.AGIDs)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BindingNonceBlocks)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BlocksPerReadableUnit)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BufferUnderrunFreeInDVD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BufferUnderrunFreeInSAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BufferUnderrunFreeInTAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanAudioScan)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanEject)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanEraseSector)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanExpandBDRESpareArea)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanFormat)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanFormatBDREWithoutSpare)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanFormatCert)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanFormatFRF)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanFormatQCert)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanFormatRRM)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanGenerateBindingNonce)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanLoad)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanMuteSeparateChannels)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanOverwriteSAOTrack)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanOverwriteTAOTrack)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanPlayCDAudio)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanPseudoOverwriteBDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadAllDualR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadAllDualRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadBD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadBDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadBDRE1)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadBDRE2)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadBDROM)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadBluBCA)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadCD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadCDMRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadCPRM_MKB)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDDCD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDVD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusMRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusRDL)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDVDPlusRWDL)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadDriveAACSCertificate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadHDDVD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadHDDVDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadHDDVDRAM)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadLeadInCDText)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadOldBDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadOldBDRE)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadOldBDROM)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReadSpareAreaInformation)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReportDriveSerial)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanReportMediaSerial)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteDDCDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteDVD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteInSAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanTestWriteInTAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanUpgradeFirmware)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteBD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteBDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteBDRE1)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteBDRE2)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteBusEncryptedBlocks)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDMRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDRWCAV)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDSAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteCDTAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteCSSManagedDVD)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDDCDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDDCDRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusMRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusRDL)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDPlusRWDL)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDRDL)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteDVDRW)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteHDDVDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteHDDVDRAM)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteOldBDR)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteOldBDRE)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWritePackedSubchannelInTAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteRWSubchannelInSAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteRWSubchannelInTAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteRaw)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteRawMultiSession)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CanWriteRawSubchannelInTAO)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ChangerIsSideChangeCapable)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ChangerSlots)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ChangerSupportsDiscPresent)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CPRMVersion)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CSSVersion)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DBML)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DVDMultiRead)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.EmbeddedChanger)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ErrorRecoveryPage)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirmwareDate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LoadingMechanismType)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Locked)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LogicalBlockSize)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.MultiRead)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PhysicalInterfaceStandardNumber)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PreventJumper)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsAACS)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsBusEncryption)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsC2)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsCPRM)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsCSS)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsDAP)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsDeviceBusyEvent)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsHybridDiscs)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsModePage1Ch)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsOSSC)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsPWP)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsSWPP)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsSecurDisc)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsSeparateVolume)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsVCPS)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsWriteInhibitDCB)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsWriteProtectPAC)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.VolumeLevels)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(MmcFeatures item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AACSVersion)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AGIDs)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BindingNonceBlocks)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BlocksPerReadableUnit)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BufferUnderrunFreeInDVD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BufferUnderrunFreeInSAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BufferUnderrunFreeInTAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanAudioScan)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanEject)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanEraseSector)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanExpandBDRESpareArea)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanFormat)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanFormatBDREWithoutSpare)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanFormatCert)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanFormatFRF)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanFormatQCert)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanFormatRRM)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanGenerateBindingNonce)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanLoad)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanMuteSeparateChannels)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanOverwriteSAOTrack)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanOverwriteTAOTrack)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanPlayCDAudio)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanPseudoOverwriteBDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadAllDualR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadAllDualRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadBD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadBDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadBDRE1)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadBDRE2)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadBDROM)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadBluBCA)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadCD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadCDMRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadCPRM_MKB)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDDCD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDVD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDVDPlusMRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDVDPlusR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDVDPlusRDL)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDVDPlusRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDVDPlusRWDL)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadDriveAACSCertificate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadHDDVD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadHDDVDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadHDDVDRAM)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadLeadInCDText)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadOldBDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadOldBDRE)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadOldBDROM)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReadSpareAreaInformation)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReportDriveSerial)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanReportMediaSerial)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanTestWriteDDCDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanTestWriteDVD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanTestWriteInSAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanTestWriteInTAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanUpgradeFirmware)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteBD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteBDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteBDRE1)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteBDRE2)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteBusEncryptedBlocks)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteCDMRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteCDRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteCDRWCAV)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteCDSAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteCDTAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteCSSManagedDVD)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDDCDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDDCDRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDPlusMRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDPlusR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDPlusRDL)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDPlusRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDPlusRWDL)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDRDL)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteDVDRW)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteHDDVDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteHDDVDRAM)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteOldBDR)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteOldBDRE)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWritePackedSubchannelInTAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteRWSubchannelInSAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteRWSubchannelInTAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteRaw)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteRawMultiSession)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanWriteRawSubchannelInTAO)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ChangerIsSideChangeCapable)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ChangerSlots)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ChangerSupportsDiscPresent)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CPRMVersion)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CSSVersion)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DBML)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DVDMultiRead)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EmbeddedChanger)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ErrorRecoveryPage)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.FirmwareDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LoadingMechanismType)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Locked)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LogicalBlockSize)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MultiRead)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PhysicalInterfaceStandardNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PreventJumper)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsAACS)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsBusEncryption)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsC2)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsCPRM)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsCSS)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsDAP)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsDeviceBusyEvent)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsHybridDiscs)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsModePage1Ch)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsOSSC)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsPWP)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsSWPP)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsSecurDisc)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsSeparateVolume)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsVCPS)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsWriteInhibitDCB)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsWriteProtectPAC)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.VolumeLevels)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
130
Aaru.Server.Old/Areas/Admin/Views/MmcSds/Delete.cshtml
Normal file
130
Aaru.Server.Old/Areas/Admin/Views/MmcSds/Delete.cshtml
Normal file
@@ -0,0 +1,130 @@
|
||||
@using Aaru.Decoders.SecureDigital
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.MmcSd
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>MultiMediaCard / SecureDigital registers</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
@if(Model.SCR != null)
|
||||
{
|
||||
if(Model.CID != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCID(Model.CID)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.CSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCSD(Model.CSD)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.OCR != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyOCR(Model.OCR)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifySCR(Model.SCR)))
|
||||
</dd>
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Model.CID != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyCID(Model.CID)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.CSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyCSD(Model.CSD)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.OCR != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyOCR(Model.OCR)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.ExtendedCSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExtendedCSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyExtendedCSD(Model.ExtendedCSD)))
|
||||
</dd>
|
||||
}
|
||||
}
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
127
Aaru.Server.Old/Areas/Admin/Views/MmcSds/Details.cshtml
Normal file
127
Aaru.Server.Old/Areas/Admin/Views/MmcSds/Details.cshtml
Normal file
@@ -0,0 +1,127 @@
|
||||
@using Aaru.Decoders.SecureDigital
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.MmcSd
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>MultiMediaCard / SecureDigital registers</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
@if(Model.SCR != null)
|
||||
{
|
||||
if(Model.CID != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCID(Model.CID)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.CSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCSD(Model.CSD)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.OCR != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyOCR(Model.OCR)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifySCR(Model.SCR)))
|
||||
</dd>
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Model.CID != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyCID(Model.CID)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.CSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyCSD(Model.CSD)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.OCR != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyOCR(Model.OCR)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if(Model.ExtendedCSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExtendedCSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Aaru.Decoders.MMC.Decoders.PrettifyExtendedCSD(Model.ExtendedCSD)))
|
||||
</dd>
|
||||
}
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
61
Aaru.Server.Old/Areas/Admin/Views/MmcSds/Index.cshtml
Normal file
61
Aaru.Server.Old/Areas/Admin/Views/MmcSds/Index.cshtml
Normal file
@@ -0,0 +1,61 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.MmcSd>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>MultiMediaCard / SecureDigital registers</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Id)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(MmcSd item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,68 @@
|
||||
@using OperatingSystem = Aaru.Server.Old.Database.Models.OperatingSystem
|
||||
@model IEnumerable<OperatingSystem>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Operating systems</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Version)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(OperatingSystem item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Version)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
62
Aaru.Server.Old/Areas/Admin/Views/Partitions/Index.cshtml
Normal file
62
Aaru.Server.Old/Areas/Admin/Views/Partitions/Index.cshtml
Normal file
@@ -0,0 +1,62 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.Partition>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Partitioning schemes</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Partition item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Count)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
83
Aaru.Server.Old/Areas/Admin/Views/Pcmcias/Delete.cshtml
Normal file
83
Aaru.Server.Old/Areas/Admin/Views/Pcmcias/Delete.cshtml
Normal file
@@ -0,0 +1,83 @@
|
||||
@model Aaru.CommonTypes.Metadata.Pcmcia
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>PCMCIA data</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CIS)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CIS)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Compliance)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Compliance)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ManufacturerCode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ManufacturerCode)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CardCode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CardCode)
|
||||
</dd>
|
||||
<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.ProductName)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ProductName)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
90
Aaru.Server.Old/Areas/Admin/Views/Pcmcias/Index.cshtml
Normal file
90
Aaru.Server.Old/Areas/Admin/Views/Pcmcias/Index.cshtml
Normal file
@@ -0,0 +1,90 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Pcmcia>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>PCMCIA data</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CIS)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Compliance)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ManufacturerCode)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CardCode)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductName)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Pcmcia item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CIS)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Compliance)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ManufacturerCode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CardCode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ProductName)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
53
Aaru.Server.Old/Areas/Admin/Views/Reports/Delete.cshtml
Normal file
53
Aaru.Server.Old/Areas/Admin/Views/Reports/Delete.cshtml
Normal file
@@ -0,0 +1,53 @@
|
||||
@model Aaru.Server.Database.Models.UploadedReport
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Uploaded report</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.UploadedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.UploadedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CompactFlash)
|
||||
</dd>
|
||||
<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.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
315
Aaru.Server.Old/Areas/Admin/Views/Reports/Details.cshtml
Normal file
315
Aaru.Server.Old/Areas/Admin/Views/Reports/Details.cshtml
Normal file
@@ -0,0 +1,315 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model Aaru.Server.Database.Models.UploadedReportDetails
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<div>
|
||||
<h4>Uploaded report</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.UploadedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.UploadedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Manufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Manufacturer)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Model)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Model)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Revision)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Revision)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.CompactFlash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.CompactFlash)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Report.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Report.Type)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Report.Id" class="btn btn-primary">Edit</a>
|
||||
<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-action="Details" asp-controller="TestedMedias" asp-route-id="@Model.ReadCapabilitiesId" target="_blank">Read capabilities</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.ATA != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Atas" asp-route-id="@Model.Report.ATA.Id" target="_blank">ATA report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.ATAPI != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Atas" asp-route-id="@Model.Report.ATAPI.Id" target="_blank">ATAPI report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.SCSI != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Scsis" asp-route-id="@Model.Report.SCSI.Id" target="_blank">SCSI report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.MultiMediaCard != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="MmcSds" asp-route-id="@Model.Report.MultiMediaCard.Id" target="_blank">MultiMediaCard report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.SecureDigital != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="MmcSds" asp-route-id="@Model.Report.SecureDigital.Id" target="_blank">SecureDigital report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.USB != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="Usbs" asp-route-id="@Model.Report.USB.Id" target="_blank">USB report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.GdRomSwapDiscCapabilitiesId != null)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="Details" asp-controller="GdRomSwapDiscCapabilities" asp-route-id="@Model.Report.GdRomSwapDiscCapabilitiesId" target="_blank">GD-ROM swap-trick capabilities report</a>
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.FireWire != null)
|
||||
{
|
||||
<div>
|
||||
Has a FireWire report.
|
||||
</div>
|
||||
}
|
||||
@if(Model.Report.PCMCIA != null)
|
||||
{
|
||||
<div>
|
||||
Has a PCMCIA report.
|
||||
</div>
|
||||
}
|
||||
@if(Model.SameAll.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Other uploaded reports with same manufacturer, model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.SameAll)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="Merge" asp-route-master="@Model.Report.Id" asp-route-slave="@item" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.SameButManufacturer.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Other uploaded reports with same model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.SameButManufacturer)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="Merge" asp-route-master="@Model.Report.Id" asp-route-slave="@item" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.ReportAll.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Device reports with same manufacturer, model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.ReportAll)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-controller="Devices" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="MergeReports" asp-controller="Devices" asp-route-deviceId="@item" asp-route-reportId="@Model.Report.Id" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.ReportButManufacturer.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Device reports with same model and revision:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(int item in Model.ReportButManufacturer)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-controller="Devices" asp-route-id="@item" class="btn btn-primary" target="_blank">Details</a>
|
||||
<a asp-action="MergeReports" asp-controller="Devices" asp-route-deviceId="@item" asp-route-reportId="@Model.Report.Id" class="btn btn-secondary">Merge</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if(Model.TestedMedias.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<h4>Tested media:</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedMedias[0].Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedMedias[0].Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TestedMedias[0].MediumTypeName)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(TestedMedia item in Model.TestedMedias)
|
||||
{
|
||||
<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-action="Details" asp-controller="TestedMedias" asp-route-id="@item.Id" class="btn btn-secondary" target="_blank">Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</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(TestedSequentialMedia 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-action="Delete" asp-controller="TestedSequentialMedias" asp-route-id="@item.Id" class="btn btn-danger" target="_blank">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
45
Aaru.Server.Old/Areas/Admin/Views/Reports/Edit.cshtml
Normal file
45
Aaru.Server.Old/Areas/Admin/Views/Reports/Edit.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
@using Aaru.CommonTypes.Enums
|
||||
@model Aaru.Server.Database.Models.UploadedReport
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h4>Uploaded report</h4>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control"/>
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Model" class="control-label"></label>
|
||||
<input asp-for="Model" class="form-control"/>
|
||||
<span asp-validation-for="Model" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Revision" class="control-label"></label>
|
||||
<input asp-for="Revision" class="form-control"/>
|
||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input asp-for="CompactFlash" class="form-check-input"/> @Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label"></label>
|
||||
<select asp-for="Type" asp-items="Html.GetEnumSelectList<DeviceType>()" class="form-control"></select>
|
||||
<span asp-validation-for="Type" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
56
Aaru.Server.Old/Areas/Admin/Views/Reports/Index.cshtml
Normal file
56
Aaru.Server.Old/Areas/Admin/Views/Reports/Index.cshtml
Normal file
@@ -0,0 +1,56 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model IEnumerable<Aaru.Server.Database.Models.UploadedReport>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
<h4>Uploaded reports</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(UploadedReport item in Model)
|
||||
{
|
||||
<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="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
83
Aaru.Server.Old/Areas/Admin/Views/ScsiModes/Delete.cshtml
Normal file
83
Aaru.Server.Old/Areas/Admin/Views/ScsiModes/Delete.cshtml
Normal file
@@ -0,0 +1,83 @@
|
||||
@model Aaru.CommonTypes.Metadata.ScsiMode
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>SCSI MODE SENSE response</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.MediumType)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.MediumType)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.WriteProtected)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.WriteProtected)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Speed)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BufferedMode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BufferedMode)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BlankCheckEnabled)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BlankCheckEnabled)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.DPOandFUA)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.DPOandFUA)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
90
Aaru.Server.Old/Areas/Admin/Views/ScsiModes/Index.cshtml
Normal file
90
Aaru.Server.Old/Areas/Admin/Views/ScsiModes/Index.cshtml
Normal file
@@ -0,0 +1,90 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.ScsiMode>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>SCSI MODE SENSE responses</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.MediumType)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.WriteProtected)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BufferedMode)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BlankCheckEnabled)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DPOandFUA)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(ScsiMode item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MediumType)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.WriteProtected)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Speed)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BufferedMode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BlankCheckEnabled)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DPOandFUA)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
65
Aaru.Server.Old/Areas/Admin/Views/ScsiPages/Delete.cshtml
Normal file
65
Aaru.Server.Old/Areas/Admin/Views/ScsiPages/Delete.cshtml
Normal file
@@ -0,0 +1,65 @@
|
||||
@model Aaru.CommonTypes.Metadata.ScsiPage
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>ScsiPage</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.page)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.page)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.subpage)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.subpage)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.value)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.value)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
66
Aaru.Server.Old/Areas/Admin/Views/ScsiPages/Index.cshtml
Normal file
66
Aaru.Server.Old/Areas/Admin/Views/ScsiPages/Index.cshtml
Normal file
@@ -0,0 +1,66 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.ScsiPage>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>SCSI MODE SENSE pages</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.page)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.subpage)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(ScsiPage item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.page)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.subpage)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
86
Aaru.Server.Old/Areas/Admin/Views/Scsis/Compare.cshtml
Normal file
86
Aaru.Server.Old/Areas/Admin/Views/Scsis/Compare.cshtml
Normal file
@@ -0,0 +1,86 @@
|
||||
@model Aaru.Server.Database.Models.CompareModel
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h2>Comparing SCSI INQUIRY ID @Model.LeftId with ID @Model.RightId</h2>
|
||||
@if(Model.AreEqual)
|
||||
{
|
||||
<p>No differences found.</p>
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@if(Model.HasError)
|
||||
{
|
||||
<p class="alert-info">@Model.ErrorMessage</p>
|
||||
|
||||
return;
|
||||
}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Value name
|
||||
</th>
|
||||
<th>
|
||||
ID: @Model.LeftId
|
||||
</th>
|
||||
<th>
|
||||
ID: @Model.RightId
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for(var i = 0; i < Model.ValueNames.Count; i++)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Model.ValueNames[i]
|
||||
</td>
|
||||
<td>
|
||||
@Model.LeftValues[i]
|
||||
</td>
|
||||
<td>
|
||||
@Model.RightValues[i]
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<a asp-action="Delete" asp-route-id="@Model.LeftId" class="btn btn-danger">Delete ID @Model.LeftId</a>
|
||||
<a asp-action="Delete" asp-route-id="@Model.RightId" class="btn btn-danger">Delete ID @Model.RightId</a>
|
||||
<a asp-action="ConsolidateWithIds" asp-route-masterId="@Model.LeftId" asp-route-slaveId="@Model.RightId" class="btn btn-secondary">Replace all dependencies from ID @Model.RightId with ID @Model.LeftId</a>
|
||||
<a asp-action="ConsolidateWithIds" asp-route-masterId="@Model.RightId" asp-route-slaveId="@Model.LeftId" class="btn btn-secondary">Replace all dependencies from ID @Model.LeftId with ID @Model.RightId</a>
|
||||
32
Aaru.Server.Old/Areas/Admin/Views/Scsis/Consolidate.cshtml
Normal file
32
Aaru.Server.Old/Areas/Admin/Views/Scsis/Consolidate.cshtml
Normal file
@@ -0,0 +1,32 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.IdHashModelForView
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Consolidate duplicate SCSIs";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<h2>Consolidate duplicate SCSIs</h2>
|
||||
<div>
|
||||
The following SCSI INQUIRY have duplicates.
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tbody>
|
||||
@foreach(IdHashModel item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
Do you want to remove the duplicates?
|
||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||
<input asp-for="Json" name="models" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||
</form>
|
||||
</div>
|
||||
48
Aaru.Server.Old/Areas/Admin/Views/Scsis/Delete.cshtml
Normal file
48
Aaru.Server.Old/Areas/Admin/Views/Scsis/Delete.cshtml
Normal file
@@ -0,0 +1,48 @@
|
||||
@using Aaru.Decoders.SCSI
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.Scsi
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>SCSI INQUIRY - ID = @Model.Id</h4>
|
||||
<hr/>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Inquiry.Prettify(Model.InquiryData)))
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
51
Aaru.Server.Old/Areas/Admin/Views/Scsis/Details.cshtml
Normal file
51
Aaru.Server.Old/Areas/Admin/Views/Scsis/Details.cshtml
Normal file
@@ -0,0 +1,51 @@
|
||||
@using Aaru.Decoders.SCSI
|
||||
@using Aaru.Server.Old.Core
|
||||
@model Aaru.CommonTypes.Metadata.Scsi
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>SCSI INQUIRY - ID = @Model.Id</h4>
|
||||
<hr/>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Inquiry.Prettify(Model.InquiryData)))
|
||||
</div>
|
||||
<div>
|
||||
<form asp-action="Compare">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
Compare to:
|
||||
<input name="RightId" type="number"/>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
<input class="btn btn-primary" type="submit" value="Compare"/>
|
||||
</form>
|
||||
</div>
|
||||
101
Aaru.Server.Old/Areas/Admin/Views/Scsis/Index.cshtml
Normal file
101
Aaru.Server.Old/Areas/Admin/Views/Scsis/Index.cshtml
Normal file
@@ -0,0 +1,101 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@using Aaru.Helpers
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Scsi>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>SCSI INQUIRY responses</h4>
|
||||
<div>
|
||||
<a asp-action="Consolidate" class="btn btn-danger">Consolidate duplicates</a>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Id)
|
||||
</th>
|
||||
<th>
|
||||
Vendor identification
|
||||
</th>
|
||||
<th>
|
||||
Product identification
|
||||
</th>
|
||||
<th>
|
||||
Product revision level
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsModeSense6)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsModeSense10)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SupportsModeSubpages)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Scsi item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
</td>
|
||||
<td>
|
||||
@StringHandlers.CToString(item.Inquiry?.VendorIdentification)
|
||||
</td>
|
||||
<td>
|
||||
@StringHandlers.CToString(item.Inquiry?.ProductIdentification)
|
||||
</td>
|
||||
<td>
|
||||
@StringHandlers.CToString(item.Inquiry?.ProductRevisionLevel)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsModeSense6)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsModeSense10)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SupportsModeSubpages)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
140
Aaru.Server.Old/Areas/Admin/Views/Shared/_Layout.cshtml
Normal file
140
Aaru.Server.Old/Areas/Admin/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,140 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@inject SignInManager<IdentityUser> SignInManager
|
||||
@inject UserManager<IdentityUser> UserManager
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : _Layout.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : Aaru Server.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains layout.
|
||||
//
|
||||
// --[ 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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head>
|
||||
@switch(DateTime.UtcNow.DayOfYear)
|
||||
{
|
||||
// 24th January, Macintosh launch
|
||||
case 24:
|
||||
<link href="~/css/mac/aaruserver.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="~/js/colors/mac.js"></script>
|
||||
|
||||
break;
|
||||
|
||||
// 23rd July, Amiga launch
|
||||
case 204:
|
||||
<link href="~/css/amiga/aaruserver.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="~/js/colors/amiga.js"></script>
|
||||
|
||||
break;
|
||||
default:
|
||||
<link href="~/css/dos/aaruserver.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="~/js/colors/dos.js"></script>
|
||||
|
||||
break;
|
||||
}
|
||||
<meta charset="utf-8"/>
|
||||
<title>@ViewBag.Title</title>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111466173-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-111466173-1');
|
||||
</script>
|
||||
@Html.Raw(JavaScriptSnippet.FullScript)
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
Welcome to
|
||||
<i>
|
||||
<a href="http://github.com/aaru-dps/aaru" target="_blank">
|
||||
Aaru
|
||||
</a>
|
||||
</i> Server Administrative Area
|
||||
@if(SignInManager.IsSignedIn(User))
|
||||
{
|
||||
<div>
|
||||
<a asp-area="Identity" asp-page="/Account/Manage/Index" class="text-dark" id="manage" title="Manage">Hello @UserManager.GetUserName(User)!</a>
|
||||
<form asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })" class="form-inline" id="logoutForm">
|
||||
<button class="btn btn-link text-dark" id="logout" type="submit">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
<a asp-area="Identity" asp-page="/Account/Login" class="text-dark" id="login">Login</a>
|
||||
</div>
|
||||
}
|
||||
</header>
|
||||
@RenderBody()
|
||||
<footer class="container-fluid">
|
||||
© 2021-2019
|
||||
<a href="http://www.claunia.com" target="_blank">
|
||||
Claunia.com
|
||||
</a>
|
||||
<br/>
|
||||
@switch(DateTime.UtcNow.DayOfYear)
|
||||
{
|
||||
// 24th January, Macintosh launch
|
||||
case 24:
|
||||
@Html.Raw("Fonts are © 2014 <a href=\"http://christtrekker.users.sourceforge.net/fnt/chicago.shtml\" target=\"_blank\">Robin Casady</a>")
|
||||
|
||||
break;
|
||||
|
||||
// 23rd July, Amiga launch
|
||||
case 204:
|
||||
@Html.Raw("Fonts are © 2013 <a href=\"https://github.com/rewtnull/amigafonts\" target=\"_blank\">TrueSchool Ascii</a>")
|
||||
|
||||
break;
|
||||
default:
|
||||
@Html.Raw("Fonts are © 2015 - 2016 <a href=\"http://int10h.org\" target=\"_blank\">VileR</a>")
|
||||
|
||||
break;
|
||||
}
|
||||
<br/>
|
||||
CSS © 2018-2019
|
||||
<a href="https://getbootstrap.com/" target="_blank">
|
||||
Bootstrap
|
||||
</a> and
|
||||
<a href="http://www.claunia.com" target="_blank">
|
||||
Claunia.com
|
||||
</a>
|
||||
</footer>
|
||||
<script crossorigin="anonymous" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<script crossorigin="anonymous" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
|
||||
<script crossorigin="anonymous" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
|
||||
@RenderSection("Scripts", false)
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@inject SignInManager<IdentityUser> SignInManager
|
||||
@inject UserManager<IdentityUser> UserManager
|
||||
<ul class="navbar-nav">
|
||||
@if(SignInManager.IsSignedIn(User))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a asp-area="Identity" asp-page="/Account/Manage/Index" class="nav-link text-dark" id="manage" title="Manage">Hello @UserManager.GetUserName(User)!</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<form asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })" class="form-inline" id="logoutForm">
|
||||
<button class="btn btn-link nav-link text-dark" id="logout" type="submit">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a asp-area="Identity" asp-page="/Account/Register" class="nav-link text-dark" id="register">Register</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a asp-area="Identity" asp-page="/Account/Login" class="nav-link text-dark" id="login">Login</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
50
Aaru.Server.Old/Areas/Admin/Views/Sscs/Consolidate.cshtml
Normal file
50
Aaru.Server.Old/Areas/Admin/Views/Sscs/Consolidate.cshtml
Normal file
@@ -0,0 +1,50 @@
|
||||
@using Aaru.Server.Old.Database.Models
|
||||
@model Aaru.Server.Database.Models.SscModelForView
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Consolidate duplicate CHS";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<h2>Consolidate duplicate SSC</h2>
|
||||
<div>
|
||||
The following SSC have duplicates.
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].MinBlockLength)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].MaxBlockLength)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.List[0].BlockSizeGranularity)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(SscModel item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MinBlockLength)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MaxBlockLength)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BlockSizeGranularity)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
Do you want to remove the duplicates?
|
||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||
<input asp-for="Json" name="models" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||
</form>
|
||||
</div>
|
||||
65
Aaru.Server.Old/Areas/Admin/Views/Sscs/Delete.cshtml
Normal file
65
Aaru.Server.Old/Areas/Admin/Views/Sscs/Delete.cshtml
Normal file
@@ -0,0 +1,65 @@
|
||||
@model Aaru.CommonTypes.Metadata.Ssc
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>SSC</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BlockSizeGranularity)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BlockSizeGranularity)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.MaxBlockLength)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.MaxBlockLength)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.MinBlockLength)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.MinBlockLength)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
75
Aaru.Server.Old/Areas/Admin/Views/Sscs/Index.cshtml
Normal file
75
Aaru.Server.Old/Areas/Admin/Views/Sscs/Index.cshtml
Normal file
@@ -0,0 +1,75 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Ssc>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<a asp-action="Consolidate" class="btn btn-danger">Consolidate duplicates</a>
|
||||
</div>
|
||||
<h4>SSCs</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.MinBlockLength)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.MaxBlockLength)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BlockSizeGranularity)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(Ssc item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MinBlockLength)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MaxBlockLength)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BlockSizeGranularity)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,119 @@
|
||||
@model Aaru.CommonTypes.Metadata.SupportedDensity
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "Aaru Server";
|
||||
}
|
||||
@{
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Supported density</h4>
|
||||
<hr/>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.PrimaryCode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.PrimaryCode)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SecondaryCode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SecondaryCode)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Writable)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Writable)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Duplicate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Duplicate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.DefaultDensity)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.DefaultDensity)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BitsPerMm)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BitsPerMm)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Width)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Width)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Tracks)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Tracks)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Capacity)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Capacity)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Organization)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Organization)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input asp-for="Id" type="hidden"/>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,126 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@model IEnumerable<Aaru.CommonTypes.Metadata.SupportedDensity>
|
||||
|
||||
@{
|
||||
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
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<h4>Supported densities</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Organization)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Capacity)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PrimaryCode)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SecondaryCode)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BitsPerMm)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Width)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Tracks)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DefaultDensity)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Writable)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Duplicate)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(SupportedDensity item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Organization)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Capacity)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PrimaryCode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SecondaryCode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BitsPerMm)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Width)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Tracks)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DefaultDensity)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Writable)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Duplicate)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user