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
3 changed files with 11 additions and 3 deletions

View File

@@ -299,9 +299,9 @@ class ByHetzner extends Component
} 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 @@ class HetznerService
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' }}