Merge pull request #6961 from YaRissi/fix/hetzner-deprecated

fix: deprecated hetzner servers
This commit is contained in:
Andras Bacsai 2025-10-22 21:42:24 +02:00 committed by GitHub
commit f0fc7af78c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View file

@ -299,9 +299,9 @@ private function getCpuVendorInfo(array $serverType): ?string
} elseif (str_starts_with($name, 'cpx')) {
return 'AMD EPYC™';
} elseif (str_starts_with($name, 'cx')) {
return 'Intel® Xeon®';
return 'Intel®/AMD';
} elseif (str_starts_with($name, 'cax')) {
return 'Ampere® Altra®';
return 'Ampere®';
}
return null;

View file

@ -88,7 +88,14 @@ public function getImages(): array
public function getServerTypes(): array
{
return $this->requestPaginated('get', '/server_types', 'server_types');
$types = $this->requestPaginated('get', '/server_types', 'server_types');
// Filter out entries where "deprecated" is explicitly true
$filtered = array_filter($types, function ($type) {
return ! (isset($type['deprecated']) && $type['deprecated'] === true);
});
return array_values($filtered);
}
public function getSshKeys(): array

View file

@ -61,6 +61,7 @@
<div>
<x-forms.select label="Server Type" id="selected_server_type" wire:model.live="selected_server_type"
helper="Learn more about <a class='inline-block underline dark:text-white' href='https://www.hetzner.com/cloud/' target='_blank'>Hetzner server types</a>"
required :disabled="!$selected_location">
<option value="">
{{ $selected_location ? 'Select a server type...' : 'Select a location first' }}