2020-05-22 03:35:50 +01:00
|
|
|
@{
|
|
|
|
|
/******************************************************************************
|
2020-02-10 01:52:56 +00:00
|
|
|
// MARECHAI: Master repository of computing history artifacts information
|
2018-04-14 07:13:11 +01:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
2020-05-22 04:43:44 +01:00
|
|
|
// Filename : View.razor
|
2018-04-14 07:13:11 +01:00
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
2020-05-22 04:43:44 +01:00
|
|
|
// Shows a machine information
|
2018-04-14 07:13:11 +01:00
|
|
|
//
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as
|
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2020-02-10 03:05:39 +00:00
|
|
|
// Copyright © 2003-2020 Natalia Portillo
|
2018-04-14 07:13:11 +01:00
|
|
|
*******************************************************************************/
|
2020-05-22 03:35:50 +01:00
|
|
|
// TODO: Resolutions
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|
2020-05-22 03:35:50 +01:00
|
|
|
|
|
|
|
|
@page "/machine/{Id:int}"
|
|
|
|
|
|
2020-05-22 04:43:44 +01:00
|
|
|
@using Marechai.Database
|
2020-05-22 03:35:50 +01:00
|
|
|
@inherits OwningComponentBase<MachinesService>
|
|
|
|
|
@inject IStringLocalizer<MachinesService> L
|
|
|
|
|
@inject IWebHostEnvironment Host
|
|
|
|
|
|
|
|
|
|
@if (!_loaded)
|
|
|
|
|
{
|
|
|
|
|
<p align="center">@L["Loading..."]</p>
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (_machine is null)
|
|
|
|
|
{
|
|
|
|
|
<p align="center">@L["Machine not found in database"]</p>
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-06 21:07:23 +01:00
|
|
|
<p align="center">
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (_machine.CompanyLogo != null &&
|
|
|
|
|
File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", _machine.CompanyLogo + ".svg")))
|
2018-04-20 19:17:59 +01:00
|
|
|
{
|
|
|
|
|
<picture>
|
2020-05-22 04:43:44 +01:00
|
|
|
<source type="image/svg+xml" srcset="/assets/logos/@(_machine.CompanyLogo).svg">
|
|
|
|
|
<source type="image/webp" srcset="/assets/logos/webp/1x/@(_machine.CompanyLogo).webp,
|
|
|
|
|
/assets/logos/webp/2x/@(_machine.CompanyLogo).webp 2x,
|
|
|
|
|
/assets/logos/webp/3x/@(_machine.CompanyLogo).webp 3x">
|
|
|
|
|
<img srcset="/assets/logos/png/1x/@(_machine.CompanyLogo).png,
|
|
|
|
|
/assets/logos/png/2x/@(_machine.CompanyLogo).png 2x,
|
|
|
|
|
/assets/logos/png/3x/@(_machine.CompanyLogo).png 3x" src="/assets/logos/png/1x/@(_machine.CompanyLogo).png" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
2018-04-20 19:17:59 +01:00
|
|
|
</picture>
|
|
|
|
|
}
|
|
|
|
|
</p>
|
2020-02-10 22:44:18 +00:00
|
|
|
@{ var counter = 0; }
|
2018-08-06 23:24:00 +01:00
|
|
|
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Introduced.HasValue &&
|
|
|
|
|
_machine.Introduced.Value.Year == 1000)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
|
|
|
|
<b>
|
2018-04-22 03:51:36 +01:00
|
|
|
<div style="text-align: center;">PROTOTYPE</div>
|
2018-04-14 07:13:11 +01:00
|
|
|
</b>
|
|
|
|
|
}
|
2018-04-22 03:51:36 +01:00
|
|
|
<b>
|
2020-05-22 04:43:44 +01:00
|
|
|
<a href="/company/@_machine.CompanyId">
|
|
|
|
|
@_machine.CompanyName</a> @_machine.Name</b>
|
2018-08-06 21:07:23 +01:00
|
|
|
<table width="100%">
|
2018-04-14 07:13:11 +01:00
|
|
|
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Introduced.HasValue &&
|
|
|
|
|
_machine.Introduced.Value.Year != 1000)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-02-10 22:44:18 +00:00
|
|
|
<th scope=row width="37%">
|
2018-04-14 07:13:11 +01:00
|
|
|
<div align=right>
|
2018-04-28 21:29:01 +01:00
|
|
|
Introduction date
|
2018-04-14 07:13:11 +01:00
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td width="63%">
|
2020-05-22 03:35:50 +01:00
|
|
|
<a asp-controller="Computer" asp-action="ByYear" asp-route-id="@_machine.Introduced.Value.Year">
|
|
|
|
|
@_machine.Introduced.Value.ToLongDateString()</a>
|
2018-04-14 07:13:11 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (_machine.FamilyId != null)
|
2018-04-29 02:02:33 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-02-10 22:44:18 +00:00
|
|
|
<th scope=row width="37%">
|
2018-04-29 02:02:33 +01:00
|
|
|
<div align=right>
|
|
|
|
|
Family
|
|
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td width="63%">
|
2020-05-22 04:43:44 +01:00
|
|
|
<a href="/machines/family/@_machine.FamilyId">
|
|
|
|
|
@_machine.FamilyName</a>
|
2018-04-29 02:02:33 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Model != null)
|
2018-04-29 02:02:33 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-02-10 22:44:18 +00:00
|
|
|
<th scope=row width="37%">
|
2018-04-29 02:02:33 +01:00
|
|
|
<div align=right>
|
|
|
|
|
Model
|
|
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td width="63%">
|
2020-05-22 03:35:50 +01:00
|
|
|
@_machine.Model
|
2018-04-29 02:02:33 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Processors.Count > 0)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-04-22 03:51:36 +01:00
|
|
|
<th scope=row>
|
|
|
|
|
<div align=right>
|
2018-04-28 13:16:53 +01:00
|
|
|
Processors
|
2018-04-22 03:51:36 +01:00
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
2018-08-06 23:24:00 +01:00
|
|
|
@{ counter = 0; }
|
2020-05-22 04:43:44 +01:00
|
|
|
@foreach (var processor in _machine.Processors)
|
2018-04-22 03:51:36 +01:00
|
|
|
{
|
2018-08-06 23:24:00 +01:00
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Speed > 0)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@(processor.GprSize > 0 ? $"{processor.Name} @ {processor.Speed}Mhz ({processor.GprSize} bits)" : $"{processor.Name} @ {processor.Speed}Mhz")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
else
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@($"{processor.Name}")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
|
|
|
|
<a aria-controls="@($"cpuInfo{counter}")" aria-expanded="false" class="btn btn-link" data-toggle="collapse" href="@($"#cpuInfo{counter}")">
|
2018-08-06 23:24:00 +01:00
|
|
|
+info
|
|
|
|
|
</a>
|
2020-02-10 22:44:18 +00:00
|
|
|
<div class="collapse" id="@($"cpuInfo{counter}")">
|
2018-08-06 23:24:00 +01:00
|
|
|
<div class="card card-body">
|
|
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.ModelCode != null &&
|
|
|
|
|
processor.ModelCode != processor.Name)
|
2018-04-28 13:16:53 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Model</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.ModelCode</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Manufacturer</td>
|
2018-04-22 03:51:36 +01:00
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<a href="/processors/company/@processor.CompanyId">
|
|
|
|
|
@processor.CompanyName</a>
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Introduced != null)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Introduction date</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@($"{processor.Introduced:yyyy}")</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.InstructionSet != null)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
2018-04-28 13:16:53 +01:00
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Instruction set</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.InstructionSet</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Speed > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Nominal speed</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.Speed MHz</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Gprs > 0 ||
|
|
|
|
|
processor.Fprs > 0 ||
|
|
|
|
|
processor.SimdRegisters > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Registers</td>
|
2018-04-28 13:16:53 +01:00
|
|
|
<td>
|
2018-08-06 23:24:00 +01:00
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Gprs > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.Gprs general purpose registers of @processor.GprSize bits
|
|
|
|
|
@if (processor.FprSize > 0 &&
|
|
|
|
|
processor.Fprs == 0)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@($", that can be used as floating point registers of {processor.FprSize}")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.SimdSize > 0 &&
|
|
|
|
|
processor.SimdRegisters == 0)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@($", that can be used as SIMD registers of {processor.FprSize}")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Fprs > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.Fprs floating-point registers of @processor.FprSize bits
|
|
|
|
|
@if (processor.SimdSize > 0 &&
|
|
|
|
|
processor.SimdRegisters == 0)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@($", that can be used as SIMD registers of {processor.FprSize}")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.SimdRegisters > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.SimdRegisters
|
|
|
|
|
<abbr title="Single instruction, multiple data">SIMD</abbr>registers of @processor.SimdSize bits
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
2018-04-28 13:16:53 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Cores > 1)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Multi-core</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.Cores cores</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.ThreadsPerCore > 1)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 03:35:50 +01:00
|
|
|
<abbr title="Simultaneous multithreading">SMT</abbr>
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.ThreadsPerCore threads
|
|
|
|
|
@if (processor.Cores > 1)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
|
|
|
|
@(" per core")
|
|
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.DataBus > 0 ||
|
|
|
|
|
processor.AddrBus > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Bus</td>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.DataBus > 0)
|
2018-04-28 13:16:53 +01:00
|
|
|
{
|
2018-08-06 23:24:00 +01:00
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.DataBus-bit data
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2018-04-28 13:16:53 +01:00
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.AddrBus > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.AddrBus-bit address
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2018-04-28 13:16:53 +01:00
|
|
|
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.L1Instruction > 0 ||
|
|
|
|
|
processor.L1Data > 0 ||
|
|
|
|
|
processor.L2 > 0 ||
|
|
|
|
|
processor.L2 > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Cache</td>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.L1Instruction > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@(processor.L1Data < 0 ? $"{processor.L1Instruction}KiB combined instruction-data L1" : $"{processor.L1Instruction}KiB instruction L1")
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.L1Data > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@($"{processor.L1Data}KiB data L1")
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.L2 > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@($"{processor.L2}KiB L2")
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.L3 > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@($"{processor.L3}KiB L3")
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Package != null)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Package</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.Package</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Process != null ||
|
|
|
|
|
processor.ProcessNm > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Manufacturing process</td>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Process != null &&
|
|
|
|
|
processor.ProcessNm > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.Process
|
2018-08-06 23:24:00 +01:00
|
|
|
@("@")
|
2020-05-22 04:43:44 +01:00
|
|
|
@(processor.ProcessNm > 100 ? $"{processor.ProcessNm / 100}µm" : $"{processor.ProcessNm}nm")
|
2018-08-06 23:24:00 +01:00
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
else if (processor.ProcessNm > 0)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@(processor.ProcessNm > 100 ? $"{processor.ProcessNm / 100}µm" : $"{processor.ProcessNm}nm")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
else
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@processor.Process
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.DieSize > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Die size</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.DieSize mm²</td>
|
2018-04-28 13:16:53 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (processor.Transistors > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Transistors</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@processor.Transistors</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
counter++;
|
2018-04-22 03:51:36 +01:00
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2018-04-14 07:13:11 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Memory != null &&
|
|
|
|
|
_machine.Memory.Count > 0)
|
2018-04-28 17:27:35 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope=row>
|
|
|
|
|
<div align=right>
|
|
|
|
|
Memory
|
|
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
2020-05-22 03:35:50 +01:00
|
|
|
@foreach (var memory in _machine.Memory)
|
2018-04-28 17:27:35 +01:00
|
|
|
{
|
|
|
|
|
string memValue;
|
2020-02-10 22:44:18 +00:00
|
|
|
if (memory.Size > 1073741824)
|
|
|
|
|
{
|
|
|
|
|
memValue = $"{memory.Size / 1073741824} GiB";
|
|
|
|
|
}
|
|
|
|
|
else if (memory.Size > 1048576)
|
|
|
|
|
{
|
|
|
|
|
memValue = $"{memory.Size / 1048576} MiB";
|
|
|
|
|
}
|
|
|
|
|
else if (memory.Size > 1024)
|
|
|
|
|
{
|
|
|
|
|
memValue = $"{memory.Size / 1024} KiB";
|
|
|
|
|
}
|
|
|
|
|
else if (memory.Size > 0)
|
|
|
|
|
{
|
|
|
|
|
memValue = $"{memory.Size} bytes";
|
|
|
|
|
}
|
2018-04-28 17:27:35 +01:00
|
|
|
else
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
|
|
|
|
memValue = "Unknown size";
|
|
|
|
|
}
|
2018-04-28 17:27:35 +01:00
|
|
|
|
|
|
|
|
string speedValue;
|
2020-02-10 22:44:18 +00:00
|
|
|
if (memory.Speed > 1000000000)
|
|
|
|
|
{
|
|
|
|
|
speedValue = $"{memory.Speed / 1000000000} GHz";
|
|
|
|
|
}
|
|
|
|
|
else if (memory.Speed > 1000000)
|
|
|
|
|
{
|
|
|
|
|
speedValue = $"{memory.Speed / 1000000} MHz";
|
|
|
|
|
}
|
|
|
|
|
else if (memory.Speed > 1000)
|
|
|
|
|
{
|
|
|
|
|
speedValue = $"{memory.Speed / 1000} KHz";
|
|
|
|
|
}
|
|
|
|
|
else if (memory.Speed > 0)
|
|
|
|
|
{
|
|
|
|
|
speedValue = $"{memory.Speed} Hz";
|
|
|
|
|
}
|
2018-04-28 17:27:35 +01:00
|
|
|
else
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
|
|
|
|
speedValue = "unknown speed";
|
|
|
|
|
}
|
2018-04-28 17:27:35 +01:00
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>@memValue of @memory.Usage memory (@memory.Type at @speedValue)</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Gpus.Count > 0)
|
2018-04-27 15:29:53 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope=row>
|
|
|
|
|
<div align=right>
|
2018-04-28 14:39:21 +01:00
|
|
|
Graphics processing units
|
2018-04-27 15:29:53 +01:00
|
|
|
</div>
|
|
|
|
|
</th>
|
2018-04-28 14:39:21 +01:00
|
|
|
<td>
|
|
|
|
|
<table>
|
2018-08-06 23:24:00 +01:00
|
|
|
@{ counter = 0; }
|
2020-05-22 04:43:44 +01:00
|
|
|
@foreach (var gpu in _machine.Gpus)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
if (gpu.Id == -2)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<td>
|
|
|
|
|
Framebuffer
|
2020-02-10 22:44:18 +00:00
|
|
|
<a aria-controls="@($"gpuInfo{counter}")" aria-expanded="false" class="btn btn-link" data-toggle="collapse" href="@($"#gpuInfo{counter}")">
|
2018-08-06 23:24:00 +01:00
|
|
|
+info
|
|
|
|
|
</a>
|
2020-02-10 22:44:18 +00:00
|
|
|
<div class="collapse" id="@($"gpuInfo{counter}")">
|
2018-08-06 23:24:00 +01:00
|
|
|
<div class="card card-body">
|
2020-02-10 22:44:18 +00:00
|
|
|
This computer directly draws pixels from software to a memory region that's converted to video output by a
|
|
|
|
|
<abbr title="Digital to Analog Converter">DAC</abbr> or similar without using any specific graphics processing unit.
|
2018-08-06 23:24:00 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
else
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@($"{gpu.Name}")
|
2020-02-10 22:44:18 +00:00
|
|
|
<a aria-controls="@($"gpuInfo{counter}")" aria-expanded="false" class="btn btn-link" data-toggle="collapse" href="@($"#gpuInfo{counter}")">
|
2018-08-06 23:24:00 +01:00
|
|
|
+info
|
|
|
|
|
</a>
|
2020-02-10 22:44:18 +00:00
|
|
|
<div class="collapse" id="@($"gpuInfo{counter}")">
|
2018-08-06 23:24:00 +01:00
|
|
|
<div class="card card-body">
|
|
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.ModelCode != null &&
|
|
|
|
|
gpu.ModelCode != gpu.Name)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Model</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@gpu.ModelCode</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Manufacturer</td>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<a href="/gpus/company/@gpu.CompanyId">
|
|
|
|
|
@gpu.Company</a>
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.Introduced != null)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Introduction date</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@($"{gpu.Introduced:yyyy}")</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.Package != null)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Package</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@gpu.Package</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.Process != null ||
|
|
|
|
|
gpu.ProcessNm > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Manufacturing process</td>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.Process != null &&
|
|
|
|
|
gpu.ProcessNm > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@gpu.Process
|
2018-08-06 23:24:00 +01:00
|
|
|
@("@")
|
2020-05-22 04:43:44 +01:00
|
|
|
@(gpu.ProcessNm > 100 ? $"{gpu.ProcessNm / 100}µm" : $"{gpu.ProcessNm}nm")
|
2018-08-06 23:24:00 +01:00
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
else if (gpu.ProcessNm > 0)
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@(gpu.ProcessNm > 100 ? $"{gpu.ProcessNm / 100}µm" : $"{gpu.ProcessNm}nm")
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
else
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
2020-05-22 04:43:44 +01:00
|
|
|
@gpu.Process
|
2020-02-10 22:44:18 +00:00
|
|
|
}
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.DieSize > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Die size</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@gpu.DieSize mm²</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (gpu.Transistors > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Transistors</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@gpu.Transistors</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
counter++;
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (_machine.SoundSynthetizers.Count > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope=row>
|
|
|
|
|
<div align=right>
|
|
|
|
|
Sound synthetizers
|
|
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
|
|
|
|
@{ counter = 0; }
|
2020-05-22 04:43:44 +01:00
|
|
|
@foreach (var sound in _machine.SoundSynthetizers)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Id == -2)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
|
|
|
|
<td>
|
2018-08-06 23:24:00 +01:00
|
|
|
Software
|
2020-02-10 22:44:18 +00:00
|
|
|
<a aria-controls="@($"synthInfo{counter}")" aria-expanded="false" class="btn btn-link" data-toggle="collapse" href="@($"#synthInfo{counter}")">
|
2018-04-28 14:39:21 +01:00
|
|
|
+info
|
|
|
|
|
</a>
|
2020-02-10 22:44:18 +00:00
|
|
|
<div class="collapse" id="@($"synthInfo{counter}")">
|
2018-04-28 14:39:21 +01:00
|
|
|
<div class="card card-body">
|
2020-02-10 22:44:18 +00:00
|
|
|
This computer directly sends data to a
|
|
|
|
|
<abbr title="Digital to Analog Converter">DAC</abbr> or similar connected to the audio output.
|
2018-04-28 14:39:21 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@($"{sound.Name}")
|
2020-02-10 22:44:18 +00:00
|
|
|
<a aria-controls="@($"synthInfo{counter}")" aria-expanded="false" class="btn btn-link" data-toggle="collapse" href="@($"#synthInfo{counter}")">
|
2018-04-28 14:39:21 +01:00
|
|
|
+info
|
|
|
|
|
</a>
|
2020-02-10 22:44:18 +00:00
|
|
|
<div class="collapse" id="@($"synthInfo{counter}")">
|
2018-04-28 14:39:21 +01:00
|
|
|
<div class="card card-body">
|
|
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.ModelCode != null &&
|
|
|
|
|
sound.ModelCode != sound.Name)
|
2018-04-27 15:29:53 +01:00
|
|
|
{
|
2018-04-28 14:39:21 +01:00
|
|
|
<tr>
|
|
|
|
|
<td>Model</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@sound.ModelCode</td>
|
2018-04-28 14:39:21 +01:00
|
|
|
</tr>
|
2018-04-27 15:29:53 +01:00
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.CompanyId != null)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Manufacturer</td>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<a href="/soundsynths/company/@sound.CompanyId">
|
|
|
|
|
@sound.CompanyName</a>
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
2018-04-28 14:39:21 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Introduced != null)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Introduction date</td>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@($"{sound.Introduced:yyyy}")</td>
|
2018-04-28 14:39:21 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Voices != 0 ||
|
|
|
|
|
sound.SquareWave != 0 ||
|
|
|
|
|
sound.WhiteNoise != 0)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Generators</td>
|
2018-04-28 14:39:21 +01:00
|
|
|
<td>
|
2018-08-06 23:24:00 +01:00
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Voices != 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@sound.Voices voices</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.SquareWave != 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@sound.SquareWave square wave</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.WhiteNoise != 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@sound.WhiteNoise white noise</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
2018-04-28 14:39:21 +01:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Depth != 0 ||
|
|
|
|
|
sound.Frequency > 0)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Sample rate</td>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Depth != 0 &&
|
|
|
|
|
sound.Frequency > 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@sound.Depth bits at @(sound.Frequency > 1000 ? $"{sound.Frequency / 1000}KHz" : $"{sound.Frequency}Hz")</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
else if (sound.Depth != 0)
|
2018-08-06 23:24:00 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@sound.Depth bits</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<tr>
|
2020-05-22 04:43:44 +01:00
|
|
|
<td>@(sound.Frequency > 1000 ? $"{sound.Frequency / 1000}KHz" : $"{sound.Frequency}Hz")</td>
|
2018-08-06 23:24:00 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2018-04-28 14:39:21 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 04:43:44 +01:00
|
|
|
@if (sound.Type != 0)
|
2018-04-28 14:39:21 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
<td>Synthetizer type</td>
|
|
|
|
|
<td>
|
2020-05-22 04:43:44 +01:00
|
|
|
@sound.Type
|
2018-08-06 23:24:00 +01:00
|
|
|
</td>
|
2018-04-28 14:39:21 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
}
|
2018-04-29 02:02:33 +01:00
|
|
|
</tr>
|
2018-08-06 23:24:00 +01:00
|
|
|
counter++;
|
2018-04-28 15:55:57 +01:00
|
|
|
}
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (_machine.Storage.Count > 0)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope=row>
|
|
|
|
|
<div align=right>
|
2018-04-28 20:52:58 +01:00
|
|
|
Storage
|
2018-04-14 07:13:11 +01:00
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<td>
|
2018-04-28 20:52:58 +01:00
|
|
|
<table>
|
2020-05-22 03:35:50 +01:00
|
|
|
@foreach (var storage in _machine.Storage)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
2018-04-28 20:52:58 +01:00
|
|
|
string capString = null;
|
2018-04-14 07:13:11 +01:00
|
|
|
|
2020-02-10 22:44:18 +00:00
|
|
|
if (storage.Capacity != 0)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
2020-02-10 22:44:18 +00:00
|
|
|
if (storage.Type == StorageType.CompactCassette)
|
|
|
|
|
{
|
|
|
|
|
capString = $"{storage.Capacity} bps";
|
|
|
|
|
}
|
2018-04-14 07:13:11 +01:00
|
|
|
else
|
|
|
|
|
{
|
2020-02-10 22:44:18 +00:00
|
|
|
if (storage.Capacity > 1073741824)
|
|
|
|
|
{
|
|
|
|
|
capString = $"{storage.Capacity / 1073741824} GiB";
|
|
|
|
|
}
|
|
|
|
|
else if (storage.Capacity > 1048576)
|
|
|
|
|
{
|
|
|
|
|
capString = $"{storage.Capacity / 1048576} MiB";
|
|
|
|
|
}
|
|
|
|
|
else if (storage.Capacity > 1024)
|
|
|
|
|
{
|
|
|
|
|
capString = $"{storage.Capacity / 1024} KiB";
|
|
|
|
|
}
|
|
|
|
|
else if (storage.Capacity > 0)
|
|
|
|
|
{
|
|
|
|
|
capString = $"{storage.Capacity} bytes";
|
|
|
|
|
}
|
2018-04-28 20:52:58 +01:00
|
|
|
else
|
2020-02-10 22:44:18 +00:00
|
|
|
{
|
|
|
|
|
capString = null;
|
|
|
|
|
}
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-28 20:52:58 +01:00
|
|
|
<tr>
|
2020-02-10 22:44:18 +00:00
|
|
|
@if (storage.Interface != StorageInterface.Unknown)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
2020-02-10 22:44:18 +00:00
|
|
|
if (storage.Type == StorageType.Empty)
|
2018-04-28 20:52:58 +01:00
|
|
|
{
|
|
|
|
|
<td>Available @storage.Interface interface.</td>
|
|
|
|
|
}
|
|
|
|
|
else
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
2020-02-10 22:44:18 +00:00
|
|
|
if (capString != null)
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
2018-04-28 20:52:58 +01:00
|
|
|
<td>@storage.Type connected thru a @storage.Interface interface with a nominal capacity of @capString</td>
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2018-04-28 20:52:58 +01:00
|
|
|
<td>@storage.Type connected thru a @storage.Interface interface</td>
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-02-10 22:44:18 +00:00
|
|
|
if (capString != null)
|
2018-04-28 20:52:58 +01:00
|
|
|
{
|
|
|
|
|
<td>@storage.Type with a nominal capacity of @capString</td>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<td>@storage.Type</td>
|
|
|
|
|
}
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|
2018-04-28 20:52:58 +01:00
|
|
|
</tr>
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|
2018-04-28 20:52:58 +01:00
|
|
|
</table>
|
|
|
|
|
</td>
|
2018-04-14 07:13:11 +01:00
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</table>
|
2020-05-22 03:35:50 +01:00
|
|
|
@if (File.Exists(Path.Combine(Host.WebRootPath, "assets/photos/computers", _machine.Id + ".jpg")))
|
2018-04-14 07:13:11 +01:00
|
|
|
{
|
2020-05-22 03:35:50 +01:00
|
|
|
<img src="@Path.Combine("/assets/photos/computers", _machine.Id + ".jpg")" alt="">
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
{
|
|
|
|
|
[Parameter]
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
2020-05-22 04:43:44 +01:00
|
|
|
MachineViewModel _machine;
|
2020-05-22 03:35:50 +01:00
|
|
|
bool _loaded;
|
|
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
|
|
|
|
_machine = await Service.GetMachine(Id);
|
|
|
|
|
|
|
|
|
|
_loaded = true;
|
|
|
|
|
}
|
2018-04-14 07:13:11 +01:00
|
|
|
}
|