Merge pull request #6961 from YaRissi/fix/hetzner-deprecated
fix: deprecated hetzner servers
This commit is contained in:
commit
f0fc7af78c
3 changed files with 11 additions and 3 deletions
|
|
@ -299,9 +299,9 @@ private function getCpuVendorInfo(array $serverType): ?string
|
||||||
} elseif (str_starts_with($name, 'cpx')) {
|
} elseif (str_starts_with($name, 'cpx')) {
|
||||||
return 'AMD EPYC™';
|
return 'AMD EPYC™';
|
||||||
} elseif (str_starts_with($name, 'cx')) {
|
} elseif (str_starts_with($name, 'cx')) {
|
||||||
return 'Intel® Xeon®';
|
return 'Intel®/AMD';
|
||||||
} elseif (str_starts_with($name, 'cax')) {
|
} elseif (str_starts_with($name, 'cax')) {
|
||||||
return 'Ampere® Altra®';
|
return 'Ampere®';
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,14 @@ public function getImages(): array
|
||||||
|
|
||||||
public function getServerTypes(): 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
|
public function getSshKeys(): array
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<x-forms.select label="Server Type" id="selected_server_type" wire:model.live="selected_server_type"
|
<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">
|
required :disabled="!$selected_location">
|
||||||
<option value="">
|
<option value="">
|
||||||
{{ $selected_location ? 'Select a server type...' : 'Select a location first' }}
|
{{ $selected_location ? 'Select a server type...' : 'Select a location first' }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue