mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 09:31:13 +00:00
chore: Merge ram-server-filtering into master
Reviewed-on: https://git.selfprivacy.org/kherel/selfprivacy.org.app/pulls/200 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
79dcb4178a
|
@ -808,12 +808,13 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi {
|
|||
final rawSizes = response.data!['sizes'];
|
||||
for (final rawSize in rawSizes) {
|
||||
for (final rawRegion in rawSize['regions']) {
|
||||
if (rawRegion.toString() == location.identifier) {
|
||||
final ramMb = rawSize['memory'].toDouble();
|
||||
if (rawRegion.toString() == location.identifier && ramMb > 1024) {
|
||||
types.add(
|
||||
ServerType(
|
||||
title: rawSize['description'],
|
||||
identifier: rawSize['slug'],
|
||||
ram: rawSize['memory'].toDouble(),
|
||||
ram: ramMb / 1024,
|
||||
cores: rawSize['vcpus'],
|
||||
disk: DiskSize(byte: rawSize['disk'] * 1024 * 1024 * 1024),
|
||||
price: Price(
|
||||
|
|
|
@ -14,7 +14,7 @@ class ServerType {
|
|||
});
|
||||
final String title;
|
||||
final String identifier;
|
||||
final double ram;
|
||||
final double ram; // GB !!
|
||||
final DiskSize disk;
|
||||
final int cores;
|
||||
final Price price;
|
||||
|
|
Loading…
Reference in a new issue