diff --git a/Marechai/Areas/Admin/Views/CompanyDescriptions/Index.cshtml b/Marechai/Areas/Admin/Views/CompanyDescriptions/Index.cshtml index 22bb5a9f..9a77b591 100644 --- a/Marechai/Areas/Admin/Views/CompanyDescriptions/Index.cshtml +++ b/Marechai/Areas/Admin/Views/CompanyDescriptions/Index.cshtml @@ -37,7 +37,7 @@

Company description

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/CompanyLogos/Index.cshtml b/Marechai/Areas/Admin/Views/CompanyLogos/Index.cshtml index e5eab199..fbbf99b7 100644 --- a/Marechai/Areas/Admin/Views/CompanyLogos/Index.cshtml +++ b/Marechai/Areas/Admin/Views/CompanyLogos/Index.cshtml @@ -6,7 +6,7 @@

Company logos

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/GpusByMachine/Index.cshtml b/Marechai/Areas/Admin/Views/GpusByMachine/Index.cshtml index cbd43a4b..04c71476 100644 --- a/Marechai/Areas/Admin/Views/GpusByMachine/Index.cshtml +++ b/Marechai/Areas/Admin/Views/GpusByMachine/Index.cshtml @@ -6,7 +6,7 @@

GPUs by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml index cbd43a4b..04c71476 100644 --- a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml +++ b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml @@ -6,7 +6,7 @@

GPUs by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/Home/Index.cshtml b/Marechai/Areas/Admin/Views/Home/Index.cshtml index 2d276cb4..1d17ebfc 100644 --- a/Marechai/Areas/Admin/Views/Home/Index.cshtml +++ b/Marechai/Areas/Admin/Views/Home/Index.cshtml @@ -42,8 +42,6 @@
Instruction sets
- Instruction set extensions -
Instruction set extensions by processor
Licenses @@ -81,13 +79,6 @@ Storage by machines
-
-

Administrative pages for documents

- Document companies -
- Document people -
-

Administrative pages for owned machines

Owned machines @@ -102,8 +93,4 @@
Storage by owned machine
-
-
-

User administrative pages

- @* TODO *@ To be implemented
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/InstructionSetExtensionsByProcessor/Index.cshtml b/Marechai/Areas/Admin/Views/InstructionSetExtensionsByProcessor/Index.cshtml index fafcff6e..43c621c3 100644 --- a/Marechai/Areas/Admin/Views/InstructionSetExtensionsByProcessor/Index.cshtml +++ b/Marechai/Areas/Admin/Views/InstructionSetExtensionsByProcessor/Index.cshtml @@ -6,7 +6,7 @@

Instruction set extensions by processor

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/InstructionSets/Index.cshtml b/Marechai/Areas/Admin/Views/InstructionSets/Index.cshtml index 226c605d..c6148d0c 100644 --- a/Marechai/Areas/Admin/Views/InstructionSets/Index.cshtml +++ b/Marechai/Areas/Admin/Views/InstructionSets/Index.cshtml @@ -37,7 +37,7 @@

Instruction sets

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/Licenses/Index.cshtml b/Marechai/Areas/Admin/Views/Licenses/Index.cshtml index cfdc9eed..cf82d143 100644 --- a/Marechai/Areas/Admin/Views/Licenses/Index.cshtml +++ b/Marechai/Areas/Admin/Views/Licenses/Index.cshtml @@ -6,7 +6,7 @@

Licenses

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/MachineFamilies/Index.cshtml b/Marechai/Areas/Admin/Views/MachineFamilies/Index.cshtml index b4eeb2f7..d01830b8 100644 --- a/Marechai/Areas/Admin/Views/MachineFamilies/Index.cshtml +++ b/Marechai/Areas/Admin/Views/MachineFamilies/Index.cshtml @@ -37,7 +37,7 @@

Machine families

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/MachinePhotos/Index.cshtml b/Marechai/Areas/Admin/Views/MachinePhotos/Index.cshtml index 23a2f74f..2c8621b0 100644 --- a/Marechai/Areas/Admin/Views/MachinePhotos/Index.cshtml +++ b/Marechai/Areas/Admin/Views/MachinePhotos/Index.cshtml @@ -6,7 +6,7 @@

Machine photos

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/Machines/Index.cshtml b/Marechai/Areas/Admin/Views/Machines/Index.cshtml index 43e3da27..24484355 100644 --- a/Marechai/Areas/Admin/Views/Machines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/Machines/Index.cshtml @@ -37,7 +37,7 @@

Machines

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/MemoryByMachines/Index.cshtml b/Marechai/Areas/Admin/Views/MemoryByMachines/Index.cshtml index e542441d..4b9de10c 100644 --- a/Marechai/Areas/Admin/Views/MemoryByMachines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/MemoryByMachines/Index.cshtml @@ -37,7 +37,7 @@

Memory by machines

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml index e542441d..4b9de10c 100644 --- a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml @@ -37,7 +37,7 @@

Memory by machines

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml b/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml index b2503cb9..b61ba7bf 100644 --- a/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml +++ b/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml @@ -5,7 +5,7 @@ }

Owned machines

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/People/Index.cshtml b/Marechai/Areas/Admin/Views/People/Index.cshtml index 182a2a10..dfa940f2 100644 --- a/Marechai/Areas/Admin/Views/People/Index.cshtml +++ b/Marechai/Areas/Admin/Views/People/Index.cshtml @@ -5,7 +5,7 @@ }

People

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/Processors/Index.cshtml b/Marechai/Areas/Admin/Views/Processors/Index.cshtml index cd4666a3..79ac3058 100644 --- a/Marechai/Areas/Admin/Views/Processors/Index.cshtml +++ b/Marechai/Areas/Admin/Views/Processors/Index.cshtml @@ -37,7 +37,7 @@

Processors

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/ProcessorsByMachines/Index.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByMachines/Index.cshtml index ef2e3193..f2cd7c21 100644 --- a/Marechai/Areas/Admin/Views/ProcessorsByMachines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/ProcessorsByMachines/Index.cshtml @@ -37,7 +37,7 @@

Processors by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml index ef2e3193..f2cd7c21 100644 --- a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml @@ -37,7 +37,7 @@

Processors by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/Resolutions/Index.cshtml b/Marechai/Areas/Admin/Views/Resolutions/Index.cshtml index d2289cf3..43df4353 100644 --- a/Marechai/Areas/Admin/Views/Resolutions/Index.cshtml +++ b/Marechai/Areas/Admin/Views/Resolutions/Index.cshtml @@ -37,7 +37,7 @@

Resolutions

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/ResolutionsByGpu/Index.cshtml b/Marechai/Areas/Admin/Views/ResolutionsByGpu/Index.cshtml index bae8fc0e..ec276fe2 100644 --- a/Marechai/Areas/Admin/Views/ResolutionsByGpu/Index.cshtml +++ b/Marechai/Areas/Admin/Views/ResolutionsByGpu/Index.cshtml @@ -6,7 +6,7 @@

Resolutions by GPU

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/ResolutionsByScreen/Index.cshtml b/Marechai/Areas/Admin/Views/ResolutionsByScreen/Index.cshtml index f8962959..6e0535c3 100644 --- a/Marechai/Areas/Admin/Views/ResolutionsByScreen/Index.cshtml +++ b/Marechai/Areas/Admin/Views/ResolutionsByScreen/Index.cshtml @@ -6,7 +6,7 @@

Resolutions by screen

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/Screens/Index.cshtml b/Marechai/Areas/Admin/Views/Screens/Index.cshtml index dfd6a980..b9c6cf64 100644 --- a/Marechai/Areas/Admin/Views/Screens/Index.cshtml +++ b/Marechai/Areas/Admin/Views/Screens/Index.cshtml @@ -6,7 +6,7 @@

Screens

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/ScreensByMachine/Index.cshtml b/Marechai/Areas/Admin/Views/ScreensByMachine/Index.cshtml index 6d7f786e..68e9558f 100644 --- a/Marechai/Areas/Admin/Views/ScreensByMachine/Index.cshtml +++ b/Marechai/Areas/Admin/Views/ScreensByMachine/Index.cshtml @@ -6,7 +6,7 @@

Screens by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/SoundByMachine/Index.cshtml b/Marechai/Areas/Admin/Views/SoundByMachine/Index.cshtml index 4d1d6992..38172635 100644 --- a/Marechai/Areas/Admin/Views/SoundByMachine/Index.cshtml +++ b/Marechai/Areas/Admin/Views/SoundByMachine/Index.cshtml @@ -6,7 +6,7 @@

Sound synthesizers by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml index 4d1d6992..38172635 100644 --- a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml +++ b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml @@ -6,7 +6,7 @@

Sound synthesizers by machine

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/SoundSynths/Index.cshtml b/Marechai/Areas/Admin/Views/SoundSynths/Index.cshtml index b31c531b..d136a422 100644 --- a/Marechai/Areas/Admin/Views/SoundSynths/Index.cshtml +++ b/Marechai/Areas/Admin/Views/SoundSynths/Index.cshtml @@ -37,7 +37,7 @@

Sound synthesizers

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/StorageByMachines/Index.cshtml b/Marechai/Areas/Admin/Views/StorageByMachines/Index.cshtml index e3886539..089109b6 100644 --- a/Marechai/Areas/Admin/Views/StorageByMachines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/StorageByMachines/Index.cshtml @@ -37,7 +37,7 @@

Storage by machines

- Create New + Create new

diff --git a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml index e3886539..089109b6 100644 --- a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml +++ b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml @@ -37,7 +37,7 @@

Storage by machines

- Create New + Create new

diff --git a/Marechai/Marechai.csproj b/Marechai/Marechai.csproj index 4e0cd9d6..74c10cc5 100644 --- a/Marechai/Marechai.csproj +++ b/Marechai/Marechai.csproj @@ -2,7 +2,7 @@ netcoreapp3.1 - 3.0.99.1053 + 3.0.99.1055 Canary Islands Computer Museum Copyright © 2003-2020 Natalia Portillo Canary Islands Computer Museum Website @@ -52,6 +52,9 @@ true + + true + <_ContentIncludedByDefault Remove="Areas\Admin\Views\BrowserTests\Delete.cshtml" /> diff --git a/Marechai/Pages/Admin/DocumentCompanies.razor b/Marechai/Pages/Admin/DocumentCompanies.razor index 1434334f..87a0f00e 100644 --- a/Marechai/Pages/Admin/DocumentCompanies.razor +++ b/Marechai/Pages/Admin/DocumentCompanies.razor @@ -43,7 +43,7 @@ }

- @L["Create New"] + @L["Create new"]

diff --git a/Marechai/Pages/Admin/DocumentPeople.razor b/Marechai/Pages/Admin/DocumentPeople.razor index 990d1927..dc3ccab9 100644 --- a/Marechai/Pages/Admin/DocumentPeople.razor +++ b/Marechai/Pages/Admin/DocumentPeople.razor @@ -43,7 +43,7 @@ }

- @L["Create New"] + @L["Create new"]

diff --git a/Marechai/Pages/Admin/Gpus.razor b/Marechai/Pages/Admin/Gpus.razor index 94042d3d..422e6388 100644 --- a/Marechai/Pages/Admin/Gpus.razor +++ b/Marechai/Pages/Admin/Gpus.razor @@ -43,7 +43,7 @@ }

- @L["Create New"] + @L["Create new"]

diff --git a/Marechai/Pages/Admin/Index.razor b/Marechai/Pages/Admin/Index.razor index 4a1d2eb2..3d56c795 100644 --- a/Marechai/Pages/Admin/Index.razor +++ b/Marechai/Pages/Admin/Index.razor @@ -50,6 +50,9 @@
  • @L["Graphics Processing Units"]
  • +
  • + @L["Instruction set extensions"] +
  • diff --git a/Marechai/Areas/Admin/Views/InstructionSetExtensions/Index.cshtml b/Marechai/Pages/Admin/InstructionSetExtensions.razor similarity index 56% rename from Marechai/Areas/Admin/Views/InstructionSetExtensions/Index.cshtml rename to Marechai/Pages/Admin/InstructionSetExtensions.razor index 034f01b0..a6a9182f 100644 --- a/Marechai/Areas/Admin/Views/InstructionSetExtensions/Index.cshtml +++ b/Marechai/Pages/Admin/InstructionSetExtensions.razor @@ -1,14 +1,14 @@ -@{ - /****************************************************************************** +@{ +/****************************************************************************** // MARECHAI: Master repository of computing history artifacts information // ---------------------------------------------------------------------------- // -// Filename : Index.cshtml +// Filename : InstructionSetExtensions.razor // Author(s) : Natalia Portillo // // --[ Description ] ---------------------------------------------------------- // -// Admin view index +// List of instruction set extensions // // --[ License ] -------------------------------------------------------------- // @@ -29,45 +29,62 @@ // Copyright © 2003-2020 Natalia Portillo *******************************************************************************/ } -@model IEnumerable -@{ - ViewData["Title"] = "Instruction set extensions (Admin)"; +@page "/admin/instruction_set_extensions" +@using Marechai.Database.Models +@inherits OwningComponentBase +@inject IStringLocalizer L +@attribute [Authorize(Roles = "UberAdmin, Admin")] +

    @L["Instruction set extensions"]

    +@if (_extensions is null) +{ +

    @L["Loading..."]

    + + return; } -

    Instruction set extensions

    - - Create New - + + @L["Create new"] +

    - @foreach (var item in Model) + @foreach (var item in _extensions) { } -
    - @Html.DisplayNameFor(model => model.Extension) + @L["Extensions"]
    - @Html.DisplayFor(modelItem => item.Extension) + @item.Extension - - Details - - - Edit - - - Delete - + + @L["Details"] + + + @L["Edit"] + + + @L["Delete"] +
    \ No newline at end of file + + +@code +{ + List _extensions; + + protected override async Task OnInitializedAsync() + { + _extensions = await Service.GetAsync(); + } +} \ No newline at end of file diff --git a/Marechai/Resources/Services/AdminService.es.resx b/Marechai/Resources/Services/AdminService.es.resx index 547b0647..d6d6f7dd 100644 --- a/Marechai/Resources/Services/AdminService.es.resx +++ b/Marechai/Resources/Services/AdminService.es.resx @@ -166,4 +166,8 @@ Páginas de administración de usuarios User administrative pages. + + Extensiones de arquitectura + Instruction set extensions. + \ No newline at end of file diff --git a/Marechai/Resources/Services/InstructionSetExtensionsService.es.resx b/Marechai/Resources/Services/InstructionSetExtensionsService.es.resx new file mode 100644 index 00000000..613927b0 --- /dev/null +++ b/Marechai/Resources/Services/InstructionSetExtensionsService.es.resx @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Extensiones de arquitectura + Instruction set extensions + + + Cargando... + Message that appears while data is being loaded from database + + + Extensión + Extension + + + Crear nueva + Create new + + + Detalles + Details + + + Editar + Edit + + + Eliminar + Delete + + \ No newline at end of file diff --git a/Marechai/Services/InstructionSetExtensionsService.cs b/Marechai/Services/InstructionSetExtensionsService.cs new file mode 100644 index 00000000..76402de6 --- /dev/null +++ b/Marechai/Services/InstructionSetExtensionsService.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Marechai.Database.Models; +using Microsoft.EntityFrameworkCore; + +namespace Marechai.Services +{ + public class InstructionSetExtensionsService + { + readonly MarechaiContext _context; + + public InstructionSetExtensionsService(MarechaiContext context) => _context = context; + + public async Task> GetAsync() => + await _context.InstructionSetExtensions.OrderBy(e => e.Extension).ToListAsync(); + } +} \ No newline at end of file diff --git a/Marechai/Services/Register.cs b/Marechai/Services/Register.cs index fef0c514..0e7705af 100644 --- a/Marechai/Services/Register.cs +++ b/Marechai/Services/Register.cs @@ -51,6 +51,7 @@ namespace Marechai.Services services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); } } } \ No newline at end of file