From 8bcff7a038fecf77208a3be5511fee0220a18c03 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 21 May 2021 17:08:27 -0400 Subject: [PATCH] fix(cgi-bin): transform boolean int to JSON boolean in get_shared_storage --- cgi-bin/get_shared_storage | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cgi-bin/get_shared_storage b/cgi-bin/get_shared_storage index 108ba72b..eec68d3c 100755 --- a/cgi-bin/get_shared_storage +++ b/cgi-bin/get_shared_storage @@ -155,7 +155,8 @@ ORDER BY push @{$file_system->{nodes}}, { host_uuid => $host_uuid, host_name => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{host_name}, - is_mounted => 1, + # \1 will be transformed to the JSON boolean "true" by the JSON module. + is_mounted => \1, total => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{total}, free => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{free}, } @@ -165,7 +166,8 @@ ORDER BY push @{$file_system->{nodes}}, { host_uuid => $host_uuid, host_name => $anvil->data->{hosts}{host_uuid}{$host_uuid}{host_name}, - is_mounted => 0, + # \0 will be transformed to the JSON boolean "false" by the JSON module. + is_mounted => \0, total => 0, free => 0, }