mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 09:31:13 +00:00
Merge pull request 'fix(hetzner): Filter away ARM architecture from available servers' (#404) from arm-filtering into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/404 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
2710ba3e26
|
@ -79,6 +79,7 @@ class HetznerServerTypeInfo {
|
||||||
this.prices,
|
this.prices,
|
||||||
this.name,
|
this.name,
|
||||||
this.description,
|
this.description,
|
||||||
|
this.architecture,
|
||||||
);
|
);
|
||||||
final int cores;
|
final int cores;
|
||||||
final num memory;
|
final num memory;
|
||||||
|
@ -86,6 +87,7 @@ class HetznerServerTypeInfo {
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
final String description;
|
final String description;
|
||||||
|
final String architecture;
|
||||||
|
|
||||||
final List<HetznerPriceInfo> prices;
|
final List<HetznerPriceInfo> prices;
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ HetznerServerTypeInfo _$HetznerServerTypeInfoFromJson(
|
||||||
.toList(),
|
.toList(),
|
||||||
json['name'] as String,
|
json['name'] as String,
|
||||||
json['description'] as String,
|
json['description'] as String,
|
||||||
|
json['architecture'] as String,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$HetznerServerTypeInfoToJson(
|
Map<String, dynamic> _$HetznerServerTypeInfoToJson(
|
||||||
|
@ -93,6 +94,7 @@ Map<String, dynamic> _$HetznerServerTypeInfoToJson(
|
||||||
'disk': instance.disk,
|
'disk': instance.disk,
|
||||||
'name': instance.name,
|
'name': instance.name,
|
||||||
'description': instance.description,
|
'description': instance.description,
|
||||||
|
'architecture': instance.architecture,
|
||||||
'prices': instance.prices,
|
'prices': instance.prices,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -482,6 +482,9 @@ class HetznerServerProvider extends ServerProvider {
|
||||||
|
|
||||||
final rawTypes = result.data;
|
final rawTypes = result.data;
|
||||||
for (final rawType in rawTypes) {
|
for (final rawType in rawTypes) {
|
||||||
|
if (rawType.architecture == 'arm') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for (final rawPrice in rawType.prices) {
|
for (final rawPrice in rawType.prices) {
|
||||||
if (rawPrice.location == location.identifier) {
|
if (rawPrice.location == location.identifier) {
|
||||||
types.add(
|
types.add(
|
||||||
|
|
Loading…
Reference in a new issue