mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Code refactor and cleanup.
This commit is contained in:
7
.idea/.idea.Aaru.Server/.idea/discord.xml
generated
Normal file
7
.idea/.idea.Aaru.Server/.idea/discord.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DiscordProjectSettings">
|
||||||
|
<option name="show" value="PROJECT_FILES" />
|
||||||
|
<option name="description" value="" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/.idea.Aaru.Server/.idea/riderMarkupCache.xml
generated
Normal file
6
.idea/.idea.Aaru.Server/.idea/riderMarkupCache.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RiderMarkupStore">
|
||||||
|
<option name="version" value="-2154046885505616848" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Server task" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="Server task" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru.Server.Task/bin/Debug/netcoreapp3.0/Aaru.Server.Task.dll" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru.Server.Task/bin/Debug/net6.0/Aaru.Server.Task" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Aaru.Server.Task/bin/Debug/netcoreapp3.0" />
|
<option name="WORKING_DIRECTORY" value="$USER_HOME$/Desktop" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="USE_MONO" value="0" />
|
<option name="USE_MONO" value="0" />
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Aaru.Server.Task/Aaru.Server.Task.csproj" />
|
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Aaru.Server.Task/Aaru.Server.Task.csproj" />
|
||||||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v3.0" />
|
<option name="PROJECT_TFM" value="net6.0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
|
|
||||||
namespace Aaru.Server.Task;
|
namespace Aaru.Server.Task;
|
||||||
|
|
||||||
internal class Program
|
class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
DateTime start, end;
|
DateTime start, end;
|
||||||
int counter = 0;
|
var counter = 0;
|
||||||
|
|
||||||
start = DateTime.UtcNow;
|
start = DateTime.UtcNow;
|
||||||
System.Console.WriteLine("{0}: Connecting to database...", DateTime.UtcNow);
|
System.Console.WriteLine("{0}: Connecting to database...", DateTime.UtcNow);
|
||||||
@@ -75,10 +75,10 @@ internal class Program
|
|||||||
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
||||||
|
|
||||||
UsbVendor vendor = null;
|
UsbVendor vendor = null;
|
||||||
int newVendors = 0;
|
var newVendors = 0;
|
||||||
int newProducts = 0;
|
var newProducts = 0;
|
||||||
int modifiedVendors = 0;
|
var modifiedVendors = 0;
|
||||||
int modifiedProducts = 0;
|
var modifiedProducts = 0;
|
||||||
|
|
||||||
start = DateTime.UtcNow;
|
start = DateTime.UtcNow;
|
||||||
System.Console.WriteLine("{0}: Adding and updating database entries...", DateTime.UtcNow);
|
System.Console.WriteLine("{0}: Adding and updating database entries...", DateTime.UtcNow);
|
||||||
@@ -142,9 +142,10 @@ internal class Program
|
|||||||
else if(name != product.Product)
|
else if(name != product.Product)
|
||||||
{
|
{
|
||||||
System.Console.
|
System.Console.
|
||||||
WriteLine("{0}: Will modify product with ID {1:X4} and vendor {2} ({3:X4}) from \"{4}\" to \"{5}\"",
|
WriteLine(
|
||||||
DateTime.UtcNow, product.ProductId, product.Vendor?.Vendor ?? "null",
|
"{0}: Will modify product with ID {1:X4} and vendor {2} ({3:X4}) from \"{4}\" to \"{5}\"",
|
||||||
product.Vendor?.VendorId ?? 0, product.Product, name);
|
DateTime.UtcNow, product.ProductId, product.Vendor?.Vendor ?? "null",
|
||||||
|
product.Vendor?.VendorId ?? 0, product.Product, name);
|
||||||
|
|
||||||
product.Product = name;
|
product.Product = name;
|
||||||
product.ModifiedWhen = DateTime.UtcNow;
|
product.ModifiedWhen = DateTime.UtcNow;
|
||||||
@@ -203,9 +204,9 @@ internal class Program
|
|||||||
end = DateTime.UtcNow;
|
end = DateTime.UtcNow;
|
||||||
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
||||||
|
|
||||||
System.Console.WriteLine("{0}: {1} vendors added.", DateTime.UtcNow, newVendors);
|
System.Console.WriteLine("{0}: {1} vendors added.", DateTime.UtcNow, newVendors);
|
||||||
System.Console.WriteLine("{0}: {1} products added.", DateTime.UtcNow, newProducts);
|
System.Console.WriteLine("{0}: {1} products added.", DateTime.UtcNow, newProducts);
|
||||||
System.Console.WriteLine("{0}: {1} vendors modified.", DateTime.UtcNow, modifiedVendors);
|
System.Console.WriteLine("{0}: {1} vendors modified.", DateTime.UtcNow, modifiedVendors);
|
||||||
System.Console.WriteLine("{0}: {1} products modified.", DateTime.UtcNow, modifiedProducts);
|
System.Console.WriteLine("{0}: {1} products modified.", DateTime.UtcNow, modifiedProducts);
|
||||||
|
|
||||||
System.Console.WriteLine("{0}: Looking up a vendor", DateTime.UtcNow);
|
System.Console.WriteLine("{0}: Looking up a vendor", DateTime.UtcNow);
|
||||||
@@ -276,10 +277,10 @@ internal class Program
|
|||||||
doc.LoadHtml(html);
|
doc.LoadHtml(html);
|
||||||
HtmlNode firstTable = doc.DocumentNode.SelectSingleNode("/html[1]/body[1]/table[1]");
|
HtmlNode firstTable = doc.DocumentNode.SelectSingleNode("/html[1]/body[1]/table[1]");
|
||||||
|
|
||||||
bool firstRow = true;
|
var firstRow = true;
|
||||||
|
|
||||||
int addedOffsets = 0;
|
var addedOffsets = 0;
|
||||||
int modifiedOffsets = 0;
|
var modifiedOffsets = 0;
|
||||||
|
|
||||||
System.Console.WriteLine("{0}: Processing offsets...", DateTime.UtcNow);
|
System.Console.WriteLine("{0}: Processing offsets...", DateTime.UtcNow);
|
||||||
start = DateTime.UtcNow;
|
start = DateTime.UtcNow;
|
||||||
@@ -525,7 +526,7 @@ internal class Program
|
|||||||
end = DateTime.UtcNow;
|
end = DateTime.UtcNow;
|
||||||
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
||||||
|
|
||||||
System.Console.WriteLine("{0}: Added {1} offsets", end, addedOffsets);
|
System.Console.WriteLine("{0}: Added {1} offsets", end, addedOffsets);
|
||||||
System.Console.WriteLine("{0}: Modified {1} offsets", end, modifiedOffsets);
|
System.Console.WriteLine("{0}: Modified {1} offsets", end, modifiedOffsets);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@@ -542,8 +543,8 @@ internal class Program
|
|||||||
|
|
||||||
System.Console.WriteLine("{0}: Reading iNES/NES 2.0 headers...", DateTime.UtcNow);
|
System.Console.WriteLine("{0}: Reading iNES/NES 2.0 headers...", DateTime.UtcNow);
|
||||||
start = DateTime.UtcNow;
|
start = DateTime.UtcNow;
|
||||||
int newHeaders = 0;
|
var newHeaders = 0;
|
||||||
int updatedHeaders = 0;
|
var updatedHeaders = 0;
|
||||||
counter = 0;
|
counter = 0;
|
||||||
|
|
||||||
foreach(string file in Directory.GetFiles("nes"))
|
foreach(string file in Directory.GetFiles("nes"))
|
||||||
@@ -555,11 +556,11 @@ internal class Program
|
|||||||
if(fs.Length <= 16)
|
if(fs.Length <= 16)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
byte[] header = new byte[16];
|
var header = new byte[16];
|
||||||
byte[] data = new byte[fs.Length - 16];
|
var data = new byte[fs.Length - 16];
|
||||||
|
|
||||||
fs.Read(header, 0, 16);
|
fs.Read(header, 0, 16);
|
||||||
fs.Read(data, 0, data.Length);
|
fs.Read(data, 0, data.Length);
|
||||||
|
|
||||||
bool ines;
|
bool ines;
|
||||||
bool nes20;
|
bool nes20;
|
||||||
@@ -607,15 +608,15 @@ internal class Program
|
|||||||
|
|
||||||
var hasher = SHA256.Create();
|
var hasher = SHA256.Create();
|
||||||
byte[] hashBytes = hasher.ComputeHash(data);
|
byte[] hashBytes = hasher.ComputeHash(data);
|
||||||
char[] hashChars = new char[64];
|
var hashChars = new char[64];
|
||||||
|
|
||||||
for(int i = 0; i < 32; i++)
|
for(var i = 0; i < 32; i++)
|
||||||
{
|
{
|
||||||
int a = hashBytes[i] >> 4;
|
int a = hashBytes[i] >> 4;
|
||||||
int b = hashBytes[i] & 0xF;
|
int b = hashBytes[i] & 0xF;
|
||||||
|
|
||||||
hashChars[i * 2] = a > 9 ? (char)(a + 0x57) : (char)(a + 0x30);
|
hashChars[i * 2] = a > 9 ? (char)(a + 0x57) : (char)(a + 0x30);
|
||||||
hashChars[(i * 2) + 1] = b > 9 ? (char)(b + 0x57) : (char)(b + 0x30);
|
hashChars[i * 2 + 1] = b > 9 ? (char)(b + 0x57) : (char)(b + 0x30);
|
||||||
}
|
}
|
||||||
|
|
||||||
info.Sha256 = new string(hashChars);
|
info.Sha256 = new string(hashChars);
|
||||||
@@ -632,7 +633,7 @@ internal class Program
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool modified = false;
|
var modified = false;
|
||||||
|
|
||||||
if(existing.NametableMirroring != info.NametableMirroring)
|
if(existing.NametableMirroring != info.NametableMirroring)
|
||||||
{
|
{
|
||||||
@@ -720,8 +721,8 @@ internal class Program
|
|||||||
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
||||||
|
|
||||||
System.Console.WriteLine("{0}: Processed {1} iNES/NES 2.0 headers...", DateTime.UtcNow, counter);
|
System.Console.WriteLine("{0}: Processed {1} iNES/NES 2.0 headers...", DateTime.UtcNow, counter);
|
||||||
System.Console.WriteLine("{0}: Added {1} iNES/NES 2.0 headers...", DateTime.UtcNow, newHeaders);
|
System.Console.WriteLine("{0}: Added {1} iNES/NES 2.0 headers...", DateTime.UtcNow, newHeaders);
|
||||||
System.Console.WriteLine("{0}: Updated {1} iNES/NES 2.0 headers...", DateTime.UtcNow, updatedHeaders);
|
System.Console.WriteLine("{0}: Updated {1} iNES/NES 2.0 headers...", DateTime.UtcNow, updatedHeaders);
|
||||||
|
|
||||||
System.Console.WriteLine("{0}: Committing changes...", DateTime.UtcNow);
|
System.Console.WriteLine("{0}: Committing changes...", DateTime.UtcNow);
|
||||||
start = DateTime.UtcNow;
|
start = DateTime.UtcNow;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DefaultConnection": "server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass"
|
"DefaultConnection": "server=zeus.claunia.com;port=3306;database=discimagechef;uid=dic;password=dicpass"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
|||||||
@@ -24,25 +24,25 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha8" />
|
<PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha8"/>
|
||||||
<PackageReference Include="Aaru.Decoders" 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.Dto" Version="6.0.0-alpha8"/>
|
||||||
<PackageReference Include="Aaru.Helpers" Version="6.0.0-alpha8" />
|
<PackageReference Include="Aaru.Helpers" Version="6.0.0-alpha8"/>
|
||||||
<PackageReference Include="ChoPGP" Version="1.0.1.5" />
|
<PackageReference Include="ChoPGP" Version="1.0.1.5"/>
|
||||||
<PackageReference Include="MailKit" Version="2.15.0" />
|
<PackageReference Include="MailKit" Version="2.15.0"/>
|
||||||
<PackageReference Include="Markdig" Version="0.26.0" />
|
<PackageReference Include="Markdig" Version="0.26.0"/>
|
||||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
|
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.0" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.0"/>
|
||||||
<PackageReference Include="MimeKit" Version="2.15.1" />
|
<PackageReference Include="MimeKit" Version="2.15.1"/>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0"/>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2"/>
|
||||||
<PackageReference Include="prometheus-net.AspNetCore" Version="5.0.2" />
|
<PackageReference Include="prometheus-net.AspNetCore" Version="5.0.2"/>
|
||||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.2" PrivateAssets="all" />
|
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.2" PrivateAssets="all"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -76,60 +76,60 @@
|
|||||||
<None Update="aaru-server.service">
|
<None Update="aaru-server.service">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="wwwroot\favicon.ico" />
|
<None Include="wwwroot\favicon.ico"/>
|
||||||
<None Include="wwwroot\fonts\.htaccess" />
|
<None Include="wwwroot\fonts\.htaccess"/>
|
||||||
<None Include="wwwroot\fonts\ChicagoFLF.eot" />
|
<None Include="wwwroot\fonts\ChicagoFLF.eot"/>
|
||||||
<None Include="wwwroot\fonts\ChicagoFLF.ttf" />
|
<None Include="wwwroot\fonts\ChicagoFLF.ttf"/>
|
||||||
<None Include="wwwroot\fonts\ChicagoFLF.woff" />
|
<None Include="wwwroot\fonts\ChicagoFLF.woff"/>
|
||||||
<None Include="wwwroot\fonts\ChicagoFLF.woff2" />
|
<None Include="wwwroot\fonts\ChicagoFLF.woff2"/>
|
||||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.eot" />
|
<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.ttf"/>
|
||||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.woff" />
|
<None Include="wwwroot\fonts\Topaz_a500_v1.0.woff"/>
|
||||||
<None Include="wwwroot\fonts\Topaz_a500_v1.0.woff2" />
|
<None Include="wwwroot\fonts\Topaz_a500_v1.0.woff2"/>
|
||||||
<None Include="wwwroot\fonts\vga_squarepx.eot" />
|
<None Include="wwwroot\fonts\vga_squarepx.eot"/>
|
||||||
<None Include="wwwroot\fonts\vga_squarepx.ttf" />
|
<None Include="wwwroot\fonts\vga_squarepx.ttf"/>
|
||||||
<None Include="wwwroot\fonts\vga_squarepx.woff" />
|
<None Include="wwwroot\fonts\vga_squarepx.woff"/>
|
||||||
<None Include="wwwroot\fonts\vga_squarepx.woff2" />
|
<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.js"/>
|
||||||
<None Include="wwwroot\jquery-validation-unobtrusive\jquery.validate.unobtrusive.min.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-unobtrusive\LICENSE.txt"/>
|
||||||
<None Include="wwwroot\jquery-validation\dist\additional-methods.js" />
|
<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\additional-methods.min.js"/>
|
||||||
<None Include="wwwroot\jquery-validation\dist\jquery.validate.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\dist\jquery.validate.min.js"/>
|
||||||
<None Include="wwwroot\jquery-validation\LICENSE.md" />
|
<None Include="wwwroot\jquery-validation\LICENSE.md"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\js\site.js" />
|
<_ContentIncludedByDefault Remove="wwwroot\js\site.js"/>
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\css\js\colors\dos.js" />
|
<_ContentIncludedByDefault Remove="wwwroot\css\js\colors\dos.js"/>
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\css\js\colors\mac.js" />
|
<_ContentIncludedByDefault Remove="wwwroot\css\js\colors\mac.js"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\Error.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\Error.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_Layout.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_Layout.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_LoginPartial.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_LoginPartial.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Create.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Create.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Delete.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Delete.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Details.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Details.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Edit.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Edit.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Index.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Index.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Atas\EditorTemplates\IdHashModel.cshtml" />
|
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Atas\EditorTemplates\IdHashModel.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\Changelog.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\Changelog.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\CODE_OF_CONDUCT.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\CODE_OF_CONDUCT.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\CONTRIBUTING.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\CONTRIBUTING.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\ISSUE_TEMPLATE.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\ISSUE_TEMPLATE.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\NEEDED.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\NEEDED.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\NEEDINFO.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\NEEDINFO.cshtml"/>
|
||||||
<_ContentIncludedByDefault Remove="Views\Home\PULL_REQUEST_TEMPLATE.cshtml" />
|
<_ContentIncludedByDefault Remove="Views\Home\PULL_REQUEST_TEMPLATE.cshtml"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\Error.cshtml" />
|
<UpToDateCheckInput Remove="Areas\Admin\Shared\Error.cshtml"/>
|
||||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml" />
|
<UpToDateCheckInput Remove="Areas\Admin\Shared\_CookieConsentPartial.cshtml"/>
|
||||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_Layout.cshtml" />
|
<UpToDateCheckInput Remove="Areas\Admin\Shared\_Layout.cshtml"/>
|
||||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_LoginPartial.cshtml" />
|
<UpToDateCheckInput Remove="Areas\Admin\Shared\_LoginPartial.cshtml"/>
|
||||||
<UpToDateCheckInput Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml" />
|
<UpToDateCheckInput Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class AtasController : Controller
|
public sealed class AtasController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -22,16 +23,12 @@ public sealed class AtasController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(ata == null)
|
if(ata == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(ata);
|
return View(ata);
|
||||||
}
|
}
|
||||||
@@ -40,22 +37,20 @@ public sealed class AtasController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(ata == null)
|
if(ata == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(ata);
|
return View(ata);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Atas/Delete/5
|
// POST: Admin/Atas/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Ata ata = await _context.Ata.FindAsync(id);
|
Ata ata = await _context.Ata.FindAsync(id);
|
||||||
@@ -67,12 +62,12 @@ public sealed class AtasController : Controller
|
|||||||
|
|
||||||
public IActionResult Consolidate()
|
public IActionResult Consolidate()
|
||||||
{
|
{
|
||||||
List<IdHashModel> hashes = _context.Ata.Select(m => new IdHashModel(m.Id, Hash.Sha512(m.Identify))).ToList();
|
var hashes = _context.Ata.Select(m => new IdHashModel(m.Id, Hash.Sha512(m.Identify))).ToList();
|
||||||
|
|
||||||
List<IdHashModel> dups = hashes.GroupBy(x => x.Hash).Where(g => g.Count() > 1).
|
var dups = hashes.GroupBy(x => x.Hash).Where(g => g.Count() > 1).
|
||||||
Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key)).ToList();
|
Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key)).ToList();
|
||||||
|
|
||||||
for(int i = 0; i < dups.Count; i++)
|
for(var i = 0; i < dups.Count; i++)
|
||||||
{
|
{
|
||||||
Ata unique = _context.Ata.First(a => a.Id == dups[i].Id);
|
Ata unique = _context.Ata.First(a => a.Id == dups[i].Id);
|
||||||
|
|
||||||
@@ -87,7 +82,9 @@ public sealed class AtasController : Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("Consolidate"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Consolidate")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public IActionResult ConsolidateConfirmed(string models)
|
public IActionResult ConsolidateConfirmed(string models)
|
||||||
{
|
{
|
||||||
IdHashModel[] duplicates;
|
IdHashModel[] duplicates;
|
||||||
@@ -119,24 +116,16 @@ public sealed class AtasController : Controller
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach(Device ataDevice in _context.Devices.Where(d => d.ATA.Id == duplicateId))
|
foreach(Device ataDevice in _context.Devices.Where(d => d.ATA.Id == duplicateId))
|
||||||
{
|
|
||||||
ataDevice.ATA = master;
|
ataDevice.ATA = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(Device atapiDevice in _context.Devices.Where(d => d.ATAPI.Id == duplicateId))
|
foreach(Device atapiDevice in _context.Devices.Where(d => d.ATAPI.Id == duplicateId))
|
||||||
{
|
|
||||||
atapiDevice.ATAPI = master;
|
atapiDevice.ATAPI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport ataReport in _context.Reports.Where(d => d.ATA.Id == duplicateId))
|
foreach(UploadedReport ataReport in _context.Reports.Where(d => d.ATA.Id == duplicateId))
|
||||||
{
|
|
||||||
ataReport.ATA = master;
|
ataReport.ATA = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport atapiReport in _context.Reports.Where(d => d.ATAPI.Id == duplicateId))
|
foreach(UploadedReport atapiReport in _context.Reports.Where(d => d.ATAPI.Id == duplicateId))
|
||||||
{
|
|
||||||
atapiReport.ATAPI = master;
|
atapiReport.ATAPI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == duplicateId))
|
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == duplicateId))
|
||||||
{
|
{
|
||||||
@@ -162,40 +151,36 @@ public sealed class AtasController : Controller
|
|||||||
Ata master = _context.Ata.FirstOrDefault(m => m.Id == masterId);
|
Ata master = _context.Ata.FirstOrDefault(m => m.Id == masterId);
|
||||||
|
|
||||||
if(master is null)
|
if(master is null)
|
||||||
|
{
|
||||||
return RedirectToAction(nameof(Compare), new
|
return RedirectToAction(nameof(Compare), new
|
||||||
{
|
{
|
||||||
id = masterId,
|
id = masterId,
|
||||||
rightId = slaveId
|
rightId = slaveId
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Ata slave = _context.Ata.FirstOrDefault(m => m.Id == slaveId);
|
Ata slave = _context.Ata.FirstOrDefault(m => m.Id == slaveId);
|
||||||
|
|
||||||
if(slave is null)
|
if(slave is null)
|
||||||
|
{
|
||||||
return RedirectToAction(nameof(Compare), new
|
return RedirectToAction(nameof(Compare), new
|
||||||
{
|
{
|
||||||
id = masterId,
|
id = masterId,
|
||||||
rightId = slaveId
|
rightId = slaveId
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
foreach(Device ataDevice in _context.Devices.Where(d => d.ATA.Id == slaveId))
|
foreach(Device ataDevice in _context.Devices.Where(d => d.ATA.Id == slaveId))
|
||||||
{
|
|
||||||
ataDevice.ATA = master;
|
ataDevice.ATA = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(Device atapiDevice in _context.Devices.Where(d => d.ATAPI.Id == slaveId))
|
foreach(Device atapiDevice in _context.Devices.Where(d => d.ATAPI.Id == slaveId))
|
||||||
{
|
|
||||||
atapiDevice.ATAPI = master;
|
atapiDevice.ATAPI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport ataReport in _context.Reports.Where(d => d.ATA.Id == slaveId))
|
foreach(UploadedReport ataReport in _context.Reports.Where(d => d.ATA.Id == slaveId))
|
||||||
{
|
|
||||||
ataReport.ATA = master;
|
ataReport.ATA = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport atapiReport in _context.Reports.Where(d => d.ATAPI.Id == slaveId))
|
foreach(UploadedReport atapiReport in _context.Reports.Where(d => d.ATAPI.Id == slaveId))
|
||||||
{
|
|
||||||
atapiReport.ATAPI = master;
|
atapiReport.ATAPI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveId))
|
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == slaveId))
|
||||||
{
|
{
|
||||||
@@ -289,7 +274,8 @@ public sealed class AtasController : Controller
|
|||||||
|
|
||||||
switch(la)
|
switch(la)
|
||||||
{
|
{
|
||||||
case null when ra is null: continue;
|
case null when ra is null:
|
||||||
|
continue;
|
||||||
case null:
|
case null:
|
||||||
model.ValueNames.Add(fieldInfo.Name);
|
model.ValueNames.Add(fieldInfo.Name);
|
||||||
model.LeftValues.Add("null");
|
model.LeftValues.Add("null");
|
||||||
@@ -307,10 +293,10 @@ public sealed class AtasController : Controller
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<object> ll = la.Cast<object>().ToList();
|
var ll = la.Cast<object>().ToList();
|
||||||
List<object> rl = ra.Cast<object>().ToList();
|
var rl = ra.Cast<object>().ToList();
|
||||||
|
|
||||||
for(int i = 0; i < ll.Count; i++)
|
for(var i = 0; i < ll.Count; i++)
|
||||||
{
|
{
|
||||||
if(ll[i].Equals(rl[i]))
|
if(ll[i].Equals(rl[i]))
|
||||||
continue;
|
continue;
|
||||||
@@ -422,9 +408,7 @@ public sealed class AtasController : Controller
|
|||||||
|
|
||||||
if(tmp.All(b => b > 0x20) &&
|
if(tmp.All(b => b > 0x20) &&
|
||||||
tmp.All(b => b <= 0x5F))
|
tmp.All(b => b <= 0x5F))
|
||||||
{
|
|
||||||
havePrivacy.Add(ata);
|
havePrivacy.Add(ata);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return View(havePrivacy);
|
return View(havePrivacy);
|
||||||
@@ -438,16 +422,16 @@ public sealed class AtasController : Controller
|
|||||||
return RedirectToAction(nameof(CheckPrivate));
|
return RedirectToAction(nameof(CheckPrivate));
|
||||||
|
|
||||||
// Serial number
|
// Serial number
|
||||||
for(int i = 0; i < 20; i++)
|
for(var i = 0; i < 20; i++)
|
||||||
ata.Identify[(10 * 2) + i] = 0x20;
|
ata.Identify[10 * 2 + i] = 0x20;
|
||||||
|
|
||||||
// Media serial number
|
// Media serial number
|
||||||
for(int i = 0; i < 40; i++)
|
for(var i = 0; i < 40; i++)
|
||||||
ata.Identify[(176 * 2) + i] = 0x20;
|
ata.Identify[176 * 2 + i] = 0x20;
|
||||||
|
|
||||||
// WWN and WWN Extension
|
// WWN and WWN Extension
|
||||||
for(int i = 0; i < 16; i++)
|
for(var i = 0; i < 16; i++)
|
||||||
ata.Identify[(108 * 2) + i] = 0;
|
ata.Identify[108 * 2 + i] = 0;
|
||||||
|
|
||||||
// We need to tell EFCore the entity has changed
|
// We need to tell EFCore the entity has changed
|
||||||
_context.Update(ata);
|
_context.Update(ata);
|
||||||
@@ -464,24 +448,24 @@ public sealed class AtasController : Controller
|
|||||||
return RedirectToAction(nameof(CheckPrivate));
|
return RedirectToAction(nameof(CheckPrivate));
|
||||||
|
|
||||||
// ReservedWords121
|
// ReservedWords121
|
||||||
for(int i = 0; i < 10; i++)
|
for(var i = 0; i < 10; i++)
|
||||||
ata.Identify[(121 * 2) + i] = 0;
|
ata.Identify[121 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedWords129
|
// ReservedWords129
|
||||||
for(int i = 0; i < 40; i++)
|
for(var i = 0; i < 40; i++)
|
||||||
ata.Identify[(129 * 2) + i] = 0;
|
ata.Identify[129 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedCFA
|
// ReservedCFA
|
||||||
for(int i = 0; i < 14; i++)
|
for(var i = 0; i < 14; i++)
|
||||||
ata.Identify[(161 * 2) + i] = 0;
|
ata.Identify[161 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedCEATA224
|
// ReservedCEATA224
|
||||||
for(int i = 0; i < 12; i++)
|
for(var i = 0; i < 12; i++)
|
||||||
ata.Identify[(224 * 2) + i] = 0;
|
ata.Identify[224 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedWords
|
// ReservedWords
|
||||||
for(int i = 0; i < 14; i++)
|
for(var i = 0; i < 14; i++)
|
||||||
ata.Identify[(161 * 2) + i] = 0;
|
ata.Identify[161 * 2 + i] = 0;
|
||||||
|
|
||||||
// We need to tell EFCore the entity has changed
|
// We need to tell EFCore the entity has changed
|
||||||
_context.Update(ata);
|
_context.Update(ata);
|
||||||
@@ -498,16 +482,16 @@ public sealed class AtasController : Controller
|
|||||||
return RedirectToAction(nameof(CheckPrivate));
|
return RedirectToAction(nameof(CheckPrivate));
|
||||||
|
|
||||||
// Serial number
|
// Serial number
|
||||||
for(int i = 0; i < 20; i++)
|
for(var i = 0; i < 20; i++)
|
||||||
ata.Identify[(10 * 2) + i] = 0x20;
|
ata.Identify[10 * 2 + i] = 0x20;
|
||||||
|
|
||||||
// Media serial number
|
// Media serial number
|
||||||
for(int i = 0; i < 40; i++)
|
for(var i = 0; i < 40; i++)
|
||||||
ata.Identify[(176 * 2) + i] = 0x20;
|
ata.Identify[176 * 2 + i] = 0x20;
|
||||||
|
|
||||||
// WWN and WWN Extension
|
// WWN and WWN Extension
|
||||||
for(int i = 0; i < 16; i++)
|
for(var i = 0; i < 16; i++)
|
||||||
ata.Identify[(108 * 2) + i] = 0;
|
ata.Identify[108 * 2 + i] = 0;
|
||||||
|
|
||||||
// We need to tell EFCore the entity has changed
|
// We need to tell EFCore the entity has changed
|
||||||
_context.Update(ata);
|
_context.Update(ata);
|
||||||
@@ -523,24 +507,24 @@ public sealed class AtasController : Controller
|
|||||||
foreach(Ata ata in _context.Ata)
|
foreach(Ata ata in _context.Ata)
|
||||||
{
|
{
|
||||||
// ReservedWords121
|
// ReservedWords121
|
||||||
for(int i = 0; i < 10; i++)
|
for(var i = 0; i < 10; i++)
|
||||||
ata.Identify[(121 * 2) + i] = 0;
|
ata.Identify[121 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedWords129
|
// ReservedWords129
|
||||||
for(int i = 0; i < 40; i++)
|
for(var i = 0; i < 40; i++)
|
||||||
ata.Identify[(129 * 2) + i] = 0;
|
ata.Identify[129 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedCFA
|
// ReservedCFA
|
||||||
for(int i = 0; i < 14; i++)
|
for(var i = 0; i < 14; i++)
|
||||||
ata.Identify[(161 * 2) + i] = 0;
|
ata.Identify[161 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedCEATA224
|
// ReservedCEATA224
|
||||||
for(int i = 0; i < 12; i++)
|
for(var i = 0; i < 12; i++)
|
||||||
ata.Identify[(224 * 2) + i] = 0;
|
ata.Identify[224 * 2 + i] = 0;
|
||||||
|
|
||||||
// ReservedWords
|
// ReservedWords
|
||||||
for(int i = 0; i < 14; i++)
|
for(var i = 0; i < 14; i++)
|
||||||
ata.Identify[(161 * 2) + i] = 0;
|
ata.Identify[161 * 2 + i] = 0;
|
||||||
|
|
||||||
// We need to tell EFCore the entity has changed
|
// We need to tell EFCore the entity has changed
|
||||||
_context.Update(ata);
|
_context.Update(ata);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class BlockDescriptorsController : Controller
|
public sealed class BlockDescriptorsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class ChsController : Controller
|
public sealed class ChsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,7 +17,7 @@ public sealed class ChsController : Controller
|
|||||||
|
|
||||||
public IActionResult Consolidate()
|
public IActionResult Consolidate()
|
||||||
{
|
{
|
||||||
List<ChsModel> dups = _context.Chs.GroupBy(x => new
|
var dups = _context.Chs.GroupBy(x => new
|
||||||
{
|
{
|
||||||
x.Cylinders,
|
x.Cylinders,
|
||||||
x.Heads,
|
x.Heads,
|
||||||
@@ -35,7 +36,9 @@ public sealed class ChsController : Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("Consolidate"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Consolidate")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public IActionResult ConsolidateConfirmed(string models)
|
public IActionResult ConsolidateConfirmed(string models)
|
||||||
{
|
{
|
||||||
ChsModel[] duplicates;
|
ChsModel[] duplicates;
|
||||||
@@ -65,14 +68,10 @@ public sealed class ChsController : Controller
|
|||||||
Skip(1).ToArray())
|
Skip(1).ToArray())
|
||||||
{
|
{
|
||||||
foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CHS.Id == chs.Id))
|
foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CHS.Id == chs.Id))
|
||||||
{
|
|
||||||
media.CHS = master;
|
media.CHS = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CurrentCHS.Id == chs.Id))
|
foreach(TestedMedia media in _context.TestedMedia.Where(d => d.CurrentCHS.Id == chs.Id))
|
||||||
{
|
|
||||||
media.CurrentCHS = master;
|
media.CurrentCHS = master;
|
||||||
}
|
|
||||||
|
|
||||||
_context.Chs.Remove(chs);
|
_context.Chs.Remove(chs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class CommandsController : Controller
|
public sealed class CommandsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class CompactDiscOffsetsController : Controller
|
public sealed class CompactDiscOffsetsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,16 +17,12 @@ public sealed class CompactDiscOffsetsController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id);
|
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id);
|
||||||
|
|
||||||
if(compactDiscOffset == null)
|
if(compactDiscOffset == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(compactDiscOffset);
|
return View(compactDiscOffset);
|
||||||
}
|
}
|
||||||
@@ -33,7 +30,8 @@ public sealed class CompactDiscOffsetsController : Controller
|
|||||||
// POST: Admin/CompactDiscOffsets/Edit/5
|
// POST: Admin/CompactDiscOffsets/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(
|
public async Task<IActionResult> Edit(
|
||||||
int id, [Bind("Id,Manufacturer,Model,Offset,Submissions,Agreement")] CompactDiscOffset changedModel)
|
int id, [Bind("Id,Manufacturer,Model,Offset,Submissions,Agreement")] CompactDiscOffset changedModel)
|
||||||
{
|
{
|
||||||
@@ -72,22 +70,20 @@ public sealed class CompactDiscOffsetsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FirstOrDefaultAsync(m => m.Id == id);
|
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(compactDiscOffset == null)
|
if(compactDiscOffset == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(compactDiscOffset);
|
return View(compactDiscOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/CompactDiscOffsets/Delete/5
|
// POST: Admin/CompactDiscOffsets/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id);
|
CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class DeviceStatsController : Controller
|
public sealed class DeviceStatsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,16 +17,12 @@ public sealed class DeviceStatsController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id);
|
DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id);
|
||||||
|
|
||||||
if(deviceStat == null)
|
if(deviceStat == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(deviceStat);
|
return View(deviceStat);
|
||||||
}
|
}
|
||||||
@@ -33,7 +30,8 @@ public sealed class DeviceStatsController : Controller
|
|||||||
// POST: Admin/DeviceStats/Edit/5
|
// POST: Admin/DeviceStats/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(int id, [Bind("Id,Manufacturer,Model,Revision,Bus")] DeviceStat changedModel)
|
public async Task<IActionResult> Edit(int id, [Bind("Id,Manufacturer,Model,Revision,Bus")] DeviceStat changedModel)
|
||||||
{
|
{
|
||||||
if(id != changedModel.Id)
|
if(id != changedModel.Id)
|
||||||
@@ -69,22 +67,20 @@ public sealed class DeviceStatsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
DeviceStat deviceStat = await _context.DeviceStats.FirstOrDefaultAsync(m => m.Id == id);
|
DeviceStat deviceStat = await _context.DeviceStats.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(deviceStat == null)
|
if(deviceStat == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(deviceStat);
|
return View(deviceStat);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/DeviceStats/Delete/5
|
// POST: Admin/DeviceStats/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id);
|
DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class DevicesController : Controller
|
public sealed class DevicesController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -19,9 +20,7 @@ public sealed class DevicesController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
var model = new DeviceDetails
|
var model = new DeviceDetails
|
||||||
{
|
{
|
||||||
@@ -29,9 +28,7 @@ public sealed class DevicesController : Controller
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(model.Report is null)
|
if(model.Report is null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
model.ReportAll = _context.Reports.
|
model.ReportAll = _context.Reports.
|
||||||
Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||||
@@ -90,16 +87,12 @@ public sealed class DevicesController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Device device = await _context.Devices.FindAsync(id);
|
Device device = await _context.Devices.FindAsync(id);
|
||||||
|
|
||||||
if(device == null)
|
if(device == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(device);
|
return View(device);
|
||||||
}
|
}
|
||||||
@@ -107,10 +100,12 @@ public sealed class DevicesController : Controller
|
|||||||
// POST: Admin/Devices/Edit/5
|
// POST: Admin/Devices/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(
|
public async Task<IActionResult> Edit(
|
||||||
int id,
|
int id,
|
||||||
[Bind("OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")] Device changedModel)
|
[Bind("OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")]
|
||||||
|
Device changedModel)
|
||||||
{
|
{
|
||||||
if(id != changedModel.Id)
|
if(id != changedModel.Id)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
@@ -149,22 +144,20 @@ public sealed class DevicesController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Device device = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id);
|
Device device = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(device == null)
|
if(device == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(device);
|
return View(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Devices/Delete/5
|
// POST: Admin/Devices/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Device device = await _context.Devices.FindAsync(id);
|
Device device = await _context.Devices.FindAsync(id);
|
||||||
@@ -329,7 +322,7 @@ public sealed class DevicesController : Controller
|
|||||||
report.SCSI?.MultiMediaDevice != null)
|
report.SCSI?.MultiMediaDevice != null)
|
||||||
{
|
{
|
||||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.MmcId == report.SCSI.
|
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.MmcId == report.SCSI.
|
||||||
MultiMediaDevice.Id))
|
MultiMediaDevice.Id))
|
||||||
{
|
{
|
||||||
testedMedia.MmcId = device.SCSI.MultiMediaDevice.Id;
|
testedMedia.MmcId = device.SCSI.MultiMediaDevice.Id;
|
||||||
_context.Update(testedMedia);
|
_context.Update(testedMedia);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class FilesystemsController : Controller
|
public sealed class FilesystemsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class FiltersController : Controller
|
public sealed class FiltersController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class FireWiresController : Controller
|
public sealed class FireWiresController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -18,16 +19,12 @@ public sealed class FireWiresController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
||||||
|
|
||||||
if(fireWire == null)
|
if(fireWire == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(fireWire);
|
return View(fireWire);
|
||||||
}
|
}
|
||||||
@@ -35,7 +32,8 @@ public sealed class FireWiresController : Controller
|
|||||||
// POST: Admin/FireWires/Edit/5
|
// POST: Admin/FireWires/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(
|
public async Task<IActionResult> Edit(
|
||||||
int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] FireWire changedModel)
|
int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] FireWire changedModel)
|
||||||
{
|
{
|
||||||
@@ -73,22 +71,20 @@ public sealed class FireWiresController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
FireWire fireWire = await _context.FireWire.FirstOrDefaultAsync(m => m.Id == id);
|
FireWire fireWire = await _context.FireWire.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(fireWire == null)
|
if(fireWire == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(fireWire);
|
return View(fireWire);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/FireWires/Delete/5
|
// POST: Admin/FireWires/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
||||||
@@ -102,7 +98,7 @@ public sealed class FireWiresController : Controller
|
|||||||
|
|
||||||
public IActionResult Consolidate()
|
public IActionResult Consolidate()
|
||||||
{
|
{
|
||||||
List<FireWireModel> dups = _context.FireWire.GroupBy(x => new
|
var dups = _context.FireWire.GroupBy(x => new
|
||||||
{
|
{
|
||||||
x.VendorID,
|
x.VendorID,
|
||||||
x.ProductID,
|
x.ProductID,
|
||||||
@@ -125,7 +121,9 @@ public sealed class FireWiresController : Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("Consolidate"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Consolidate")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public IActionResult ConsolidateConfirmed(string models)
|
public IActionResult ConsolidateConfirmed(string models)
|
||||||
{
|
{
|
||||||
FireWireModel[] duplicates;
|
FireWireModel[] duplicates;
|
||||||
@@ -161,14 +159,10 @@ public sealed class FireWiresController : Controller
|
|||||||
Skip(1).ToArray())
|
Skip(1).ToArray())
|
||||||
{
|
{
|
||||||
foreach(Device device in _context.Devices.Where(d => d.FireWire.Id == firewire.Id))
|
foreach(Device device in _context.Devices.Where(d => d.FireWire.Id == firewire.Id))
|
||||||
{
|
|
||||||
device.FireWire = master;
|
device.FireWire = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport report in _context.Reports.Where(d => d.FireWire.Id == firewire.Id))
|
foreach(UploadedReport report in _context.Reports.Where(d => d.FireWire.Id == firewire.Id))
|
||||||
{
|
|
||||||
report.FireWire = master;
|
report.FireWire = master;
|
||||||
}
|
|
||||||
|
|
||||||
_context.FireWire.Remove(firewire);
|
_context.FireWire.Remove(firewire);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ using Aaru.Helpers;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -17,16 +18,12 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id);
|
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(caps == null)
|
if(caps == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(caps);
|
return View(caps);
|
||||||
}
|
}
|
||||||
@@ -35,22 +32,20 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id);
|
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(caps == null)
|
if(caps == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(caps);
|
return View(caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/GdRomSwapDiscCapabilities/Delete/5
|
// POST: Admin/GdRomSwapDiscCapabilities/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FindAsync(id);
|
GdRomSwapDiscCapabilities caps = await _context.GdRomSwapDiscCapabilities.FindAsync(id);
|
||||||
@@ -68,9 +63,7 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
GdRomSwapDiscCapabilities caps = _context.GdRomSwapDiscCapabilities.FirstOrDefault(m => m.Id == id);
|
GdRomSwapDiscCapabilities caps = _context.GdRomSwapDiscCapabilities.FirstOrDefault(m => m.Id == id);
|
||||||
|
|
||||||
if(caps == null)
|
if(caps == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
var model = new TestedMediaDataModel
|
var model = new TestedMediaDataModel
|
||||||
{
|
{
|
||||||
@@ -80,13 +73,13 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
|
|
||||||
byte[] buffer;
|
byte[] buffer;
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
byte[] sector = new byte[2352];
|
var sector = new byte[2352];
|
||||||
byte[] subq = new byte[16];
|
var subq = new byte[16];
|
||||||
byte[] fullsub = new byte[96];
|
var fullsub = new byte[96];
|
||||||
|
|
||||||
bool audio = true;
|
var audio = true;
|
||||||
bool pq = false;
|
var pq = false;
|
||||||
bool rw = false;
|
var rw = false;
|
||||||
|
|
||||||
switch(data)
|
switch(data)
|
||||||
{
|
{
|
||||||
@@ -285,7 +278,8 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
rw = true;
|
rw = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default: return NotFound();
|
default:
|
||||||
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pq &&
|
if(pq &&
|
||||||
@@ -312,12 +306,10 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
if(buffer == null)
|
if(buffer == null)
|
||||||
return View(model);
|
return View(model);
|
||||||
|
|
||||||
for(int i = 0; i < buffer.Length; i += blockSize)
|
for(var i = 0; i < buffer.Length; i += blockSize)
|
||||||
{
|
{
|
||||||
if(audio)
|
if(audio)
|
||||||
{
|
|
||||||
sb.AppendLine("Audio or scrambled data sector.");
|
sb.AppendLine("Audio or scrambled data sector.");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Array.Copy(buffer, i, sector, 0, 2352);
|
Array.Copy(buffer, i, sector, 0, 2352);
|
||||||
@@ -351,10 +343,10 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
{
|
{
|
||||||
byte[] deint = Subchannel.Deinterleave(sub);
|
byte[] deint = Subchannel.Deinterleave(sub);
|
||||||
|
|
||||||
bool validP = true;
|
var validP = true;
|
||||||
bool validRw = true;
|
var validRw = true;
|
||||||
|
|
||||||
for(int i = 0; i < 12; i++)
|
for(var i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
if(deint[i] == 0x00 ||
|
if(deint[i] == 0x00 ||
|
||||||
deint[i] == 0xFF)
|
deint[i] == 0xFF)
|
||||||
@@ -365,7 +357,7 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 24; i < 96; i++)
|
for(var i = 24; i < 96; i++)
|
||||||
{
|
{
|
||||||
if(deint[i] == 0x00)
|
if(deint[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -375,7 +367,7 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] q = new byte[12];
|
var q = new byte[12];
|
||||||
Array.Copy(deint, 12, q, 0, 12);
|
Array.Copy(deint, 12, q, 0, 12);
|
||||||
|
|
||||||
return Subchannel.PrettifyQ(q, deint[21] > 0x10, 16, !validP, false, validRw);
|
return Subchannel.PrettifyQ(q, deint[21] > 0x10, 16, !validP, false, validRw);
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class HomeController : Controller
|
public sealed class HomeController : Controller
|
||||||
{
|
{
|
||||||
public ActionResult Index() => View();
|
public ActionResult Index() => View();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class MediaFormatsController : Controller
|
public sealed class MediaFormatsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -14,22 +15,20 @@ public sealed class MediaFormatsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
MediaFormat mediaFormat = await _context.MediaFormats.FirstOrDefaultAsync(m => m.Id == id);
|
MediaFormat mediaFormat = await _context.MediaFormats.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(mediaFormat == null)
|
if(mediaFormat == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(mediaFormat);
|
return View(mediaFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/MediaFormats/Delete/5
|
// POST: Admin/MediaFormats/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
MediaFormat mediaFormat = await _context.MediaFormats.FindAsync(id);
|
MediaFormat mediaFormat = await _context.MediaFormats.FindAsync(id);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class MediasController : Controller
|
public sealed class MediasController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -25,22 +26,20 @@ public sealed class MediasController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Media media = await _context.Medias.FirstOrDefaultAsync(m => m.Id == id);
|
Media media = await _context.Medias.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(media == null)
|
if(media == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(media);
|
return View(media);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Medias/Delete/5
|
// POST: Admin/Medias/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Media media = await _context.Medias.FindAsync(id);
|
Media media = await _context.Medias.FindAsync(id);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class MmcController : Controller
|
public sealed class MmcController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -28,16 +29,12 @@ public sealed class MmcController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(mmc == null)
|
if(mmc == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(mmc);
|
return View(mmc);
|
||||||
}
|
}
|
||||||
@@ -46,22 +43,20 @@ public sealed class MmcController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(mmc == null)
|
if(mmc == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(mmc);
|
return View(mmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Mmc/Delete/5
|
// POST: Admin/Mmc/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Mmc mmc = await _context.Mmc.FindAsync(id);
|
Mmc mmc = await _context.Mmc.FindAsync(id);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class MmcFeaturesController : Controller
|
public sealed class MmcFeaturesController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,16 +17,12 @@ public sealed class MmcFeaturesController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
MmcFeatures mmcFeatures = await _context.MmcFeatures.FirstOrDefaultAsync(m => m.Id == id);
|
MmcFeatures mmcFeatures = await _context.MmcFeatures.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(mmcFeatures == null)
|
if(mmcFeatures == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(mmcFeatures);
|
return View(mmcFeatures);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class MmcSdsController : Controller
|
public sealed class MmcSdsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,16 +17,12 @@ public sealed class MmcSdsController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(mmcSd == null)
|
if(mmcSd == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(mmcSd);
|
return View(mmcSd);
|
||||||
}
|
}
|
||||||
@@ -34,22 +31,20 @@ public sealed class MmcSdsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(mmcSd == null)
|
if(mmcSd == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(mmcSd);
|
return View(mmcSd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/MmcSds/Delete/5
|
// POST: Admin/MmcSds/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
MmcSd mmcSd = await _context.MmcSd.FindAsync(id);
|
MmcSd mmcSd = await _context.MmcSd.FindAsync(id);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class OperatingSystemsController : Controller
|
public sealed class OperatingSystemsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class PartitionsController : Controller
|
public sealed class PartitionsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class PcmciasController : Controller
|
public sealed class PcmciasController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,22 +17,20 @@ public sealed class PcmciasController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id);
|
Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(pcmcia == null)
|
if(pcmcia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(pcmcia);
|
return View(pcmcia);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Pcmcias/Delete/5
|
// POST: Admin/Pcmcias/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Pcmcia pcmcia = await _context.Pcmcia.FindAsync(id);
|
Pcmcia pcmcia = await _context.Pcmcia.FindAsync(id);
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ using Microsoft.EntityFrameworkCore.ChangeTracking;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class ReportsController : Controller
|
public sealed class ReportsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -20,9 +21,7 @@ public sealed class ReportsController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
var model = new UploadedReportDetails
|
var model = new UploadedReportDetails
|
||||||
{
|
{
|
||||||
@@ -30,9 +29,7 @@ public sealed class ReportsController : Controller
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(model.Report is null)
|
if(model.Report is null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
model.ReportAll = _context.Devices.
|
model.ReportAll = _context.Devices.
|
||||||
Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
Where(d => d.Manufacturer == model.Report.Manufacturer &&
|
||||||
@@ -80,16 +77,12 @@ public sealed class ReportsController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
UploadedReport uploadedReport = await _context.Reports.FindAsync(id);
|
UploadedReport uploadedReport = await _context.Reports.FindAsync(id);
|
||||||
|
|
||||||
if(uploadedReport == null)
|
if(uploadedReport == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(uploadedReport);
|
return View(uploadedReport);
|
||||||
}
|
}
|
||||||
@@ -97,7 +90,8 @@ public sealed class ReportsController : Controller
|
|||||||
// POST: Admin/Reports/Edit/5
|
// POST: Admin/Reports/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(
|
public async Task<IActionResult> Edit(
|
||||||
int id, [Bind("Id,CompactFlash,Manufacturer,Model,Revision,Type")] UploadedReport changedModel)
|
int id, [Bind("Id,CompactFlash,Manufacturer,Model,Revision,Type")] UploadedReport changedModel)
|
||||||
{
|
{
|
||||||
@@ -135,22 +129,20 @@ public sealed class ReportsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
UploadedReport uploadedReport = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id);
|
UploadedReport uploadedReport = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(uploadedReport == null)
|
if(uploadedReport == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(uploadedReport);
|
return View(uploadedReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Reports/Delete/5
|
// POST: Admin/Reports/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
UploadedReport uploadedReport = await _context.Reports.FindAsync(id);
|
UploadedReport uploadedReport = await _context.Reports.FindAsync(id);
|
||||||
@@ -163,16 +155,12 @@ public sealed class ReportsController : Controller
|
|||||||
public IActionResult Promote(int? id)
|
public IActionResult Promote(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
UploadedReport uploadedReport = _context.Reports.FirstOrDefault(m => m.Id == id);
|
UploadedReport uploadedReport = _context.Reports.FirstOrDefault(m => m.Id == id);
|
||||||
|
|
||||||
if(uploadedReport == null)
|
if(uploadedReport == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
var device = new Device(uploadedReport.ATAId, uploadedReport.ATAPIId, uploadedReport.FireWireId,
|
var device = new Device(uploadedReport.ATAId, uploadedReport.ATAPIId, uploadedReport.FireWireId,
|
||||||
uploadedReport.MultiMediaCardId, uploadedReport.PCMCIAId,
|
uploadedReport.MultiMediaCardId, uploadedReport.PCMCIAId,
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class ScsiModesController : Controller
|
public sealed class ScsiModesController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,22 +17,20 @@ public sealed class ScsiModesController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id);
|
ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(scsiMode == null)
|
if(scsiMode == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(scsiMode);
|
return View(scsiMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/ScsiModes/Delete/5
|
// POST: Admin/ScsiModes/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
ScsiMode scsiMode = await _context.ScsiMode.FindAsync(id);
|
ScsiMode scsiMode = await _context.ScsiMode.FindAsync(id);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class ScsiPagesController : Controller
|
public sealed class ScsiPagesController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -16,22 +17,20 @@ public sealed class ScsiPagesController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id);
|
ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(scsiPage == null)
|
if(scsiPage == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(scsiPage);
|
return View(scsiPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/ScsiPages/Delete/5
|
// POST: Admin/ScsiPages/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id);
|
ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class ScsisController : Controller
|
public sealed class ScsisController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -24,22 +25,18 @@ public sealed class ScsisController : Controller
|
|||||||
StringHandlers.
|
StringHandlers.
|
||||||
CToString(m.Inquiry?.ProductIdentification)).
|
CToString(m.Inquiry?.ProductIdentification)).
|
||||||
ThenBy(m => StringHandlers.CToString(m.Inquiry?.
|
ThenBy(m => StringHandlers.CToString(m.Inquiry?.
|
||||||
ProductRevisionLevel)));
|
ProductRevisionLevel)));
|
||||||
|
|
||||||
// GET: Admin/Scsis/Details/5
|
// GET: Admin/Scsis/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(scsi == null)
|
if(scsi == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(scsi);
|
return View(scsi);
|
||||||
}
|
}
|
||||||
@@ -48,22 +45,20 @@ public sealed class ScsisController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(scsi == null)
|
if(scsi == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(scsi);
|
return View(scsi);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Scsis/Delete/5
|
// POST: Admin/Scsis/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Scsi scsi = await _context.Scsi.FindAsync(id);
|
Scsi scsi = await _context.Scsi.FindAsync(id);
|
||||||
@@ -75,13 +70,13 @@ public sealed class ScsisController : Controller
|
|||||||
|
|
||||||
public IActionResult Consolidate()
|
public IActionResult Consolidate()
|
||||||
{
|
{
|
||||||
List<IdHashModel> hashes = _context.Scsi.Where(m => m.InquiryData != null).
|
var hashes = _context.Scsi.Where(m => m.InquiryData != null).
|
||||||
Select(m => new IdHashModel(m.Id, Hash.Sha512(m.InquiryData))).ToList();
|
Select(m => new IdHashModel(m.Id, Hash.Sha512(m.InquiryData))).ToList();
|
||||||
|
|
||||||
List<IdHashModel> dups = hashes.GroupBy(x => x.Hash).Where(g => g.Count() > 1).
|
var dups = hashes.GroupBy(x => x.Hash).Where(g => g.Count() > 1).
|
||||||
Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key)).ToList();
|
Select(x => hashes.FirstOrDefault(y => y.Hash == x.Key)).ToList();
|
||||||
|
|
||||||
for(int i = 0; i < dups.Count; i++)
|
for(var i = 0; i < dups.Count; i++)
|
||||||
{
|
{
|
||||||
Scsi unique = _context.Scsi.First(a => a.Id == dups[i].Id);
|
Scsi unique = _context.Scsi.First(a => a.Id == dups[i].Id);
|
||||||
|
|
||||||
@@ -98,7 +93,9 @@ public sealed class ScsisController : Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("Consolidate"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Consolidate")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public IActionResult ConsolidateConfirmed(string models)
|
public IActionResult ConsolidateConfirmed(string models)
|
||||||
{
|
{
|
||||||
IdHashModel[] duplicates;
|
IdHashModel[] duplicates;
|
||||||
@@ -130,14 +127,10 @@ public sealed class ScsisController : Controller
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach(Device scsiDevice in _context.Devices.Where(d => d.SCSI.Id == duplicateId))
|
foreach(Device scsiDevice in _context.Devices.Where(d => d.SCSI.Id == duplicateId))
|
||||||
{
|
|
||||||
scsiDevice.SCSI = master;
|
scsiDevice.SCSI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport scsiReport in _context.Reports.Where(d => d.SCSI.Id == duplicateId))
|
foreach(UploadedReport scsiReport in _context.Reports.Where(d => d.SCSI.Id == duplicateId))
|
||||||
{
|
|
||||||
scsiReport.SCSI = master;
|
scsiReport.SCSI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == duplicateId))
|
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == duplicateId))
|
||||||
{
|
{
|
||||||
@@ -233,7 +226,8 @@ public sealed class ScsisController : Controller
|
|||||||
|
|
||||||
switch(la)
|
switch(la)
|
||||||
{
|
{
|
||||||
case null when ra is null: continue;
|
case null when ra is null:
|
||||||
|
continue;
|
||||||
case null:
|
case null:
|
||||||
model.ValueNames.Add(fieldInfo.Name);
|
model.ValueNames.Add(fieldInfo.Name);
|
||||||
model.LeftValues.Add("null");
|
model.LeftValues.Add("null");
|
||||||
@@ -251,10 +245,10 @@ public sealed class ScsisController : Controller
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<object> ll = la.Cast<object>().ToList();
|
var ll = la.Cast<object>().ToList();
|
||||||
List<object> rl = ra.Cast<object>().ToList();
|
var rl = ra.Cast<object>().ToList();
|
||||||
|
|
||||||
for(int i = 0; i < ll.Count; i++)
|
for(var i = 0; i < ll.Count; i++)
|
||||||
{
|
{
|
||||||
if(ll[i].Equals(rl[i]))
|
if(ll[i].Equals(rl[i]))
|
||||||
continue;
|
continue;
|
||||||
@@ -269,13 +263,13 @@ public sealed class ScsisController : Controller
|
|||||||
case nameof(Inquiry.Seagate_DriveSerialNumber):
|
case nameof(Inquiry.Seagate_DriveSerialNumber):
|
||||||
case nameof(Inquiry.Seagate_ServoPROMPartNo):
|
case nameof(Inquiry.Seagate_ServoPROMPartNo):
|
||||||
case nameof(Inquiry.VendorIdentification):
|
case nameof(Inquiry.VendorIdentification):
|
||||||
byte[] lb = new byte[ll.Count];
|
var lb = new byte[ll.Count];
|
||||||
byte[] rb = new byte[rl.Count];
|
var rb = new byte[rl.Count];
|
||||||
|
|
||||||
for(int j = 0; j < ll.Count; j++)
|
for(var j = 0; j < ll.Count; j++)
|
||||||
lb[j] = (byte)ll[j];
|
lb[j] = (byte)ll[j];
|
||||||
|
|
||||||
for(int j = 0; j < ll.Count; j++)
|
for(var j = 0; j < ll.Count; j++)
|
||||||
rb[j] = (byte)rl[j];
|
rb[j] = (byte)rl[j];
|
||||||
|
|
||||||
model.ValueNames.Add(fieldInfo.Name);
|
model.ValueNames.Add(fieldInfo.Name);
|
||||||
@@ -329,30 +323,30 @@ public sealed class ScsisController : Controller
|
|||||||
Scsi master = _context.Scsi.FirstOrDefault(m => m.Id == masterId);
|
Scsi master = _context.Scsi.FirstOrDefault(m => m.Id == masterId);
|
||||||
|
|
||||||
if(master is null)
|
if(master is null)
|
||||||
|
{
|
||||||
return RedirectToAction(nameof(Compare), new
|
return RedirectToAction(nameof(Compare), new
|
||||||
{
|
{
|
||||||
id = masterId,
|
id = masterId,
|
||||||
rightId = slaveId
|
rightId = slaveId
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Scsi slave = _context.Scsi.FirstOrDefault(m => m.Id == slaveId);
|
Scsi slave = _context.Scsi.FirstOrDefault(m => m.Id == slaveId);
|
||||||
|
|
||||||
if(slave is null)
|
if(slave is null)
|
||||||
|
{
|
||||||
return RedirectToAction(nameof(Compare), new
|
return RedirectToAction(nameof(Compare), new
|
||||||
{
|
{
|
||||||
id = masterId,
|
id = masterId,
|
||||||
rightId = slaveId
|
rightId = slaveId
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
foreach(Device scsiDevice in _context.Devices.Where(d => d.SCSI.Id == slaveId))
|
foreach(Device scsiDevice in _context.Devices.Where(d => d.SCSI.Id == slaveId))
|
||||||
{
|
|
||||||
scsiDevice.SCSI = master;
|
scsiDevice.SCSI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport scsiReport in _context.Reports.Where(d => d.SCSI.Id == slaveId))
|
foreach(UploadedReport scsiReport in _context.Reports.Where(d => d.SCSI.Id == slaveId))
|
||||||
{
|
|
||||||
scsiReport.SCSI = master;
|
scsiReport.SCSI = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == slaveId))
|
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.ScsiId == slaveId))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class SscsController : Controller
|
public sealed class SscsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -19,22 +20,20 @@ public sealed class SscsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Ssc ssc = await _context.Ssc.FirstOrDefaultAsync(m => m.Id == id);
|
Ssc ssc = await _context.Ssc.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(ssc == null)
|
if(ssc == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(ssc);
|
return View(ssc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Sscs/Delete/5
|
// POST: Admin/Sscs/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Ssc ssc = await _context.Ssc.FindAsync(id);
|
Ssc ssc = await _context.Ssc.FindAsync(id);
|
||||||
@@ -46,7 +45,7 @@ public sealed class SscsController : Controller
|
|||||||
|
|
||||||
public IActionResult Consolidate()
|
public IActionResult Consolidate()
|
||||||
{
|
{
|
||||||
List<SscModel> dups = _context.Ssc.GroupBy(x => new
|
var dups = _context.Ssc.GroupBy(x => new
|
||||||
{
|
{
|
||||||
x.BlockSizeGranularity,
|
x.BlockSizeGranularity,
|
||||||
x.MaxBlockLength,
|
x.MaxBlockLength,
|
||||||
@@ -65,7 +64,9 @@ public sealed class SscsController : Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("Consolidate"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Consolidate")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public IActionResult ConsolidateConfirmed(string models)
|
public IActionResult ConsolidateConfirmed(string models)
|
||||||
{
|
{
|
||||||
SscModel[] duplicates;
|
SscModel[] duplicates;
|
||||||
@@ -96,9 +97,7 @@ public sealed class SscsController : Controller
|
|||||||
m.MinBlockLength == duplicate.MinBlockLength).Skip(1).ToArray())
|
m.MinBlockLength == duplicate.MinBlockLength).Skip(1).ToArray())
|
||||||
{
|
{
|
||||||
foreach(TestedSequentialMedia media in _context.TestedSequentialMedia.Where(d => d.SscId == ssc.Id))
|
foreach(TestedSequentialMedia media in _context.TestedSequentialMedia.Where(d => d.SscId == ssc.Id))
|
||||||
{
|
|
||||||
media.SscId = master.Id;
|
media.SscId = master.Id;
|
||||||
}
|
|
||||||
|
|
||||||
_context.Ssc.Update(ssc);
|
_context.Ssc.Update(ssc);
|
||||||
_context.Ssc.Remove(ssc);
|
_context.Ssc.Remove(ssc);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class SupportedDensitiesController : Controller
|
public sealed class SupportedDensitiesController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -23,22 +24,20 @@ public sealed class SupportedDensitiesController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FirstOrDefaultAsync(m => m.Id == id);
|
SupportedDensity supportedDensity = await _context.SupportedDensity.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(supportedDensity == null)
|
if(supportedDensity == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(supportedDensity);
|
return View(supportedDensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/SupportedDensities/Delete/5
|
// POST: Admin/SupportedDensities/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
SupportedDensity supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ using Spare = Aaru.Decoders.Bluray.Spare;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class TestedMediasController : Controller
|
public sealed class TestedMediasController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -34,16 +35,12 @@ public sealed class TestedMediasController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(testedMedia == null)
|
if(testedMedia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(testedMedia);
|
return View(testedMedia);
|
||||||
}
|
}
|
||||||
@@ -52,16 +49,12 @@ public sealed class TestedMediasController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||||
|
|
||||||
if(testedMedia == null)
|
if(testedMedia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(testedMedia);
|
return View(testedMedia);
|
||||||
}
|
}
|
||||||
@@ -69,7 +62,8 @@ public sealed class TestedMediasController : Controller
|
|||||||
// POST: Admin/TestedMedias/Edit/5
|
// POST: Admin/TestedMedias/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(
|
public async Task<IActionResult> Edit(
|
||||||
int id, [Bind("Id,Blocks,BlockSize,LongBlockSize,Manufacturer,MediumTypeName,Model")] TestedMedia changedModel)
|
int id, [Bind("Id,Blocks,BlockSize,LongBlockSize,Manufacturer,MediumTypeName,Model")] TestedMedia changedModel)
|
||||||
{
|
{
|
||||||
@@ -108,22 +102,20 @@ public sealed class TestedMediasController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(testedMedia == null)
|
if(testedMedia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(testedMedia);
|
return View(testedMedia);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/TestedMedias/Delete/5
|
// POST: Admin/TestedMedias/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||||
@@ -141,9 +133,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
TestedMedia testedMedia = _context.TestedMedia.FirstOrDefault(m => m.Id == id);
|
TestedMedia testedMedia = _context.TestedMedia.FirstOrDefault(m => m.Id == id);
|
||||||
|
|
||||||
if(testedMedia == null)
|
if(testedMedia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
var model = new TestedMediaDataModel
|
var model = new TestedMediaDataModel
|
||||||
{
|
{
|
||||||
@@ -152,11 +142,11 @@ public sealed class TestedMediasController : Controller
|
|||||||
};
|
};
|
||||||
|
|
||||||
byte[] buffer;
|
byte[] buffer;
|
||||||
byte[] sector = new byte[2352];
|
var sector = new byte[2352];
|
||||||
byte[] subq = new byte[16];
|
var subq = new byte[16];
|
||||||
byte[] fullsub = new byte[96];
|
var fullsub = new byte[96];
|
||||||
bool c2Errors = false;
|
var c2Errors = false;
|
||||||
bool scrambled = false;
|
var scrambled = false;
|
||||||
|
|
||||||
switch(data)
|
switch(data)
|
||||||
{
|
{
|
||||||
@@ -205,7 +195,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
|
|
||||||
model.Decoded = Sector.Prettify(sector);
|
model.Decoded = Sector.Prettify(sector);
|
||||||
|
|
||||||
for(int i = 2352; i < buffer.Length; i++)
|
for(var i = 2352; i < buffer.Length; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] == 0x00)
|
if(buffer[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -258,7 +248,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
if(buffer.Length < 2448)
|
if(buffer.Length < 2448)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for(int i = 2352; i < 2616; i++)
|
for(var i = 2352; i < 2616; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] == 0x00)
|
if(buffer[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -428,7 +418,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
|
|
||||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||||
|
|
||||||
for(int i = 2352; i < 2646; i++)
|
for(var i = 2352; i < 2646; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] == 0x00)
|
if(buffer[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -582,7 +572,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
|
|
||||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||||
|
|
||||||
for(int i = 2448; i < buffer.Length; i++)
|
for(var i = 2448; i < buffer.Length; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] != 0x00)
|
if(buffer[i] != 0x00)
|
||||||
{
|
{
|
||||||
@@ -639,7 +629,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
|
|
||||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||||
|
|
||||||
for(int i = 2468; i < 2762; i++)
|
for(var i = 2468; i < 2762; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] == 0x00)
|
if(buffer[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -681,7 +671,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
|
|
||||||
model.Decoded += "\n" + GetPrettySub(fullsub);
|
model.Decoded += "\n" + GetPrettySub(fullsub);
|
||||||
|
|
||||||
for(int i = 2468; i < 2762; i++)
|
for(var i = 2468; i < 2762; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] == 0x00)
|
if(buffer[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -694,7 +684,8 @@ public sealed class TestedMediasController : Controller
|
|||||||
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
model.Decoded += "\n" + (c2Errors ? "C2 errors found." : "No C2 errors.");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default: return NotFound();
|
default:
|
||||||
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
model.RawDataAsHex = PrintHex.ByteArrayToHexArrayString(buffer);
|
model.RawDataAsHex = PrintHex.ByteArrayToHexArrayString(buffer);
|
||||||
@@ -712,10 +703,10 @@ public sealed class TestedMediasController : Controller
|
|||||||
{
|
{
|
||||||
byte[] deint = Subchannel.Deinterleave(sub);
|
byte[] deint = Subchannel.Deinterleave(sub);
|
||||||
|
|
||||||
bool validP = true;
|
var validP = true;
|
||||||
bool validRw = true;
|
var validRw = true;
|
||||||
|
|
||||||
for(int i = 0; i < 12; i++)
|
for(var i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
if(deint[i] == 0x00 ||
|
if(deint[i] == 0x00 ||
|
||||||
deint[i] == 0xFF)
|
deint[i] == 0xFF)
|
||||||
@@ -726,7 +717,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 24; i < 96; i++)
|
for(var i = 24; i < 96; i++)
|
||||||
{
|
{
|
||||||
if(deint[i] == 0x00)
|
if(deint[i] == 0x00)
|
||||||
continue;
|
continue;
|
||||||
@@ -736,7 +727,7 @@ public sealed class TestedMediasController : Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] q = new byte[12];
|
var q = new byte[12];
|
||||||
Array.Copy(deint, 12, q, 0, 12);
|
Array.Copy(deint, 12, q, 0, 12);
|
||||||
|
|
||||||
return Subchannel.PrettifyQ(q, deint[21] > 0x10, 16, !validP, false, validRw);
|
return Subchannel.PrettifyQ(q, deint[21] > 0x10, 16, !validP, false, validRw);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ using Aaru.CommonTypes.Metadata;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class TestedSequentialMediasController : Controller
|
public sealed class TestedSequentialMediasController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -18,16 +19,12 @@ public sealed class TestedSequentialMediasController : Controller
|
|||||||
public async Task<IActionResult> Edit(int? id)
|
public async Task<IActionResult> Edit(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||||
|
|
||||||
if(testedSequentialMedia == null)
|
if(testedSequentialMedia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(testedSequentialMedia);
|
return View(testedSequentialMedia);
|
||||||
}
|
}
|
||||||
@@ -35,7 +32,8 @@ public sealed class TestedSequentialMediasController : Controller
|
|||||||
// POST: Admin/TestedSequentialMedias/Edit/5
|
// POST: Admin/TestedSequentialMedias/Edit/5
|
||||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
// 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.
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(
|
public async Task<IActionResult> Edit(
|
||||||
int id, [Bind("Id,Manufacturer,MediumTypeName,Model")] TestedSequentialMedia changedModel)
|
int id, [Bind("Id,Manufacturer,MediumTypeName,Model")] TestedSequentialMedia changedModel)
|
||||||
{
|
{
|
||||||
@@ -71,23 +69,21 @@ public sealed class TestedSequentialMediasController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
TestedSequentialMedia testedSequentialMedia =
|
TestedSequentialMedia testedSequentialMedia =
|
||||||
await _context.TestedSequentialMedia.FirstOrDefaultAsync(m => m.Id == id);
|
await _context.TestedSequentialMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(testedSequentialMedia == null)
|
if(testedSequentialMedia == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(testedSequentialMedia);
|
return View(testedSequentialMedia);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/TestedSequentialMedias/Delete/5
|
// POST: Admin/TestedSequentialMedias/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class UsbProductsController : Controller
|
public sealed class UsbProductsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class UsbVendorsController : Controller
|
public sealed class UsbVendorsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -15,16 +16,12 @@ public sealed class UsbVendorsController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
UsbVendor usbVendor = await _context.UsbVendors.FirstOrDefaultAsync(m => m.Id == id);
|
UsbVendor usbVendor = await _context.UsbVendors.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(usbVendor == null)
|
if(usbVendor == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(new UsbVendorModel
|
return View(new UsbVendorModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class UsbsController : Controller
|
public sealed class UsbsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
@@ -19,16 +20,12 @@ public sealed class UsbsController : Controller
|
|||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(usb == null)
|
if(usb == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(usb);
|
return View(usb);
|
||||||
}
|
}
|
||||||
@@ -37,22 +34,20 @@ public sealed class UsbsController : Controller
|
|||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
{
|
{
|
||||||
if(id == null)
|
if(id == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
||||||
|
|
||||||
if(usb == null)
|
if(usb == null)
|
||||||
{
|
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
|
||||||
|
|
||||||
return View(usb);
|
return View(usb);
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: Admin/Usbs/Delete/5
|
// POST: Admin/Usbs/Delete/5
|
||||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
{
|
{
|
||||||
Usb usb = await _context.Usb.FindAsync(id);
|
Usb usb = await _context.Usb.FindAsync(id);
|
||||||
@@ -64,7 +59,7 @@ public sealed class UsbsController : Controller
|
|||||||
|
|
||||||
public IActionResult Consolidate()
|
public IActionResult Consolidate()
|
||||||
{
|
{
|
||||||
List<UsbModel> dups = _context.Usb.GroupBy(x => new
|
var dups = _context.Usb.GroupBy(x => new
|
||||||
{
|
{
|
||||||
x.Manufacturer,
|
x.Manufacturer,
|
||||||
x.Product,
|
x.Product,
|
||||||
@@ -85,7 +80,9 @@ public sealed class UsbsController : Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("Consolidate"), ValidateAntiForgeryToken]
|
[HttpPost]
|
||||||
|
[ActionName("Consolidate")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
public IActionResult ConsolidateConfirmed(string models)
|
public IActionResult ConsolidateConfirmed(string models)
|
||||||
{
|
{
|
||||||
UsbModel[] duplicates;
|
UsbModel[] duplicates;
|
||||||
@@ -125,14 +122,10 @@ public sealed class UsbsController : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach(Device device in _context.Devices.Where(d => d.USB.Id == slave.Id))
|
foreach(Device device in _context.Devices.Where(d => d.USB.Id == slave.Id))
|
||||||
{
|
|
||||||
device.USB = master;
|
device.USB = master;
|
||||||
}
|
|
||||||
|
|
||||||
foreach(UploadedReport report in _context.Reports.Where(d => d.USB.Id == slave.Id))
|
foreach(UploadedReport report in _context.Reports.Where(d => d.USB.Id == slave.Id))
|
||||||
{
|
|
||||||
report.USB = master;
|
report.USB = master;
|
||||||
}
|
|
||||||
|
|
||||||
if(master.Descriptors is null &&
|
if(master.Descriptors is null &&
|
||||||
slave.Descriptors != null)
|
slave.Descriptors != null)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||||
|
|
||||||
[Area("Admin"), Authorize]
|
[Area("Admin")]
|
||||||
|
[Authorize]
|
||||||
public sealed class VersionsController : Controller
|
public sealed class VersionsController : Controller
|
||||||
{
|
{
|
||||||
readonly AaruServerContext _context;
|
readonly AaruServerContext _context;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@using System.Text
|
@using System.Text
|
||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Ata>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.Ata>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -91,7 +92,7 @@ ATA IDENTIFY DEVICE responses with possible private data
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Ata item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.List)
|
@foreach(IdHashModel item in Model.List)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Do you want to remove the duplicates?
|
Do you want to remove the duplicates?
|
||||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||||
<input asp-for="Json" name="models" type="hidden" />
|
<input asp-for="Json" name="models" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Consolidate" />
|
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,13 +38,13 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,15 +37,15 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<form asp-action="Compare">
|
<form asp-action="Compare">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
Compare to:
|
Compare to:
|
||||||
<input name="RightId" type="number" />
|
<input name="RightId" type="number"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
<input class="btn btn-primary" type="submit" value="Compare" />
|
<input class="btn btn-primary" type="submit" value="Compare"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Ata>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.Ata>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Ata item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.BlockDescriptor>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.BlockDescriptor>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(BlockDescriptor item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.List)
|
@foreach(ChsModel item in Model.List)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Do you want to remove the duplicates?
|
Do you want to remove the duplicates?
|
||||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||||
<input asp-for="Json" name="models" type="hidden" />
|
<input asp-for="Json" name="models" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Consolidate" />
|
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Chs>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.Chs>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -51,7 +52,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Chs item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Command item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Compact disc offset</h4>
|
<h4>Compact disc offset</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,39 +34,39 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
}
|
}
|
||||||
<h4>Compact disc offset</h4>
|
<h4>Compact disc offset</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Manufacturer" class="control-label"></label>
|
<label asp-for="Manufacturer" class="control-label"></label>
|
||||||
<input asp-for="Manufacturer" class="form-control" />
|
<input asp-for="Manufacturer" class="form-control"/>
|
||||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Model" class="control-label"></label>
|
<label asp-for="Model" class="control-label"></label>
|
||||||
<input asp-for="Model" class="form-control" />
|
<input asp-for="Model" class="form-control"/>
|
||||||
<span asp-validation-for="Model" class="text-danger"></span>
|
<span asp-validation-for="Model" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Offset" class="control-label"></label>
|
<label asp-for="Offset" class="control-label"></label>
|
||||||
<input asp-for="Offset" class="form-control" />
|
<input asp-for="Offset" class="form-control"/>
|
||||||
<span asp-validation-for="Offset" class="text-danger"></span>
|
<span asp-validation-for="Offset" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Submissions" class="control-label"></label>
|
<label asp-for="Submissions" class="control-label"></label>
|
||||||
<input asp-for="Submissions" class="form-control" />
|
<input asp-for="Submissions" class="form-control"/>
|
||||||
<span asp-validation-for="Submissions" class="text-danger"></span>
|
<span asp-validation-for="Submissions" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Agreement" class="control-label"></label>
|
<label asp-for="Agreement" class="control-label"></label>
|
||||||
<input asp-for="Agreement" class="form-control" />
|
<input asp-for="Agreement" class="form-control"/>
|
||||||
<span asp-validation-for="Agreement" class="text-danger"></span>
|
<span asp-validation-for="Agreement" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="btn btn-primary" type="submit" value="Save" />
|
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(CompactDiscOffset item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Device statistic</h4>
|
<h4>Device statistic</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,34 +34,34 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
}
|
}
|
||||||
<h4>Device statistic</h4>
|
<h4>Device statistic</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Manufacturer" class="control-label"></label>
|
<label asp-for="Manufacturer" class="control-label"></label>
|
||||||
<input asp-for="Manufacturer" class="form-control" />
|
<input asp-for="Manufacturer" class="form-control"/>
|
||||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Model" class="control-label"></label>
|
<label asp-for="Model" class="control-label"></label>
|
||||||
<input asp-for="Model" class="form-control" />
|
<input asp-for="Model" class="form-control"/>
|
||||||
<span asp-validation-for="Model" class="text-danger"></span>
|
<span asp-validation-for="Model" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Revision" class="control-label"></label>
|
<label asp-for="Revision" class="control-label"></label>
|
||||||
<input asp-for="Revision" class="form-control" />
|
<input asp-for="Revision" class="form-control"/>
|
||||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Bus" class="control-label"></label>
|
<label asp-for="Bus" class="control-label"></label>
|
||||||
<input asp-for="Bus" class="form-control" />
|
<input asp-for="Bus" class="form-control"/>
|
||||||
<span asp-validation-for="Bus" class="text-danger"></span>
|
<span asp-validation-for="Bus" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="btn btn-primary" type="submit" value="Save" />
|
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(DeviceStat item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Device report</h4>
|
<h4>Device report</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||||
@@ -94,8 +94,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model DeviceDetails
|
@model DeviceDetails
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>Device report</h4>
|
<h4>Device report</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.Report.AddedWhen)
|
@Html.DisplayNameFor(model => model.Report.AddedWhen)
|
||||||
@@ -171,7 +172,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.SameAll)
|
@foreach(int item in Model.SameAll)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -201,7 +202,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.SameButManufacturer)
|
@foreach(int item in Model.SameButManufacturer)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -231,7 +232,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.ReportAll)
|
@foreach(int item in Model.ReportAll)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -261,7 +262,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.ReportButManufacturer)
|
@foreach(int item in Model.ReportButManufacturer)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -303,7 +304,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.StatsAll)
|
@foreach(DeviceStat item in Model.StatsAll)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -370,7 +371,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.StatsButManufacturer)
|
@foreach(DeviceStat item in Model.StatsButManufacturer)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -424,7 +425,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.TestedMedias)
|
@foreach(TestedMedia item in Model.TestedMedias)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -465,7 +466,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.TestedSequentialMedias)
|
@foreach(TestedSequentialMedia item in Model.TestedSequentialMedias)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -35,40 +35,40 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
}
|
}
|
||||||
<h4>Device report</h4>
|
<h4>Device report</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Manufacturer" class="control-label"></label>
|
<label asp-for="Manufacturer" class="control-label"></label>
|
||||||
<input asp-for="Manufacturer" class="form-control" />
|
<input asp-for="Manufacturer" class="form-control"/>
|
||||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Model" class="control-label"></label>
|
<label asp-for="Model" class="control-label"></label>
|
||||||
<input asp-for="Model" class="form-control" />
|
<input asp-for="Model" class="form-control"/>
|
||||||
<span asp-validation-for="Model" class="text-danger"></span>
|
<span asp-validation-for="Model" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Revision" class="control-label"></label>
|
<label asp-for="Revision" class="control-label"></label>
|
||||||
<input asp-for="Revision" class="form-control" />
|
<input asp-for="Revision" class="form-control"/>
|
||||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check form-group">
|
<div class="form-check form-group">
|
||||||
<label class="form-check-label">
|
<label class="form-check-label">
|
||||||
<input asp-for="CompactFlash" class="form-check-input" /> @Html.DisplayNameFor(model => model.CompactFlash)
|
<input asp-for="CompactFlash" class="form-check-input"/> @Html.DisplayNameFor(model => model.CompactFlash)
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="OptimalMultipleSectorsRead" class="control-label"></label>
|
<label asp-for="OptimalMultipleSectorsRead" class="control-label"></label>
|
||||||
<input asp-for="OptimalMultipleSectorsRead" class="form-control" />
|
<input asp-for="OptimalMultipleSectorsRead" class="form-control"/>
|
||||||
<span asp-validation-for="OptimalMultipleSectorsRead" class="text-danger"></span>
|
<span asp-validation-for="OptimalMultipleSectorsRead" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="CanReadGdRomUsingSwapDisc" class="control-label"></label>
|
<label asp-for="CanReadGdRomUsingSwapDisc" class="control-label"></label>
|
||||||
<input asp-for="CanReadGdRomUsingSwapDisc" class="form-control" />
|
<input asp-for="CanReadGdRomUsingSwapDisc" class="form-control"/>
|
||||||
<span asp-validation-for="CanReadGdRomUsingSwapDisc" class="text-danger"></span>
|
<span asp-validation-for="CanReadGdRomUsingSwapDisc" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<span asp-validation-for="Type" class="text-danger"></span>
|
<span asp-validation-for="Type" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="btn btn-primary" type="submit" value="Save" />
|
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>Found device reports with similar data</h4>
|
<h4>Found device reports with similar data</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||||
@@ -91,7 +91,7 @@ else
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.LikeDevices)
|
@foreach(Device item in Model.LikeDevices)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Device item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Filesystem item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Filter item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.List)
|
@foreach(FireWireModel item in Model.List)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Do you want to remove the duplicates?
|
Do you want to remove the duplicates?
|
||||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||||
<input asp-for="Json" name="models" type="hidden" />
|
<input asp-for="Json" name="models" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Consolidate" />
|
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>FireWire registers</h4>
|
<h4>FireWire registers</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.VendorID)
|
@Html.DisplayNameFor(model => model.VendorID)
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,39 +34,39 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
}
|
}
|
||||||
<h4>FireWire registers</h4>
|
<h4>FireWire registers</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="VendorID" class="control-label"></label>
|
<label asp-for="VendorID" class="control-label"></label>
|
||||||
<input asp-for="VendorID" class="form-control" />
|
<input asp-for="VendorID" class="form-control"/>
|
||||||
<span asp-validation-for="VendorID" class="text-danger"></span>
|
<span asp-validation-for="VendorID" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="ProductID" class="control-label"></label>
|
<label asp-for="ProductID" class="control-label"></label>
|
||||||
<input asp-for="ProductID" class="form-control" />
|
<input asp-for="ProductID" class="form-control"/>
|
||||||
<span asp-validation-for="ProductID" class="text-danger"></span>
|
<span asp-validation-for="ProductID" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Manufacturer" class="control-label"></label>
|
<label asp-for="Manufacturer" class="control-label"></label>
|
||||||
<input asp-for="Manufacturer" class="form-control" />
|
<input asp-for="Manufacturer" class="form-control"/>
|
||||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Product" class="control-label"></label>
|
<label asp-for="Product" class="control-label"></label>
|
||||||
<input asp-for="Product" class="form-control" />
|
<input asp-for="Product" class="form-control"/>
|
||||||
<span asp-validation-for="Product" class="text-danger"></span>
|
<span asp-validation-for="Product" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check form-group">
|
<div class="form-check form-group">
|
||||||
<label class="form-check-label">
|
<label class="form-check-label">
|
||||||
<input asp-for="RemovableMedia" class="form-check-input" /> @Html.DisplayNameFor(model => model.RemovableMedia)
|
<input asp-for="RemovableMedia" class="form-check-input"/> @Html.DisplayNameFor(model => model.RemovableMedia)
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="btn btn-primary" type="submit" value="Save" />
|
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.FireWire>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.FireWire>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(FireWire item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h2>GD-ROM swap-trick capabilities report</h2>
|
<h2>GD-ROM swap-trick capabilities report</h2>
|
||||||
<hr />
|
<hr/>
|
||||||
@if(Model.TestCrashed)
|
@if(Model.TestCrashed)
|
||||||
{
|
{
|
||||||
<h4>Computer crashed while testing.</h4>
|
<h4>Computer crashed while testing.</h4>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
else if(Model.RecognizedSwapDisc)
|
else if(Model.RecognizedSwapDisc)
|
||||||
{
|
{
|
||||||
<h4>Swap disc Lead-Out starts at @($"{Model.SwapDiscLeadOutPMIN:X2}"):@($"{Model.SwapDiscLeadOutPSEC:X2}"):@($"{Model.SwapDiscLeadOutPFRAM:X2}") (@($"{Model.SwapDiscLeadOutStart}") sectors).</h4>
|
<h4>Swap disc Lead-Out starts at @($"{Model.SwapDiscLeadOutPMIN:X2}"):@($"{Model.SwapDiscLeadOutPSEC:X2}"):@($"{Model.SwapDiscLeadOutPFRAM:X2}") (@($"{Model.SwapDiscLeadOutStart}") sectors).</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-4">Minimum readable sector in HD area:</dt>
|
<dt class="col-sm-4">Minimum readable sector in HD area:</dt>
|
||||||
<dd class="col-sm-8">@Model.MinimumReadableSectorInHdArea</dd>
|
<dd class="col-sm-8">@Model.MinimumReadableSectorInHdArea</dd>
|
||||||
@@ -1145,7 +1145,7 @@ else
|
|||||||
<h4>Swap disc not recognized, or firmware reset after tray opened.</h4>
|
<h4>Swap disc not recognized, or firmware reset after tray opened.</h4>
|
||||||
}
|
}
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h2>GD-ROM swap-trick capabilities report</h2>
|
<h2>GD-ROM swap-trick capabilities report</h2>
|
||||||
<hr />
|
<hr/>
|
||||||
@if(Model.TestCrashed)
|
@if(Model.TestCrashed)
|
||||||
{
|
{
|
||||||
<h4>Computer crashed while testing.</h4>
|
<h4>Computer crashed while testing.</h4>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
else if(Model.RecognizedSwapDisc)
|
else if(Model.RecognizedSwapDisc)
|
||||||
{
|
{
|
||||||
<h4>Swap disc Lead-Out starts at @($"{Model.SwapDiscLeadOutPMIN:X2}"):@($"{Model.SwapDiscLeadOutPSEC:X2}"):@($"{Model.SwapDiscLeadOutPFRAM:X2}") (@($"{Model.SwapDiscLeadOutStart}") sectors).</h4>
|
<h4>Swap disc Lead-Out starts at @($"{Model.SwapDiscLeadOutPMIN:X2}"):@($"{Model.SwapDiscLeadOutPSEC:X2}"):@($"{Model.SwapDiscLeadOutPFRAM:X2}") (@($"{Model.SwapDiscLeadOutStart}") sectors).</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-4">Minimum readable sector in HD area:</dt>
|
<dt class="col-sm-4">Minimum readable sector in HD area:</dt>
|
||||||
<dd class="col-sm-8">@Model.MinimumReadableSectorInHdArea</dd>
|
<dd class="col-sm-8">@Model.MinimumReadableSectorInHdArea</dd>
|
||||||
|
|||||||
@@ -32,66 +32,66 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
}
|
}
|
||||||
<a asp-action="Index" asp-controller="Atas">ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE responses</a>
|
<a asp-action="Index" asp-controller="Atas">ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE responses</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="BlockDescriptors">SCSI Streaming Devices Block Descriptors</a>
|
<a asp-action="Index" asp-controller="BlockDescriptors">SCSI Streaming Devices Block Descriptors</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Chs">Cylinders / Heads / Sectors triplets</a>
|
<a asp-action="Index" asp-controller="Chs">Cylinders / Heads / Sectors triplets</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Commands">Commands used</a>
|
<a asp-action="Index" asp-controller="Commands">Commands used</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="CompactDiscOffsets">Compact Disc Offsets</a>
|
<a asp-action="Index" asp-controller="CompactDiscOffsets">Compact Disc Offsets</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Devices">Device reports</a>
|
<a asp-action="Index" asp-controller="Devices">Device reports</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="DeviceStats">Device statistics</a>
|
<a asp-action="Index" asp-controller="DeviceStats">Device statistics</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Filesystems">Filesystems detected</a>
|
<a asp-action="Index" asp-controller="Filesystems">Filesystems detected</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Filters">Filters detected</a>
|
<a asp-action="Index" asp-controller="Filters">Filters detected</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="FireWires">FireWire devices reported</a>
|
<a asp-action="Index" asp-controller="FireWires">FireWire devices reported</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="MediaFormats">Media image formats detected</a>
|
<a asp-action="Index" asp-controller="MediaFormats">Media image formats detected</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Medias">Media types detected</a>
|
<a asp-action="Index" asp-controller="Medias">Media types detected</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Medias" asp-route-real="true">Media types detected in real devices</a>
|
<a asp-action="Index" asp-controller="Medias" asp-route-real="true">Media types detected in real devices</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Medias" asp-route-real="false">Media types detected in images</a>
|
<a asp-action="Index" asp-controller="Medias" asp-route-real="false">Media types detected in images</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Mmc">MODE SENSE page 2Ah responses</a>
|
<a asp-action="Index" asp-controller="Mmc">MODE SENSE page 2Ah responses</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="MmcFeatures">MMC GET FEATURES responses</a>
|
<a asp-action="Index" asp-controller="MmcFeatures">MMC GET FEATURES responses</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="MmcSds">MultiMediaCard / SecureDigital registers</a>
|
<a asp-action="Index" asp-controller="MmcSds">MultiMediaCard / SecureDigital registers</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="OperatingSystems">Operating systems detected</a>
|
<a asp-action="Index" asp-controller="OperatingSystems">Operating systems detected</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Partitions">Partitioning schemes detected</a>
|
<a asp-action="Index" asp-controller="Partitions">Partitioning schemes detected</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Pcmcias">PCMCIA card registers</a>
|
<a asp-action="Index" asp-controller="Pcmcias">PCMCIA card registers</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Reports">Uploaded reports</a>
|
<a asp-action="Index" asp-controller="Reports">Uploaded reports</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="ScsiModes">SCSI MODE SENSE responses</a>
|
<a asp-action="Index" asp-controller="ScsiModes">SCSI MODE SENSE responses</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="ScsiPages">SCSI MODE SENSE pages</a>
|
<a asp-action="Index" asp-controller="ScsiPages">SCSI MODE SENSE pages</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Scsis">SCSI INQUIRY responses</a>
|
<a asp-action="Index" asp-controller="Scsis">SCSI INQUIRY responses</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Sscs">SCSI STREAMING COMMANDS limits</a>
|
<a asp-action="Index" asp-controller="Sscs">SCSI STREAMING COMMANDS limits</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="SupportedDensities">SCSI supported densities</a>
|
<a asp-action="Index" asp-controller="SupportedDensities">SCSI supported densities</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="TestedMedias">Tested media</a>
|
<a asp-action="Index" asp-controller="TestedMedias">Tested media</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="TestedSequentialMedias">Tested media on SCSI streaming devices</a>
|
<a asp-action="Index" asp-controller="TestedSequentialMedias">Tested media on SCSI streaming devices</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Usbs">USB devices</a>
|
<a asp-action="Index" asp-controller="Usbs">USB devices</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="UsbProducts">USB products</a>
|
<a asp-action="Index" asp-controller="UsbProducts">USB products</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="UsbVendors">USB vendors</a>
|
<a asp-action="Index" asp-controller="UsbVendors">USB vendors</a>
|
||||||
<br />
|
<br/>
|
||||||
<a asp-action="Index" asp-controller="Versions">Aaru versions used</a>
|
<a asp-action="Index" asp-controller="Versions">Aaru versions used</a>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Media image format</h4>
|
<h4>Media image format</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.Name)
|
@Html.DisplayNameFor(model => model.Name)
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(MediaFormat item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Media</h4>
|
<h4>Media</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.Type)
|
@Html.DisplayNameFor(model => model.Type)
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Media item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -38,11 +38,11 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>SCSI CD-ROM capabilities page - ID = @Model.Id</h4>
|
<h4>SCSI CD-ROM capabilities page - ID = @Model.Id</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
|
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>SCSI CD-ROM capabilities page - ID = @Model.Id</h4>
|
<h4>SCSI CD-ROM capabilities page - ID = @Model.Id</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
|
@Html.Raw(Html.EncodedMultiLineText(Modes.PrettifyModePage_2A(Model.ModeSense2AData)))
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(MmcModelForView item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>MMC FEATURES</h4>
|
<h4>MMC FEATURES</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.AACSVersion)
|
@Html.DisplayNameFor(model => model.AACSVersion)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.MmcFeatures>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.MmcFeatures>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -410,7 +411,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(MmcFeatures item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>MultiMediaCard / SecureDigital registers</h4>
|
<h4>MultiMediaCard / SecureDigital registers</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
@if(Model.SCR != null)
|
@if(Model.SCR != null)
|
||||||
{
|
{
|
||||||
@@ -119,8 +119,8 @@
|
|||||||
}
|
}
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>MultiMediaCard / SecureDigital registers</h4>
|
<h4>MultiMediaCard / SecureDigital registers</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
@if(Model.SCR != null)
|
@if(Model.SCR != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.MmcSd>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.MmcSd>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(MmcSd item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using OperatingSystem = Aaru.Server.Models.OperatingSystem
|
||||||
@model IEnumerable<Aaru.Server.Models.OperatingSystem>
|
@model IEnumerable<Aaru.Server.Models.OperatingSystem>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(OperatingSystem item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Partition item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>PCMCIA data</h4>
|
<h4>PCMCIA data</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.CIS)
|
@Html.DisplayNameFor(model => model.CIS)
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Pcmcia>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.Pcmcia>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Pcmcia item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Uploaded report</h4>
|
<h4>Uploaded report</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.UploadedWhen)
|
@Html.DisplayNameFor(model => model.UploadedWhen)
|
||||||
@@ -46,8 +46,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model UploadedReportDetails
|
@model UploadedReportDetails
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -5,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>Uploaded report</h4>
|
<h4>Uploaded report</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.Report.UploadedWhen)
|
@Html.DisplayNameFor(model => model.Report.UploadedWhen)
|
||||||
@@ -124,7 +125,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.SameAll)
|
@foreach(int item in Model.SameAll)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -154,7 +155,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.SameButManufacturer)
|
@foreach(int item in Model.SameButManufacturer)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -184,7 +185,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.ReportAll)
|
@foreach(int item in Model.ReportAll)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -214,7 +215,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.ReportButManufacturer)
|
@foreach(int item in Model.ReportButManufacturer)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -250,7 +251,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.TestedMedias)
|
@foreach(TestedMedia item in Model.TestedMedias)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -291,7 +292,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.TestedSequentialMedias)
|
@foreach(TestedSequentialMedia item in Model.TestedSequentialMedias)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -5,30 +5,30 @@
|
|||||||
ViewData["Title"] = "Edit";
|
ViewData["Title"] = "Edit";
|
||||||
}
|
}
|
||||||
<h4>Uploaded report</h4>
|
<h4>Uploaded report</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Manufacturer" class="control-label"></label>
|
<label asp-for="Manufacturer" class="control-label"></label>
|
||||||
<input asp-for="Manufacturer" class="form-control" />
|
<input asp-for="Manufacturer" class="form-control"/>
|
||||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Model" class="control-label"></label>
|
<label asp-for="Model" class="control-label"></label>
|
||||||
<input asp-for="Model" class="form-control" />
|
<input asp-for="Model" class="form-control"/>
|
||||||
<span asp-validation-for="Model" class="text-danger"></span>
|
<span asp-validation-for="Model" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Revision" class="control-label"></label>
|
<label asp-for="Revision" class="control-label"></label>
|
||||||
<input asp-for="Revision" class="form-control" />
|
<input asp-for="Revision" class="form-control"/>
|
||||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check form-group">
|
<div class="form-check form-group">
|
||||||
<label class="form-check-label">
|
<label class="form-check-label">
|
||||||
<input asp-for="CompactFlash" class="form-check-input" /> @Html.DisplayNameFor(model => model.CompactFlash)
|
<input asp-for="CompactFlash" class="form-check-input"/> @Html.DisplayNameFor(model => model.CompactFlash)
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<span asp-validation-for="Type" class="text-danger"></span>
|
<span asp-validation-for="Type" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="btn btn-primary" type="submit" value="Save" />
|
<input class="btn btn-primary" type="submit" value="Save"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(UploadedReport item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>SCSI MODE SENSE response</h4>
|
<h4>SCSI MODE SENSE response</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.MediumType)
|
@Html.DisplayNameFor(model => model.MediumType)
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.ScsiMode>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.ScsiMode>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(ScsiMode item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>ScsiPage</h4>
|
<h4>ScsiPage</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.page)
|
@Html.DisplayNameFor(model => model.page)
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.ScsiPage>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.ScsiPage>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(ScsiPage item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.List)
|
@foreach(IdHashModel item in Model.List)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Do you want to remove the duplicates?
|
Do you want to remove the duplicates?
|
||||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||||
<input asp-for="Json" name="models" type="hidden" />
|
<input asp-for="Json" name="models" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Consolidate" />
|
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>SCSI INQUIRY - ID = @Model.Id</h4>
|
<h4>SCSI INQUIRY - ID = @Model.Id</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
@Html.Raw(Html.EncodedMultiLineText(Inquiry.Prettify(Model.InquiryData)))
|
@Html.Raw(Html.EncodedMultiLineText(Inquiry.Prettify(Model.InquiryData)))
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,15 +37,15 @@
|
|||||||
}
|
}
|
||||||
<div>
|
<div>
|
||||||
<h4>SCSI INQUIRY - ID = @Model.Id</h4>
|
<h4>SCSI INQUIRY - ID = @Model.Id</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
@Html.Raw(Html.EncodedMultiLineText(Inquiry.Prettify(Model.InquiryData)))
|
@Html.Raw(Html.EncodedMultiLineText(Inquiry.Prettify(Model.InquiryData)))
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<form asp-action="Compare">
|
<form asp-action="Compare">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
Compare to:
|
Compare to:
|
||||||
<input name="RightId" type="number" />
|
<input name="RightId" type="number"/>
|
||||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||||
<input class="btn btn-primary" type="submit" value="Compare" />
|
<input class="btn btn-primary" type="submit" value="Compare"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@using Aaru.Helpers
|
@using Aaru.Helpers
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Scsi>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.Scsi>
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Scsi item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -42,20 +42,20 @@
|
|||||||
{
|
{
|
||||||
// 24th January, Macintosh launch
|
// 24th January, Macintosh launch
|
||||||
case 24:
|
case 24:
|
||||||
<link href="~/css/mac/aaruserver.css" rel="stylesheet" type="text/css" />
|
<link href="~/css/mac/aaruserver.css" rel="stylesheet" type="text/css"/>
|
||||||
<script src="~/js/colors/mac.js"></script>
|
<script src="~/js/colors/mac.js"></script>
|
||||||
break;
|
break;
|
||||||
// 23rd July, Amiga launch
|
// 23rd July, Amiga launch
|
||||||
case 204:
|
case 204:
|
||||||
<link href="~/css/amiga/aaruserver.css" rel="stylesheet" type="text/css" />
|
<link href="~/css/amiga/aaruserver.css" rel="stylesheet" type="text/css"/>
|
||||||
<script src="~/js/colors/amiga.js"></script>
|
<script src="~/js/colors/amiga.js"></script>
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
<link href="~/css/dos/aaruserver.css" rel="stylesheet" type="text/css" />
|
<link href="~/css/dos/aaruserver.css" rel="stylesheet" type="text/css"/>
|
||||||
<script src="~/js/colors/dos.js"></script>
|
<script src="~/js/colors/dos.js"></script>
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8"/>
|
||||||
<title>@ViewBag.Title</title>
|
<title>@ViewBag.Title</title>
|
||||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111466173-1"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111466173-1"></script>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<a href="http://www.claunia.com" target="_blank">
|
<a href="http://www.claunia.com" target="_blank">
|
||||||
Claunia.com
|
Claunia.com
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br/>
|
||||||
@switch(DateTime.UtcNow.DayOfYear)
|
@switch(DateTime.UtcNow.DayOfYear)
|
||||||
{
|
{
|
||||||
// 24th January, Macintosh launch
|
// 24th January, Macintosh launch
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
@Html.Raw("Fonts are © 2015 - 2016 <a href=\"http://int10h.org\" target=\"_blank\">VileR</a>")
|
@Html.Raw("Fonts are © 2015 - 2016 <a href=\"http://int10h.org\" target=\"_blank\">VileR</a>")
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
<br />
|
<br/>
|
||||||
CSS © 2018-2019
|
CSS © 2018-2019
|
||||||
<a href="https://getbootstrap.com/" target="_blank">
|
<a href="https://getbootstrap.com/" target="_blank">
|
||||||
Bootstrap
|
Bootstrap
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model.List)
|
@foreach(SscModel item in Model.List)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Do you want to remove the duplicates?
|
Do you want to remove the duplicates?
|
||||||
<form asp-action="Consolidate" enctype="multipart/form-data">
|
<form asp-action="Consolidate" enctype="multipart/form-data">
|
||||||
<input asp-for="Json" name="models" type="hidden" />
|
<input asp-for="Json" name="models" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Consolidate" />
|
<input class="btn btn-danger" type="submit" value="Consolidate"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>SSC</h4>
|
<h4>SSC</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.BlockSizeGranularity)
|
@Html.DisplayNameFor(model => model.BlockSizeGranularity)
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Aaru.CommonTypes.Metadata
|
||||||
@model IEnumerable<Aaru.CommonTypes.Metadata.Ssc>
|
@model IEnumerable<Aaru.CommonTypes.Metadata.Ssc>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach(var item in Model)
|
@foreach(Ssc item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h3>Are you sure you want to delete this?</h3>
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Supported density</h4>
|
<h4>Supported density</h4>
|
||||||
<hr />
|
<hr/>
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
<dt class="col-sm-2">
|
||||||
@Html.DisplayNameFor(model => model.PrimaryCode)
|
@Html.DisplayNameFor(model => model.PrimaryCode)
|
||||||
@@ -112,8 +112,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden"/>
|
||||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
<input class="btn btn-danger" type="submit" value="Delete"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user