Skip to content

Commit

Permalink
Use GiB units
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Nov 15, 2024
1 parent 89d712c commit e2e310b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def showvminfo():

for elem in vminfo:
if elem.endswith("size") and isinstance(vminfo[elem], (int, float)):
vminfo[elem] = "%.1f GB" % (vminfo[elem] / 1073741824.0)
vminfo[elem] = "%.1f GiB" % (vminfo[elem] / 1073741824.0)

cont = 0
while "disk.%s.size" % cont in vminfo or "disk.%s.image.url" % cont in vminfo:
Expand Down
4 changes: 2 additions & 2 deletions app/templates/vminfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ <h5 class="modal-title" id="managevm_resize_label">VM resize</h5>
</div>
<div class="col">
{% set memory_parts = memory.split() %}
Memory (GB): <input name="memory" class="col-sm-12" type="number" min="0" value="{{ memory_parts[0] | float }}" required/>
Memory (GiB): <input name="memory" class="col-sm-12" type="number" min="0" value="{{ memory_parts[0] | float }}" required/>
</div>
</div>

Expand All @@ -342,7 +342,7 @@ <h5 class="modal-title" id="managevm_resize_label">VM resize</h5>
</div>
<div class="col">
{% set disk_size_parts = disk_size.split() %}
Disk Size (GB): <input name="disk_size" class="col-sm-12" type="number" min="0" value="{{ disk_size_parts[0] | float }}"/>
Disk Size (GiB): <input name="disk_size" class="col-sm-12" type="number" min="0" value="{{ disk_size_parts[0] | float }}"/>
</div>
</div>

Expand Down

0 comments on commit e2e310b

Please sign in to comment.