mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
fix(hetzner): Filter away ARM architecture from available servers
- Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/402
This commit is contained in:
parent
79f73ec729
commit
b5cfdfd68a
|
@ -79,6 +79,7 @@ class HetznerServerTypeInfo {
|
|||
this.prices,
|
||||
this.name,
|
||||
this.description,
|
||||
this.architecture,
|
||||
);
|
||||
final int cores;
|
||||
final num memory;
|
||||
|
@ -86,6 +87,7 @@ class HetznerServerTypeInfo {
|
|||
|
||||
final String name;
|
||||
final String description;
|
||||
final String architecture;
|
||||
|
||||
final List<HetznerPriceInfo> prices;
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson(
|
|||
.toList(),
|
||||
json['name'] as String,
|
||||
json['description'] as String,
|
||||
json['architecture'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HetznerServerTypeInfoToJson(
|
||||
|
@ -93,6 +94,7 @@ Map<String, dynamic> _$HetznerServerTypeInfoToJson(
|
|||
'disk': instance.disk,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'architecture': instance.architecture,
|
||||
'prices': instance.prices,
|
||||
};
|
||||
|
||||
|
|
|
@ -482,6 +482,9 @@ class HetznerServerProvider extends ServerProvider {
|
|||
|
||||
final rawTypes = result.data;
|
||||
for (final rawType in rawTypes) {
|
||||
if (rawType.architecture == 'arm') {
|
||||
continue;
|
||||
}
|
||||
for (final rawPrice in rawType.prices) {
|
||||
if (rawPrice.location == location.identifier) {
|
||||
types.add(
|
||||
|
|
Loading…
Reference in a new issue