Add start of CPU section

This commit is contained in:
Timothy Warren 2022-10-27 11:55:16 -04:00
parent 9af61e0c7e
commit a64ec3f913
17 changed files with 716 additions and 19 deletions

View File

@ -0,0 +1,56 @@
<?php declare(strict_types=1);
namespace App\Controller;
use App\Entity\Cpu;
use App\Form\CpuType;
use App\Traits\FormControllerTrait;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[Route('/cpu')]
class CpuController extends AbstractController {
use FormControllerTrait;
protected const ENTITY = Cpu::class;
protected const TEMPLATE_PATH = 'cpu/';
protected const ROUTE_PREFIX = 'cpu_';
protected const FORM = CpuType::class;
public function __construct(private readonly EntityManagerInterface $entityManager)
{
}
#[Route('/', name: 'app_cpu_index', methods: ['GET'])]
public function index(): Response
{
return $this->itemListView('cpus', []);
}
#[Route('/new', name: 'app_cpu_new', methods: ['GET', 'POST'])]
public function new(Request $request): Response
{
return $this->itemCreate($request, 'cpu');
}
#[Route('/{id}', name: 'app_cpu_show', methods: ['GET'])]
public function show(Cpu $cpu): Response
{
return $this->itemView($cpu, 'cpu');
}
#[Route('/{id}/edit', name: 'app_cpu_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Cpu $cpu): Response
{
return $this->itemUpdate($request, $cpu, 'cpu');
}
#[Route('/{id}', name: 'app_cpu_delete', methods: ['POST'])]
public function delete(Request $request, Cpu $cpu): Response
{
return $this->deleteCSRF($request, $cpu);
}
}

View File

@ -2,34 +2,108 @@
namespace App\Entity;
use App\Enum\CpuArchitectureEnum;
use Doctrine\Common\Collections\{Collection, ArrayCollection};
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'cpu', schema: 'collection')]
#[ORM\Table('cpu', schema: 'collection')]
#[ORM\Entity]
class Cpu {
use CpuCache;
use GetSetTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Column('id', type: 'integer', nullable: FALSE)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private int $id;
#[ORM\ManyToOne(targetEntity: 'Brand', fetch: 'EAGER')]
#[ORM\OrderBy(['name' => 'asc'])]
#[ORM\JoinColumn(name: 'brand_id', referencedColumnName: 'id', nullable: FALSE)]
#[ORM\JoinColumn('brand_id', referencedColumnName: 'id', nullable: FALSE)]
private Brand $brand;
#[ORM\Column('architecture', type: 'string', enumType: CpuArchitectureEnum::class)]
private string $architecture;
/**
* @var Collection<int, Socket>
*/
#[ORM\ManyToMany(targetEntity: Socket::class)]
#[ORM\JoinTable(name: 'collection.cpu_socket_link')]
#[ORM\JoinColumn(name: 'socket_id', referencedColumnName: 'id')]
#[ORM\InverseJoinColumn(name: 'cpu_id', referencedColumnName: 'id')]
#[ORM\JoinTable('collection.cpu_socket_link')]
#[ORM\JoinColumn('socket_id', referencedColumnName: 'id')]
#[ORM\InverseJoinColumn('cpu_id', referencedColumnName: 'id')]
#[ORM\OrderBy(['name' => 'asc'])]
private Collection $sockets;
#[ORM\Column('product_line', type: 'string')]
private string $productLine;
#[ORM\Column('model', type: 'string')]
private string $model;
#[ORM\Column('part_number', type: 'string')]
private string $partNumber;
#[ORM\Column('lot_number', type: 'string', nullable: TRUE, options: array(
'comment' => 'The CPU lot number, such as s-spec for Intel CPUs'
))]
private ?string $lotNumber;
#[ORM\Column('micro_architecture', type: 'string')]
private string $microArchitecture = '';
#[ORM\Column('codename', type: 'string')]
private string $codeName = '';
#[ORM\Column('base_speed', type: 'integer', options: array(
'comment' => 'The stock speed of the cpu in MHz'
))]
private int $baseSpeed;
#[ORM\Column('boost_speed', type: 'integer', nullable: true, options: array(
'comment' => 'The max boost speed of the cpu in MHz, if applicable'
))]
private ?int $boostSpeed;
#[ORM\Column('cores', type: 'integer')]
private int $cores = 1;
#[ORM\Column('threads', type: 'integer')]
private int $threads = 1;
#[ORM\Column('igp', type: 'string', nullable: true, options: array(
'comment' => 'The name of the integrated graphics processor'
))]
private ?string $igp;
#[ORM\Column('voltage', type: 'float', nullable: true)]
private ?float $voltage;
#[ORM\Column('tdp', type: 'integer')]
private ?int $tdp;
#[ORM\Column('process_node', type: 'integer', nullable: TRUE)]
private ?int $processNode;
#[ORM\Column('count', type: 'integer')]
private int $count = 1;
#[ORM\Column('usable', type: 'boolean', options: array(
'comment' => 'Whether the chip is working, and can be used with other hardware I have'
))]
private bool $usable = true;
#[ORM\Column('received', type: 'boolean', options: array(
'comment' => "Whether I have the chip in my possession (instead of in shipping)"
))]
private bool $received = true;
#[ORM\Column('link', type: 'string')]
private string $link;
#[ORM\Column('notes', type: 'string')]
private string $notes = '';
public function __construct()
{
$this->sockets = new ArrayCollection();

56
src/Entity/CpuCache.php Normal file
View File

@ -0,0 +1,56 @@
<?php declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
trait CpuCache {
#[ORM\Column('l1_count', type:'integer', options: array(
'comment' => 'The number of L1 caches on the package, usually the same as the number of cores'
))]
private int $L1Count = 1;
#[ORM\Column('l1_data_size', type: 'integer', nullable: true, options: array(
'comment' => 'The size of each Level 1 data cache in KB'
))]
private ?int $L1dSize;
#[ORM\Column('l1_code_size', type: 'integer', nullable: true, options: array(
'comment' => 'The size of each Level 1 instruction cache in KB'
))]
private ?int $L1cSize;
#[ORM\Column('l1_unified_size', type: 'integer', nullable: true, options: array(
'comment' => 'The size of each Level 1 unified cache in KB'
))]
private ?int $L1uSize;
#[ORM\Column('l1_way', type: 'integer', nullable: true)]
private ?int $L1Way;
#[ORM\Column('l2_count', type: 'integer', options: array(
'comment' => 'The number of L2 caches on the package, usually the same as the number of cores'
))]
private int $L2Count = 1;
#[ORM\Column('l2_size', type: 'integer', nullable: true, options: array(
'comment' => 'The size of each Level 2 cache in KB'
))]
private ?int $L2Size;
#[ORM\Column('l2_way', type: 'integer', nullable: true)]
private ?int $L2Way;
#[ORM\Column('l3_count', type: 'integer', options: array(
'comment' => 'The number of L3 caches on the package'
))]
private int $L3Count = 0;
#[ORM\Column('l3_size', type: 'integer', nullable: true, options: array(
'comment' => 'The size of each Level 3 cache in KB'
))]
private ?int $L3Size;
#[ORM\Column('l3_way', type: 'integer', nullable: true)]
private ?int $L3Way;
}

View File

@ -0,0 +1,19 @@
<?php declare(strict_types=1);
namespace App\Enum;
enum CpuArchitectureEnum: string {
case X86 = 'x86';
case X86_64 = 'x86_64';
case ARM = 'arm';
case ARM64 = 'arm64';
case POWER_PC = 'PowerPC';
case POWER = 'IBM POWER';
case SIXTY_EIGHT_K = 'Motorola 68k';
case RISC_V = 'RISC V';
case MIPS = 'MIPS';
case SIX_FIVE_OH_TWO = 'MOS 6502';
case Z80 = 'Z80';
case EIGHT_OH_EIGHT_EIGHT = 'Intel 8088';
case EIGHT_OH_186 = 'Intel 80186';
}

57
src/Form/CpuType.php Normal file
View File

@ -0,0 +1,57 @@
<?php
namespace App\Form;
use App\Entity\Cpu;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CpuType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('architecture')
->add('productLine')
->add('model')
->add('partNumber')
->add('lotNumber')
->add('microArchitecture')
->add('codeName')
->add('baseSpeed')
->add('boostSpeed')
->add('cores')
->add('threads')
->add('igp')
->add('voltage')
->add('tdp')
->add('processNode')
->add('count')
->add('usable')
->add('received')
->add('link')
->add('notes')
->add('L1Count')
->add('L1dSize')
->add('L1cSize')
->add('L1uSize')
->add('L1Way')
->add('L2Count')
->add('L2Size')
->add('L2Way')
->add('L3Count')
->add('L3Size')
->add('L3Way')
->add('brand')
->add('sockets')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Cpu::class,
]);
}
}

View File

@ -0,0 +1,108 @@
<?php
declare(strict_types=1);
namespace App\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221027154708 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE collection.cpu ADD architecture VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD product_line VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD model VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD part_number VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD lot_number VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD micro_architecture VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD codename VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD base_speed INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD boost_speed INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD cores INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD threads INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD igp VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD voltage DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD tdp INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD process_node INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD usable BOOLEAN NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD received BOOLEAN NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD link VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD notes VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_data_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_code_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_unified_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_way INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l2_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l2_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l2_way INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l3_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l3_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l3_way INT DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN collection.cpu.lot_number IS \'The CPU lot number, such as s-spec for Intel CPUs\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.base_speed IS \'The stock speed of the cpu in MHz\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.boost_speed IS \'The max boost speed of the cpu in MHz, if applicable\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.igp IS \'The name of the integrated graphics processor\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.usable IS \'Whether the chip is working, and can be used with other hardware I have\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.received IS \'Whether I have the chip in my possession (instead of in shipping)\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_count IS \'The number of L1 caches on the package, usually the same as the number of cores\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_data_size IS \'The size of each Level 1 data cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_code_size IS \'The size of each Level 1 instruction cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_unified_size IS \'The size of each Level 1 unified cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l2_count IS \'The number of L2 caches on the package, usually the same as the number of cores\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l2_size IS \'The size of each Level 2 cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l3_count IS \'The number of L3 caches on the package\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l3_size IS \'The size of each Level 3 cache in KB\'');
$this->addSql('ALTER TABLE collection.fpu ALTER series DROP NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE collection.cpu DROP architecture');
$this->addSql('ALTER TABLE collection.cpu DROP product_line');
$this->addSql('ALTER TABLE collection.cpu DROP model');
$this->addSql('ALTER TABLE collection.cpu DROP part_number');
$this->addSql('ALTER TABLE collection.cpu DROP lot_number');
$this->addSql('ALTER TABLE collection.cpu DROP micro_architecture');
$this->addSql('ALTER TABLE collection.cpu DROP codename');
$this->addSql('ALTER TABLE collection.cpu DROP base_speed');
$this->addSql('ALTER TABLE collection.cpu DROP boost_speed');
$this->addSql('ALTER TABLE collection.cpu DROP cores');
$this->addSql('ALTER TABLE collection.cpu DROP threads');
$this->addSql('ALTER TABLE collection.cpu DROP igp');
$this->addSql('ALTER TABLE collection.cpu DROP voltage');
$this->addSql('ALTER TABLE collection.cpu DROP tdp');
$this->addSql('ALTER TABLE collection.cpu DROP process_node');
$this->addSql('ALTER TABLE collection.cpu DROP count');
$this->addSql('ALTER TABLE collection.cpu DROP usable');
$this->addSql('ALTER TABLE collection.cpu DROP received');
$this->addSql('ALTER TABLE collection.cpu DROP link');
$this->addSql('ALTER TABLE collection.cpu DROP notes');
$this->addSql('ALTER TABLE collection.cpu DROP l1_count');
$this->addSql('ALTER TABLE collection.cpu DROP l1_data_size');
$this->addSql('ALTER TABLE collection.cpu DROP l1_code_size');
$this->addSql('ALTER TABLE collection.cpu DROP l1_unified_size');
$this->addSql('ALTER TABLE collection.cpu DROP l1_way');
$this->addSql('ALTER TABLE collection.cpu DROP l2_count');
$this->addSql('ALTER TABLE collection.cpu DROP l2_size');
$this->addSql('ALTER TABLE collection.cpu DROP l2_way');
$this->addSql('ALTER TABLE collection.cpu DROP l3_count');
$this->addSql('ALTER TABLE collection.cpu DROP l3_size');
$this->addSql('ALTER TABLE collection.cpu DROP l3_way');
$this->addSql('ALTER TABLE collection.fpu ALTER series SET NOT NULL');
}
}

View File

@ -5,15 +5,15 @@
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Collection CRUD{% endblock %}</title>
<title>Collection CRUD - {% block title %}{% endblock %}</title>
<link rel="stylesheet" href="/css/foundation.min.css" />
<link rel="stylesheet" href="/css/app.css" />
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body>
<header>{% include 'header.html.twig' %}</header>
<main class="page-pad">
{% include 'header.html.twig' %}
{% block body %}{% endblock %}
</main>

View File

@ -3,7 +3,7 @@
{% block title %}Brands - Edit{% endblock %}
{% block form %}
<h1>Edit Brand</h1>
<h2>Edit Brand</h2>
<div class="small callout">
<ul>
@ -22,8 +22,9 @@
>Update</button>
{{ form_end(edit_form) }}
<form method="post" action="{{ path('brand_delete', {'id': brand.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ brand.id) }}">
<form method="post" action="{{ path('<?= $route_name ?>_delete', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>) }}">
<button type="submit" class="alert button expanded">Delete</button>
</form>
</div>

View File

@ -0,0 +1,30 @@
{% extends 'form.html.twig' %}
{% block title %}Cpu - Edit{% endblock %}
{% block form %}
<h2>Edit Cpu</h2>
<div class="small callout">
<ul>
<li>
<a href="{{ path('app_cpu_index') }}">Back to the list</a>
</li>
</ul>
</div>
<div class="large primary callout">
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<button
type="submit"
class="success button expanded"
>Update</button>
{{ form_end(edit_form) }}
<form method="post" action="{{ path('app_cpu_delete', {'id': cpu.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ cpu.id) }}">
<button type="submit" class="alert button expanded">Delete</button>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,111 @@
{% extends 'base.html.twig' %}
{% block title %}Cpu{% endblock %}
{% block body %}
<h2>Cpu</h2>
<div class="small callout primary">
<ul>
<li>
<a href="{{ path('app_cpu_new') }}">Add Cpu</a>
</li>
</ul>
</div>
<table class="table">
<thead>
<tr>
<th>&nbsp;</th>
<th>Id</th>
<th>Architecture</th>
<th>ProductLine</th>
<th>Model</th>
<th>PartNumber</th>
<th>LotNumber</th>
<th>MicroArchitecture</th>
<th>CodeName</th>
<th>BaseSpeed</th>
<th>BoostSpeed</th>
<th>Cores</th>
<th>Threads</th>
<th>Igp</th>
<th>Voltage</th>
<th>Tdp</th>
<th>ProcessNode</th>
<th>Count</th>
<th>Usable</th>
<th>Received</th>
<th>Link</th>
<th>Notes</th>
<th>L1Count</th>
<th>L1dSize</th>
<th>L1cSize</th>
<th>L1uSize</th>
<th>L1Way</th>
<th>L2Count</th>
<th>L2Size</th>
<th>L2Way</th>
<th>L3Count</th>
<th>L3Size</th>
<th>L3Way</th>
</tr>
</thead>
<tbody>
{% for cpu in cpus %}
<tr>
<td>
<ul>
<li>
<a href="{{ path('app_cpu_show', {'id': cpu.id}) }}">
View 👁
</a>
</li>
<li>
<a href="{{ path('app_cpu_edit', {'id': cpu.id}) }}">
Edit <span class="edit-icon">&#9998;</span>
</a>
</li>
</ul>
</td>
<td>{{ cpu.id }}</td>
<td>{{ cpu.architecture }}</td>
<td>{{ cpu.productLine }}</td>
<td>{{ cpu.model }}</td>
<td>{{ cpu.partNumber }}</td>
<td>{{ cpu.lotNumber }}</td>
<td>{{ cpu.microArchitecture }}</td>
<td>{{ cpu.codeName }}</td>
<td>{{ cpu.baseSpeed }}</td>
<td>{{ cpu.boostSpeed }}</td>
<td>{{ cpu.cores }}</td>
<td>{{ cpu.threads }}</td>
<td>{{ cpu.igp }}</td>
<td>{{ cpu.voltage }}</td>
<td>{{ cpu.tdp }}</td>
<td>{{ cpu.processNode }}</td>
<td>{{ cpu.count }}</td>
<td>{{ cpu.usable ? 'Yes' : 'No' }}</td>
<td>{{ cpu.received ? 'Yes' : 'No' }}</td>
<td>{{ cpu.link }}</td>
<td>{{ cpu.notes }}</td>
<td>{{ cpu.L1Count }}</td>
<td>{{ cpu.L1dSize }}</td>
<td>{{ cpu.L1cSize }}</td>
<td>{{ cpu.L1uSize }}</td>
<td>{{ cpu.L1Way }}</td>
<td>{{ cpu.L2Count }}</td>
<td>{{ cpu.L2Size }}</td>
<td>{{ cpu.L2Way }}</td>
<td>{{ cpu.L3Count }}</td>
<td>{{ cpu.L3Size }}</td>
<td>{{ cpu.L3Way }}</td>
</tr>
{% else %}
<tr>
<td colspan="33">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends 'form.html.twig' %}
{% block title %}Cpu - New{% endblock %}
{% block form %}
<h2>Add Cpu</h2>
<div class="small callout">
<ul>
<li>
<a href="{{ path('app_cpu_index') }}">Back to the list</a>
</li>
</ul>
</div>
<div class="large primary callout">
{{ form_start(form) }}
{{ form_widget(form) }}
<button type="submit" class="success button expanded">Add</button>
{{ form_end(form) }}
</div>
{% endblock %}

View File

@ -0,0 +1,162 @@
{% extends 'form.html.twig' %}
{% block title %}Cpu{% endblock %}
{% block form %}
<h2>Brand</h2>
<div class="callout">
<ul>
<li>
<a href="{{ path('app_cpu_index') }}">Back to the list</a>
</li>
<li>
<a href="{{ path('app_cpu_edit', {'id': cpu.id}) }}">Edit</a>
</li>
</ul>
<hr/>
<form method="post" action="{{ path('app_cpu_delete', {'id': cpu.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ cpu.id) }}">
<button type="submit" class="alert button expanded">Delete</button>
</form>
</div>
<div class="large primary callout">
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ cpu.id }}</td>
</tr>
<tr>
<th>Architecture</th>
<td>{{ cpu.architecture }}</td>
</tr>
<tr>
<th>ProductLine</th>
<td>{{ cpu.productLine }}</td>
</tr>
<tr>
<th>Model</th>
<td>{{ cpu.model }}</td>
</tr>
<tr>
<th>PartNumber</th>
<td>{{ cpu.partNumber }}</td>
</tr>
<tr>
<th>LotNumber</th>
<td>{{ cpu.lotNumber }}</td>
</tr>
<tr>
<th>MicroArchitecture</th>
<td>{{ cpu.microArchitecture }}</td>
</tr>
<tr>
<th>CodeName</th>
<td>{{ cpu.codeName }}</td>
</tr>
<tr>
<th>BaseSpeed</th>
<td>{{ cpu.baseSpeed }}</td>
</tr>
<tr>
<th>BoostSpeed</th>
<td>{{ cpu.boostSpeed }}</td>
</tr>
<tr>
<th>Cores</th>
<td>{{ cpu.cores }}</td>
</tr>
<tr>
<th>Threads</th>
<td>{{ cpu.threads }}</td>
</tr>
<tr>
<th>Igp</th>
<td>{{ cpu.igp }}</td>
</tr>
<tr>
<th>Voltage</th>
<td>{{ cpu.voltage }}</td>
</tr>
<tr>
<th>Tdp</th>
<td>{{ cpu.tdp }}</td>
</tr>
<tr>
<th>ProcessNode</th>
<td>{{ cpu.processNode }}</td>
</tr>
<tr>
<th>Count</th>
<td>{{ cpu.count }}</td>
</tr>
<tr>
<th>Usable</th>
<td>{{ cpu.usable ? 'Yes' : 'No' }}</td>
</tr>
<tr>
<th>Received</th>
<td>{{ cpu.received ? 'Yes' : 'No' }}</td>
</tr>
<tr>
<th>Link</th>
<td>{{ cpu.link }}</td>
</tr>
<tr>
<th>Notes</th>
<td>{{ cpu.notes }}</td>
</tr>
<tr>
<th>L1Count</th>
<td>{{ cpu.L1Count }}</td>
</tr>
<tr>
<th>L1dSize</th>
<td>{{ cpu.L1dSize }}</td>
</tr>
<tr>
<th>L1cSize</th>
<td>{{ cpu.L1cSize }}</td>
</tr>
<tr>
<th>L1uSize</th>
<td>{{ cpu.L1uSize }}</td>
</tr>
<tr>
<th>L1Way</th>
<td>{{ cpu.L1Way }}</td>
</tr>
<tr>
<th>L2Count</th>
<td>{{ cpu.L2Count }}</td>
</tr>
<tr>
<th>L2Size</th>
<td>{{ cpu.L2Size }}</td>
</tr>
<tr>
<th>L2Way</th>
<td>{{ cpu.L2Way }}</td>
</tr>
<tr>
<th>L3Count</th>
<td>{{ cpu.L3Count }}</td>
</tr>
<tr>
<th>L3Size</th>
<td>{{ cpu.L3Size }}</td>
</tr>
<tr>
<th>L3Way</th>
<td>{{ cpu.L3Way }}</td>
</tr>
</tbody>
</table>
</div>
{% endblock %}

View File

@ -8,7 +8,7 @@
{% block body %}
<div class="grid-container">
<div class="grid-x grid-margin-x">
<div class="cell large-8 large-offset-2 medium-10 medium-offset-1 small-12">
<div class="cell medium-10 small-12">
{% block form %}{% endblock %}
</div>
</div>

View File

@ -3,7 +3,7 @@
{% block title %}Edit Fpu{% endblock %}
{% block form %}
<h1>Edit Fpu</h1>
<h2>Edit FPU</h2>
<div class="small callout">
<ul>

View File

@ -1,9 +1,9 @@
{% extends 'base.html.twig' %}
{% block title %}Fpu index{% endblock %}
{% block title %}FPUs{% endblock %}
{% block body %}
<h1>Fpu index</h1>
<h2>FPUs</h2>
<div class="small callout primary">
<ul>

View File

@ -1,9 +1,9 @@
{% extends 'form.html.twig' %}
{% block title %}New Fpu{% endblock %}
{% block title %}Add FPU{% endblock %}
{% block form %}
<h2>Add Fpu</h2>
<h2>Add FPU</h2>
<div class="small callout">
<ul>

View File

@ -1,9 +1,9 @@
{% extends 'form.html.twig' %}
{% block title %}Fpu{% endblock %}
{% block title %}FPU{% endblock %}
{% block form %}
<h2>Fpu</h2>
<h2>FPU</h2>
<div class="callout">
<ul>