From 21604e5e3ea1d16f28feabf2ee6f1726153f05b8 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Fri, 28 Oct 2022 08:46:35 -0400 Subject: [PATCH] A bunch of fixes and tweaks --- src/Controller/CpuController.php | 10 +- src/Entity/Cpu.php | 18 +- .../{CpuCache.php => CpuCacheTrait.php} | 34 ++- src/Enum/CpuArchitectureEnum.php | 45 +++- src/Form/CpuType.php | 144 +++++++---- src/Migrations/Version20221027192946.php | 34 +++ src/Migrations/Version20221027200731.php | 32 +++ src/Migrations/Version20221027211813.php | 44 ++++ src/Migrations/Version20221027214731.php | 38 +++ src/Resources/crud/templates/edit.tpl.php | 6 +- src/Resources/crud/templates/show.tpl.php | 2 +- src/Traits/FormControllerTrait.php | 2 +- templates/brand/edit.html.twig | 10 +- templates/camera/edit.html.twig | 8 +- templates/cameratype/edit.html.twig | 6 +- templates/cpu/edit.html.twig | 110 ++++++-- templates/cpu/index.html.twig | 209 ++++++++-------- templates/cpu/new.html.twig | 88 ++++++- templates/cpu/show.html.twig | 235 ++++++++---------- templates/film/edit.html.twig | 6 +- templates/flash/edit.html.twig | 6 +- templates/fpu/edit.html.twig | 6 +- templates/gpu/edit.html.twig | 72 +++--- templates/gpu_core/edit.html.twig | 6 +- templates/header.html.twig | 103 ++++---- templates/lenses/edit.html.twig | 6 +- .../previouslyownedcamera/edit.html.twig | 6 +- templates/previouslyownedflash/edit.html.twig | 6 +- .../previouslyownedlenses/edit.html.twig | 6 +- 29 files changed, 840 insertions(+), 458 deletions(-) rename src/Entity/{CpuCache.php => CpuCacheTrait.php} (60%) create mode 100644 src/Migrations/Version20221027192946.php create mode 100644 src/Migrations/Version20221027200731.php create mode 100644 src/Migrations/Version20221027211813.php create mode 100644 src/Migrations/Version20221027214731.php diff --git a/src/Controller/CpuController.php b/src/Controller/CpuController.php index c6385b2..579c38f 100644 --- a/src/Controller/CpuController.php +++ b/src/Controller/CpuController.php @@ -24,31 +24,31 @@ class CpuController extends AbstractController { { } - #[Route('/', name: 'app_cpu_index', methods: ['GET'])] + #[Route('/', name: 'cpu_index', methods: ['GET'])] public function index(): Response { return $this->itemListView('cpus', []); } - #[Route('/new', name: 'app_cpu_new', methods: ['GET', 'POST'])] + #[Route('/new', name: 'cpu_new', methods: ['GET', 'POST'])] public function new(Request $request): Response { return $this->itemCreate($request, 'cpu'); } - #[Route('/{id}', name: 'app_cpu_show', methods: ['GET'])] + #[Route('/{id}', name: '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'])] + #[Route('/{id}/edit', name: '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'])] + #[Route('/{id}', name: 'cpu_delete', methods: ['POST'])] public function delete(Request $request, Cpu $cpu): Response { return $this->deleteCSRF($request, $cpu); diff --git a/src/Entity/Cpu.php b/src/Entity/Cpu.php index 405400b..50606fb 100644 --- a/src/Entity/Cpu.php +++ b/src/Entity/Cpu.php @@ -9,7 +9,7 @@ use Doctrine\ORM\Mapping as ORM; #[ORM\Table('cpu', schema: 'collection')] #[ORM\Entity] class Cpu { - use CpuCache; + use CpuCacheTrait; use GetSetTrait; #[ORM\Column('id', type: 'integer', nullable: FALSE)] @@ -23,7 +23,7 @@ class Cpu { private Brand $brand; #[ORM\Column('architecture', type: 'string', enumType: CpuArchitectureEnum::class)] - private string $architecture; + private CpuArchitectureEnum $architecture; /** * @var Collection @@ -49,11 +49,11 @@ class Cpu { ))] private ?string $lotNumber; - #[ORM\Column('micro_architecture', type: 'string')] - private string $microArchitecture = ''; + #[ORM\Column('micro_architecture', type: 'string', nullable: TRUE)] + private ?string $microArchitecture = ''; - #[ORM\Column('codename', type: 'string')] - private string $codeName = ''; + #[ORM\Column('codename', type: 'string', nullable: TRUE)] + private ?string $codeName = ''; #[ORM\Column('base_speed', type: 'integer', options: array( 'comment' => 'The stock speed of the cpu in MHz' @@ -79,7 +79,7 @@ class Cpu { #[ORM\Column('voltage', type: 'float', nullable: true)] private ?float $voltage; - #[ORM\Column('tdp', type: 'integer')] + #[ORM\Column('tdp', type: 'integer', nullable: true)] private ?int $tdp; #[ORM\Column('process_node', type: 'integer', nullable: TRUE)] @@ -101,8 +101,8 @@ class Cpu { #[ORM\Column('link', type: 'string')] private string $link; - #[ORM\Column('notes', type: 'string')] - private string $notes = ''; + #[ORM\Column('notes', type: 'text', nullable: true)] + private ?string $notes = ''; public function __construct() { diff --git a/src/Entity/CpuCache.php b/src/Entity/CpuCacheTrait.php similarity index 60% rename from src/Entity/CpuCache.php rename to src/Entity/CpuCacheTrait.php index 74934c4..84d774a 100644 --- a/src/Entity/CpuCache.php +++ b/src/Entity/CpuCacheTrait.php @@ -4,29 +4,45 @@ 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' +trait CpuCacheTrait { + #[ORM\Column('l1_data_count', type:'integer', nullable: true, options: array( + 'comment' => 'The number of L1 data caches on the package, usually the same as the number of cores' ))] - private int $L1Count = 1; + private ?int $L1dCount = null; #[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; + private ?int $L1dSize = null; + + #[ORM\Column('l1_data_way', type: 'integer', nullable: true)] + private ?int $L1dWay = null; + + #[ORM\Column('l1_code_count', type:'integer', nullable: true, options: array( + 'comment' => 'The number of L1 instruction caches on the package, usually the same as the number of cores' + ))] + private ?int $L1cCount = null; #[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; + private ?int $L1cSize = null; + + #[ORM\Column('l1_code_way', type: 'integer', nullable: true)] + private ?int $L1cWay = null; + + #[ORM\Column('l1_unified_count', type:'integer', nullable: true, options: array( + 'comment' => 'The number of L1 caches on the package, usually the same as the number of cores' + ))] + private ?int $L1uCount = null; #[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; + private ?int $L1uSize = null; - #[ORM\Column('l1_way', type: 'integer', nullable: true)] - private ?int $L1Way; + #[ORM\Column('l1_unified_way', type: 'integer', nullable: true)] + private ?int $L1uWay = null; #[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' diff --git a/src/Enum/CpuArchitectureEnum.php b/src/Enum/CpuArchitectureEnum.php index b4b0865..6a1f7b7 100644 --- a/src/Enum/CpuArchitectureEnum.php +++ b/src/Enum/CpuArchitectureEnum.php @@ -3,17 +3,42 @@ 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_ONE_EIGHT_SIX = 'Intel 80186'; case EIGHT_OH_EIGHT_EIGHT = 'Intel 8088'; - case EIGHT_OH_186 = 'Intel 80186'; + case MIPS = 'MIPS'; + case POWER = 'IBM POWER'; + case POWER_PC = 'PowerPC'; + case RISC_V = 'RISC V'; + case SIX_FIVE_OH_TWO = 'MOS 6502'; + case SIXTY_EIGHT_K = 'Motorola 68k'; + case X86 = 'x86'; + case X86_64 = 'x86_64'; + case Z80 = 'Z80'; + + public static function getGroups(): array + { + return [ + 'Common' => [ + self::X86, + self::X86_64, + self::ARM, + self::ARM64, + ], + 'Historical' => [ + self::EIGHT_OH_EIGHT_EIGHT, + self::EIGHT_OH_ONE_EIGHT_SIX, + self::SIX_FIVE_OH_TWO, + self::SIXTY_EIGHT_K, + self::POWER_PC, + self::Z80, + ], + 'Others' => [ + self::MIPS, + self::POWER, + self::RISC_V, + ], + ]; + } } diff --git a/src/Form/CpuType.php b/src/Form/CpuType.php index 76e831b..b4346a8 100644 --- a/src/Form/CpuType.php +++ b/src/Form/CpuType.php @@ -2,56 +2,108 @@ namespace App\Form; +use App\Entity\Brand; use App\Entity\Cpu; +use App\Enum\CpuArchitectureEnum; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\EnumType; +use Symfony\Component\Form\Extension\Core\Type\UrlType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; +use UnitEnum; -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') - ; - } +class CpuType extends AbstractType { + use BrandCategoryTrait; - public function configureOptions(OptionsResolver $resolver): void - { - $resolver->setDefaults([ - 'data_class' => Cpu::class, - ]); - } + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder + ->add('architecture', EnumType::class, [ + 'class' => CpuArchitectureEnum::class, + 'choice_label' => fn(UnitEnum $choice): string => $choice->value, + 'choices' => CpuArchitectureEnum::getGroups(), + 'preferred_choices' => [CpuArchitectureEnum::X86, CpuArchitectureEnum::X86_64] + ]) + ->add('brand', EntityType::class, [ + 'class' => Brand::class, + 'query_builder' => self::filterBrands('cpu'), + ]) + ->add('sockets') + ->add('productLine') + ->add('model') + ->add('partNumber') + ->add('lotNumber') + ->add('microArchitecture') + ->add('codeName') + + // Cache Stuff + ->add('L1dCount', null, [ + 'label' => 'L1 Data Cache(s)', + ]) + ->add('L1dSize', null, [ + 'label' => 'L1 Data Size KB' + ]) + ->add('L1dWay', null, [ + 'label' => 'L1 Data (x-way)' + ]) + ->add('L1cCount', null, [ + 'label' => 'L1 Instruction Cache(s)', + ]) + ->add('L1cSize', null, [ + 'label' => 'L1 Instruction Size KB' + ]) + ->add('L1cWay', null, [ + 'label' => 'L1 Instruction (x-way)' + ]) + ->add('L1uCount', null, [ + 'label' => 'L1 Unified Cache(s)', + ]) + ->add('L1uSize', null, [ + 'label' => 'L1 Unified Cache Size: KB' + ]) + ->add('L1uWay', null, [ + 'label' => 'L1 Unified (x-way)' + ]) + ->add('L2Count', null, [ + 'label' => 'L2 Cache(s)' + ]) + ->add('L2Size', null, [ + 'label' => 'L2 Cache Size KB (per unit)' + ]) + ->add('L2Way', null, [ + 'label' => 'L2 Cache (x-way)' + ]) + ->add('L3Count', null, [ + 'label' => 'L3 Cache(s)' + ]) + ->add('L3Size', null, [ + 'label' => 'L3 Cache Size KB (per unit)' + ]) + ->add('L3Way', null, [ + 'label' => 'L3 Cache (x-way)' + ]) + + ->add('baseSpeed') + ->add('boostSpeed') + ->add('cores') + ->add('threads') + ->add('igp') + ->add('voltage') + ->add('tdp') + ->add('processNode') + ->add('count') + ->add('usable') + ->add('received') + ->add('link', UrlType::class) + ->add('notes') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Cpu::class, + ]); + } } diff --git a/src/Migrations/Version20221027192946.php b/src/Migrations/Version20221027192946.php new file mode 100644 index 0000000..488f8da --- /dev/null +++ b/src/Migrations/Version20221027192946.php @@ -0,0 +1,34 @@ +addSql('ALTER TABLE collection.cpu ADD l1_data_way INT DEFAULT NULL'); + $this->addSql('ALTER TABLE collection.cpu ADD l1_code_way INT DEFAULT 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 l1_data_way'); + $this->addSql('ALTER TABLE collection.cpu DROP l1_code_way'); + } +} diff --git a/src/Migrations/Version20221027200731.php b/src/Migrations/Version20221027200731.php new file mode 100644 index 0000000..bee4f5f --- /dev/null +++ b/src/Migrations/Version20221027200731.php @@ -0,0 +1,32 @@ +addSql('ALTER TABLE collection.cpu ALTER notes TYPE TEXT'); + } + + 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 ALTER notes TYPE VARCHAR(255)'); + } +} diff --git a/src/Migrations/Version20221027211813.php b/src/Migrations/Version20221027211813.php new file mode 100644 index 0000000..672a21b --- /dev/null +++ b/src/Migrations/Version20221027211813.php @@ -0,0 +1,44 @@ +addSql('ALTER TABLE collection.cpu ADD l1_data_count INT DEFAULT NULL'); + $this->addSql('ALTER TABLE collection.cpu ADD l1_code_count INT DEFAULT NULL'); + $this->addSql('ALTER TABLE collection.cpu ADD l1_unified_count INT DEFAULT NULL'); + $this->addSql('ALTER TABLE collection.cpu DROP l1_count'); + $this->addSql('ALTER TABLE collection.cpu RENAME COLUMN l1_way TO l1_unified_way'); + $this->addSql('COMMENT ON COLUMN collection.cpu.l1_data_count IS \'The number of L1 data caches on the package, usually the same as the number of cores\''); + $this->addSql('COMMENT ON COLUMN collection.cpu.l1_code_count IS \'The number of L1 instruction caches on the package, usually the same as the number of cores\''); + $this->addSql('COMMENT ON COLUMN collection.cpu.l1_unified_count IS \'The number of L1 caches on the package, usually the same as the number of cores\''); + } + + 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 ADD l1_count INT NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu DROP l1_data_count'); + $this->addSql('ALTER TABLE collection.cpu DROP l1_code_count'); + $this->addSql('ALTER TABLE collection.cpu DROP l1_unified_count'); + $this->addSql('ALTER TABLE collection.cpu RENAME COLUMN l1_unified_way TO l1_way'); + $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\''); + } +} diff --git a/src/Migrations/Version20221027214731.php b/src/Migrations/Version20221027214731.php new file mode 100644 index 0000000..cc3d6e7 --- /dev/null +++ b/src/Migrations/Version20221027214731.php @@ -0,0 +1,38 @@ +addSql('ALTER TABLE collection.cpu ALTER micro_architecture DROP NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu ALTER codename DROP NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu ALTER tdp DROP NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu ALTER notes 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 ALTER micro_architecture SET NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu ALTER codename SET NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu ALTER tdp SET NOT NULL'); + $this->addSql('ALTER TABLE collection.cpu ALTER notes SET NOT NULL'); + } +} diff --git a/src/Resources/crud/templates/edit.tpl.php b/src/Resources/crud/templates/edit.tpl.php index 0b27f1f..47f5aa1 100644 --- a/src/Resources/crud/templates/edit.tpl.php +++ b/src/Resources/crud/templates/edit.tpl.php @@ -14,13 +14,13 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
diff --git a/src/Resources/crud/templates/show.tpl.php b/src/Resources/crud/templates/show.tpl.php index 01c2cee..866a5d4 100644 --- a/src/Resources/crud/templates/show.tpl.php +++ b/src/Resources/crud/templates/show.tpl.php @@ -3,7 +3,7 @@ {% block title %}{% endblock %} {% block form %} -

Brand

+

    diff --git a/src/Traits/FormControllerTrait.php b/src/Traits/FormControllerTrait.php index 97bb0c7..f1c4a87 100644 --- a/src/Traits/FormControllerTrait.php +++ b/src/Traits/FormControllerTrait.php @@ -109,7 +109,7 @@ trait FormControllerTrait // If showing the edit form $templateData = [ $templateKey => $item, - 'edit_form' => $editForm->createView(), + 'form' => $editForm->createView(), ]; if (method_exists($this, 'createDeleteForm')) { diff --git a/templates/brand/edit.html.twig b/templates/brand/edit.html.twig index 2c299bb..879129e 100644 --- a/templates/brand/edit.html.twig +++ b/templates/brand/edit.html.twig @@ -14,17 +14,17 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }} - - + +
diff --git a/templates/camera/edit.html.twig b/templates/camera/edit.html.twig index 755cbf8..0a9df94 100644 --- a/templates/camera/edit.html.twig +++ b/templates/camera/edit.html.twig @@ -16,11 +16,11 @@
- {{ form_start(edit_form) }} - {{ form_errors(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_errors(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
diff --git a/templates/cameratype/edit.html.twig b/templates/cameratype/edit.html.twig index 2b8d9ac..e920192 100644 --- a/templates/cameratype/edit.html.twig +++ b/templates/cameratype/edit.html.twig @@ -16,10 +16,10 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
diff --git a/templates/cpu/edit.html.twig b/templates/cpu/edit.html.twig index 4792039..b26c589 100644 --- a/templates/cpu/edit.html.twig +++ b/templates/cpu/edit.html.twig @@ -8,23 +8,105 @@ -
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} - - {{ form_end(edit_form) }} +{{ form_start(form) }} +
+ Brand, Model, Family + +
+
{{ form_row(form.architecture) }}
+
{{ form_row(form.sockets) }}
+
{{ form_row(form.brand) }}
+
{{ form_row(form.productLine) }}
+
{{ form_row(form.model) }}
+
{{ form_row(form.partNumber) }}
+
{{ form_row(form.lotNumber) }}
+
{{ form_row(form.microArchitecture) }}
+
{{ form_row(form.codeName) }}
+
+
+ +
+ Cache + +
+ Unified Cache +
+
{{ form_row(form.L1uCount) }}
+
{{ form_row(form.L1uSize) }}
+
{{ form_row(form.L1uWay) }}
+
+
+ +
+ Split cache +
+
{{ form_row(form.L1cCount) }}
+
{{ form_row(form.L1cSize) }}
+
{{ form_row(form.L1cWay) }}
+
{{ form_row(form.L1dCount) }}
+
{{ form_row(form.L1dSize) }}
+
{{ form_row(form.L1dWay) }}
+
+
+ +
+ +
+
{{ form_row(form.L2Count) }}
+
{{ form_row(form.L2Size) }}
+
{{ form_row(form.L2Way) }}
+
+ +
+ +
+
{{ form_row(form.L3Count) }}
+
{{ form_row(form.L3Size) }}
+
{{ form_row(form.L3Way) }}
+
+ +
+ +
+ Speed and Power +
+
{{ form_row(form.baseSpeed) }}
+
{{ form_row(form.boostSpeed) }}
+
{{ form_row(form.cores) }}
+
{{ form_row(form.threads) }}
+
{{ form_row(form.igp) }}
+
{{ form_row(form.voltage) }}
+
{{ form_row(form.tdp) }}
+
{{ form_row(form.processNode) }}
+
+
+ +
+ Misc +
+
{{ form_row(form.count) }}
+
 
+
{{ form_row(form.usable) }}
+
{{ form_row(form.received) }}
+
{{ form_row(form.link) }}
+
{{ form_row(form.notes) }}
+
+
+{{ form_widget(form) }} + +{{ form_end(form) }} + +
+ + +
-
- - -
-
{% endblock %} diff --git a/templates/cpu/index.html.twig b/templates/cpu/index.html.twig index bb7adea..3d9bb27 100644 --- a/templates/cpu/index.html.twig +++ b/templates/cpu/index.html.twig @@ -3,109 +3,116 @@ {% block title %}Cpu{% endblock %} {% block body %} -

Cpu

+

CPUs

-
- -
+
+ +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
 IdArchitectureProductLineModelPartNumberLotNumberMicroArchitectureCodeNameBaseSpeedBoostSpeedCoresThreadsIgpVoltageTdpProcessNodeCountUsableReceivedLinkNotesL1CountL1dSizeL1cSizeL1uSizeL1WayL2CountL2SizeL2WayL3CountL3SizeL3Way
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for cpu in cpus %} + + + + + + + + + + + + + + + + + + + + + + + + - - - {% for cpu in cpus %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {% else %} + + - {% else %} - - - - {% endfor %} - -
 IdArchModelSocket(s)Part NumberLot NumberuArchCode NameSpeedC/TL1 CacheL2 CacheL3 CacheIgpVoltageTdpProcessNodeCountUsableReceivedLinkNotes
+ + {{ cpu.id }}{{ cpu.architecture.value }}{{ cpu.brand.name }} {{ cpu.productLine }} {{ cpu.model }} +
    + {% for socket in cpu.sockets %} +
  • {{ socket.name }}
  • + {% endfor %} +
+
{{ cpu.partNumber }}{{ cpu.lotNumber }}{{ cpu.microArchitecture }}{{ cpu.codeName }} + {{ cpu.baseSpeed }} + {% if cpu.boostSpeed > 0 %} + -{{ cpu.boostSpeed }} + {% endif %} + {{ cpu.cores }} / {{ cpu.threads }} + {% if cpu.L1uCount > 0 %} + {{ cpu.L1uCount }}x {{ cpu.L1uSize }}KB {{ cpu.L1uWay }}-way + {% endif %} + {% if cpu.L1cCount > 0 %} + {{ cpu.L1cCount }}x {{ cpu.L1dSize }}KB {{ cpu.L1dWay }}-way data, + {{ cpu.L1dCount }}x {{ cpu.L1cSize }}KB {{ cpu.L1cWay }}-way instruction + {% endif %} + + {% if cpu.L2Count > 0 %} + {{ cpu.L2Count }}x {{ cpu.L2Size }}KB {{ cpu.L2Way }}-way + {% endif %} + + {% if cpu.L3Count > 0 %} + {{ cpu.L3Count }}x {{ cpu.L3Size }}KB {{ cpu.L3Way }}-way + {% endif %} + {{ cpu.igp }}{{ cpu.voltage }}{{ cpu.tdp }}{{ cpu.processNode }}{{ cpu.count }}{{ cpu.usable ? 'Yes' : 'No' }}{{ cpu.received ? 'Yes' : 'No' }}{{ cpu.link }}{{ cpu.notes }}
- - {{ cpu.id }}{{ cpu.architecture }}{{ cpu.productLine }}{{ cpu.model }}{{ cpu.partNumber }}{{ cpu.lotNumber }}{{ cpu.microArchitecture }}{{ cpu.codeName }}{{ cpu.baseSpeed }}{{ cpu.boostSpeed }}{{ cpu.cores }}{{ cpu.threads }}{{ cpu.igp }}{{ cpu.voltage }}{{ cpu.tdp }}{{ cpu.processNode }}{{ cpu.count }}{{ cpu.usable ? 'Yes' : 'No' }}{{ cpu.received ? 'Yes' : 'No' }}{{ cpu.link }}{{ cpu.notes }}{{ cpu.L1Count }}{{ cpu.L1dSize }}{{ cpu.L1cSize }}{{ cpu.L1uSize }}{{ cpu.L1Way }}{{ cpu.L2Count }}{{ cpu.L2Size }}{{ cpu.L2Way }}{{ cpu.L3Count }}{{ cpu.L3Size }}{{ cpu.L3Way }}
no records found
no records found
+ {% endfor %} + + {% endblock %} diff --git a/templates/cpu/new.html.twig b/templates/cpu/new.html.twig index b977e43..f9afdc4 100644 --- a/templates/cpu/new.html.twig +++ b/templates/cpu/new.html.twig @@ -8,16 +8,98 @@ -
{{ form_start(form) }} +
+ Brand, Model, Family + +
+
{{ form_row(form.architecture) }}
+
{{ form_row(form.sockets) }}
+
{{ form_row(form.brand) }}
+
{{ form_row(form.productLine) }}
+
{{ form_row(form.model) }}
+
{{ form_row(form.partNumber) }}
+
{{ form_row(form.lotNumber) }}
+
{{ form_row(form.microArchitecture) }}
+
{{ form_row(form.codeName) }}
+
+
+ +
+ Cache + +
+ Unified Cache +
+
{{ form_row(form.L1uCount) }}
+
{{ form_row(form.L1uSize) }}
+
{{ form_row(form.L1uWay) }}
+
+
+ +
+ Split cache +
+
{{ form_row(form.L1cCount) }}
+
{{ form_row(form.L1cSize) }}
+
{{ form_row(form.L1cWay) }}
+
{{ form_row(form.L1dCount) }}
+
{{ form_row(form.L1dSize) }}
+
{{ form_row(form.L1dWay) }}
+
+
+ +
+ +
+
{{ form_row(form.L2Count) }}
+
{{ form_row(form.L2Size) }}
+
{{ form_row(form.L2Way) }}
+
+ +
+ +
+
{{ form_row(form.L3Count) }}
+
{{ form_row(form.L3Size) }}
+
{{ form_row(form.L3Way) }}
+
+ +
+ +
+ Speed and Power +
+
{{ form_row(form.baseSpeed) }}
+
{{ form_row(form.boostSpeed) }}
+
{{ form_row(form.cores) }}
+
{{ form_row(form.threads) }}
+
{{ form_row(form.igp) }}
+
{{ form_row(form.voltage) }}
+
{{ form_row(form.tdp) }}
+
{{ form_row(form.processNode) }}
+
+
+ +
+ Misc +
+
{{ form_row(form.count) }}
+
 
+
{{ form_row(form.usable) }}
+
{{ form_row(form.received) }}
+
{{ form_row(form.link) }}
+
{{ form_row(form.notes) }}
+
+
{{ form_widget(form) }} + {{ form_end(form) }} -
{% endblock %} diff --git a/templates/cpu/show.html.twig b/templates/cpu/show.html.twig index 6ddf56b..d970b3f 100644 --- a/templates/cpu/show.html.twig +++ b/templates/cpu/show.html.twig @@ -3,160 +3,137 @@ {% block title %}Cpu{% endblock %} {% block form %} -

Brand

+

CPU

-
- +
+ -
+
-
- - -
-
+
+ + +
+
-
- - +
+
+ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + {% if cpu.L1uCount > 0 %} + + {% endif %} + {% if cpu.L1cCount > 0 %} + + {% endif %} + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Id{{ cpu.id }}
Id{{ cpu.id }}
Architecture{{ cpu.architecture }}
Architecture{{ cpu.architecture.value }}
ProductLine{{ cpu.productLine }}
Model{{ cpu.brand.name }} {{ cpu.productLine }} {{ cpu.model }}
Model{{ cpu.model }}
PartNumber{{ cpu.partNumber }}
PartNumber{{ cpu.partNumber }}
LotNumber{{ cpu.lotNumber }}
LotNumber{{ cpu.lotNumber }}
MicroArchitecture{{ cpu.microArchitecture }}
MicroArchitecture{{ cpu.microArchitecture }}
CodeName{{ cpu.codeName }}
CodeName{{ cpu.codeName }}
BaseSpeed{{ cpu.baseSpeed }}
BaseSpeed{{ cpu.baseSpeed }}
BoostSpeed{{ cpu.boostSpeed }}
BoostSpeed{{ cpu.boostSpeed }}
Cores / Threads{{ cpu.cores }} / {{ cpu.threads }}
Cores{{ cpu.cores }}
Igp{{ cpu.igp }}
Threads{{ cpu.threads }}
Voltage{{ cpu.voltage }}
Igp{{ cpu.igp }}
Tdp{{ cpu.tdp }}
Voltage{{ cpu.voltage }}
ProcessNode{{ cpu.processNode }}
Tdp{{ cpu.tdp }}
Count{{ cpu.count }}
ProcessNode{{ cpu.processNode }}
Usable{{ cpu.usable ? 'Yes' : 'No' }}
Count{{ cpu.count }}
Received{{ cpu.received ? 'Yes' : 'No' }}
Usable{{ cpu.usable ? 'Yes' : 'No' }}
Link{{ cpu.link }}
Received{{ cpu.received ? 'Yes' : 'No' }}
Notes{{ cpu.notes }}
Link{{ cpu.link }}
L1 + {{ cpu.L1uCount }}x {{ cpu.L1uSize }}KB {{ cpu.L1uWay }}-way + + {{ cpu.L1cCount }}x {{ cpu.L1dSize }}KB {{ cpu.L1dWay }}-way data, + {{ cpu.L1dCount }}x {{ cpu.L1cSize }}KB {{ cpu.L1cWay }}-way instruction +
Notes{{ cpu.notes }}
L1Count{{ cpu.L1Count }}
L1dSize{{ cpu.L1dSize }}
L1cSize{{ cpu.L1cSize }}
L1uSize{{ cpu.L1uSize }}
L1Way{{ cpu.L1Way }}
L2Count{{ cpu.L2Count }}
L2Size{{ cpu.L2Size }}
L2Way{{ cpu.L2Way }}
L3Count{{ cpu.L3Count }}
L3Size{{ cpu.L3Size }}
L3Way{{ cpu.L3Way }}
-
+ L2 + + {% if cpu.L2Count > 0 %} + {{ cpu.L2Count }}x {{ cpu.L2Size }}KB {{ cpu.L2Way }}-way + {% endif %} + + + {% if cpu.L3Count > 0 %} + + L3 + {{ cpu.L3Count }}x {{ cpu.L3Size }}KB {{ cpu.L3Way }}-way + + {% endif %} + + +
{% endblock %} diff --git a/templates/film/edit.html.twig b/templates/film/edit.html.twig index 7a22363..993b53d 100644 --- a/templates/film/edit.html.twig +++ b/templates/film/edit.html.twig @@ -16,10 +16,10 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
diff --git a/templates/flash/edit.html.twig b/templates/flash/edit.html.twig index b5309a0..00e4a20 100644 --- a/templates/flash/edit.html.twig +++ b/templates/flash/edit.html.twig @@ -16,10 +16,10 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
diff --git a/templates/fpu/edit.html.twig b/templates/fpu/edit.html.twig index 4705b50..324ad10 100644 --- a/templates/fpu/edit.html.twig +++ b/templates/fpu/edit.html.twig @@ -14,13 +14,13 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
diff --git a/templates/gpu/edit.html.twig b/templates/gpu/edit.html.twig index 2573af9..4e0f294 100644 --- a/templates/gpu/edit.html.twig +++ b/templates/gpu/edit.html.twig @@ -14,88 +14,88 @@
- {{ form_start(edit_form) }} + {{ form_start(form) }}
Names / Brands - {{ form_row(edit_form.gpuBrand) }} - {{ form_row(edit_form.modelName) }} - {{ form_row(edit_form.gpuCore) }} + {{ form_row(form.gpuBrand) }} + {{ form_row(form.modelName) }} + {{ form_row(form.gpuCore) }}
- {{ form_row(edit_form.boardBrand) }} - {{ form_row(edit_form.alternateModelName) }} + {{ form_row(form.boardBrand) }} + {{ form_row(form.alternateModelName) }}
Bus / Size - {{ form_row(edit_form.cardKey) }} - {{ form_row(edit_form.busInterface) }} - {{ form_row(edit_form.slotSpan) }} + {{ form_row(form.cardKey) }} + {{ form_row(form.busInterface) }} + {{ form_row(form.slotSpan) }}
Power - {{ form_row(edit_form.molexPower) }} - {{ form_row(edit_form.pcie6power) }} - {{ form_row(edit_form.pcie8power) }} - {{ form_row(edit_form.tdp) }} + {{ form_row(form.molexPower) }} + {{ form_row(form.pcie6power) }} + {{ form_row(form.pcie8power) }} + {{ form_row(form.tdp) }}
Clock Speeds - {{ form_row(edit_form.baseClock) }} - {{ form_row(edit_form.boostClock) }} - {{ form_row(edit_form.memoryClock) }} + {{ form_row(form.baseClock) }} + {{ form_row(form.boostClock) }} + {{ form_row(form.memoryClock) }}
Memory - {{ form_row(edit_form.memorySize) }} - {{ form_row(edit_form.memoryBus) }} - {{ form_row(edit_form.memoryType) }} + {{ form_row(form.memorySize) }} + {{ form_row(form.memoryBus) }} + {{ form_row(form.memoryType) }}
Rendering Hardware - {{ form_row(edit_form.shadingUnits) }} - {{ form_row(edit_form.tmus) }} - {{ form_row(edit_form.rops) }} - {{ form_row(edit_form.computeUnits) }} - {{ form_row(edit_form.l1cache) }} - {{ form_row(edit_form.l2cache) }} + {{ form_row(form.shadingUnits) }} + {{ form_row(form.tmus) }} + {{ form_row(form.rops) }} + {{ form_row(form.computeUnits) }} + {{ form_row(form.l1cache) }} + {{ form_row(form.l2cache) }}
API Support - {{ form_row(edit_form.directXSupport) }} - {{ form_row(edit_form.openGLSupport) }} - {{ form_row(edit_form.openCLSupport) }} - {{ form_row(edit_form.vulkanSupport) }} - {{ form_row(edit_form.shaderModel) }} + {{ form_row(form.directXSupport) }} + {{ form_row(form.openGLSupport) }} + {{ form_row(form.openCLSupport) }} + {{ form_row(form.vulkanSupport) }} + {{ form_row(form.shaderModel) }}
Misc. - {{ form_row(edit_form.link) }} - {{ form_row(edit_form.count) }} - {{ form_row(edit_form.acquired) }} - {{ form_row(edit_form.notes) }} + {{ form_row(form.link) }} + {{ form_row(form.count) }} + {{ form_row(form.acquired) }} + {{ form_row(form.notes) }}
- {{ form_widget(edit_form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }} diff --git a/templates/gpu_core/edit.html.twig b/templates/gpu_core/edit.html.twig index 89c4ae5..9d1ebf6 100644 --- a/templates/gpu_core/edit.html.twig +++ b/templates/gpu_core/edit.html.twig @@ -14,10 +14,10 @@
- {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }} diff --git a/templates/header.html.twig b/templates/header.html.twig index 0239229..1f29971 100644 --- a/templates/header.html.twig +++ b/templates/header.html.twig @@ -3,41 +3,45 @@
-
- - -
  • - Computer Related - -
  • diff --git a/templates/lenses/edit.html.twig b/templates/lenses/edit.html.twig index 4d4680d..dc92870 100644 --- a/templates/lenses/edit.html.twig +++ b/templates/lenses/edit.html.twig @@ -16,10 +16,10 @@
    - {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
    diff --git a/templates/previouslyownedcamera/edit.html.twig b/templates/previouslyownedcamera/edit.html.twig index 12a1079..9892819 100644 --- a/templates/previouslyownedcamera/edit.html.twig +++ b/templates/previouslyownedcamera/edit.html.twig @@ -17,10 +17,10 @@
    - {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }} {{ form_start(reacquire_form) }} {{ form_widget(reacquire_form) }} diff --git a/templates/previouslyownedflash/edit.html.twig b/templates/previouslyownedflash/edit.html.twig index 6ad44b8..bec2985 100644 --- a/templates/previouslyownedflash/edit.html.twig +++ b/templates/previouslyownedflash/edit.html.twig @@ -16,10 +16,10 @@
    - {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
    diff --git a/templates/previouslyownedlenses/edit.html.twig b/templates/previouslyownedlenses/edit.html.twig index 8cff83b..cc173ff 100644 --- a/templates/previouslyownedlenses/edit.html.twig +++ b/templates/previouslyownedlenses/edit.html.twig @@ -16,9 +16,9 @@
    - {{ form_start(edit_form) }} - {{ form_widget(edit_form) }} + {{ form_start(form) }} + {{ form_widget(form) }} - {{ form_end(edit_form) }} + {{ form_end(form) }}
    {% endblock %}