fix(cgi-bin): transform boolean int to JSON boolean in get_shared_storage

main
Tsu-ba-me 4 years ago
parent 5b7367a579
commit 8bcff7a038
  1. 6
      cgi-bin/get_shared_storage

@ -155,7 +155,8 @@ ORDER BY
push @{$file_system->{nodes}}, { push @{$file_system->{nodes}}, {
host_uuid => $host_uuid, host_uuid => $host_uuid,
host_name => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{host_name}, 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}, total => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{total},
free => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{free}, free => $anvil->data->{raw}{file_systems}{$mount_point}{nodes}{$host_uuid}{free},
} }
@ -165,7 +166,8 @@ ORDER BY
push @{$file_system->{nodes}}, { push @{$file_system->{nodes}}, {
host_uuid => $host_uuid, host_uuid => $host_uuid,
host_name => $anvil->data->{hosts}{host_uuid}{$host_uuid}{host_name}, 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, total => 0,
free => 0, free => 0,
} }

Loading…
Cancel
Save