Skip to content

Commit 3eaef13

Browse files
authored
Pass step= to form to allow half GiB (if below 10). (#1084)
This addresses #1083. A bit hacky, unfortunately, but workable. Signed-off-by: Kurt Garloff <kurt@garloff.de>
1 parent fc75da8 commit 3eaef13

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Tests/iaas/scs_0100_flavor_naming/flavor-form.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ def make_component_form(spec, component):
124124
elif fdesc[0:2] == "##":
125125
# Float number => NUMBER
126126
print(f'\t <label for="{fname}">{fdesc[2:]}:</label><br/>')
127-
print(f'\t <input type="number" name="{path}" id="{fname}" min=0 value="{value}" size=5/>')
127+
# FIXME: This is a hack: we hardcode step=0.5 knowing that RAM is the only float
128+
step = 0.5
129+
print(f'\t <input type="number" name="{path}" id="{fname}" min={step} step={step} value="{value}" size=5/>')
128130
elif fdesc[0] == "#":
129131
# Float number => NUMBER
130132
if fdesc[1] == ".":

0 commit comments

Comments
 (0)