[pve-devel] applied-series: [PATCH series/flutter 0/4] fixes related to PVE 7

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 23 13:36:18 CEST 2021


On 23.06.21 12:04, Aaron Lauterer wrote:
> This series contains a few fixes for problems that I came across when
> testing the flutter app against Proxmox VE 7.
> 
> The first bigger one, affecting the first 3 patches, is handling of
> different types when parsing API responses. The PVE API is not always
> returning the expected type. In most situations it is numbers formatted
> as strings instead of numbers.
> 
> For dynamically types languages this is usually much less of a problem
> as it is in statically typed languages as dart.
> To handle that, I introduced new custom serializers for Strings,
> integers and doubles. If the value is not of the expected type, they
> should be able to handle situations where the number is formatted as
> string or where the expected string is formatted as number and
> cast/parse them accordingly.
> 
> The last patch addresses a problem that showed up when trying to open
> the power menu for a guest that had been powered off. The handling of
> the states template value being null has not been done correctly. I used
> the same approach as throughout the other parts where the template
> status is checked -> falling back to false.
> 
> dart_api_client: Aaron Lauterer (3):
>   Add string serializer to handle int and double values
>   Add int serializer to handle string values
>   Add double serializer to handle String and int values
> 
>  lib/src/models/pve_double_serializer.dart | 28 +++++++++++++++++++++++
>  lib/src/models/pve_int_serializer.dart    | 25 ++++++++++++++++++++
>  lib/src/models/pve_string_serializer.dart | 25 ++++++++++++++++++++
>  lib/src/models/serializers.dart           |  6 +++++
>  4 files changed, 84 insertions(+)
>  create mode 100644 lib/src/models/pve_double_serializer.dart
>  create mode 100644 lib/src/models/pve_int_serializer.dart
>  create mode 100644 lib/src/models/pve_string_serializer.dart
> 
> flutter_frontend: Aaron Lauterer (1):
>   power settings: fix handling null for template status
> 
>  lib/widgets/pve_qemu_power_settings_widget.dart | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 



applied series, thanks!





More information about the pve-devel mailing list