summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/templates/actions/client_details.html4
-rw-r--r--ogcp/templates/actions/setup.html4
-rw-r--r--ogcp/views.py8
3 files changed, 8 insertions, 8 deletions
diff --git a/ogcp/templates/actions/client_details.html b/ogcp/templates/actions/client_details.html
index d4158bf..16160ea 100644
--- a/ogcp/templates/actions/client_details.html
+++ b/ogcp/templates/actions/client_details.html
@@ -16,7 +16,7 @@
<th>Partition</th>
<th>Type</th>
<th>Filesytem</th>
- <th>Size (KB)</th>
+ <th>Size (MB)</th>
<th>Image</th>
<th colspan="2"></th>
</tr>
@@ -27,7 +27,7 @@
<td>{{ entry.partition }}</td>
<td>{{ entry.code }}</td>
<td>{{ entry.filesystem }}</td>
- <td>{{ entry.size }}</td>
+ <td>{{ entry.size // 1024}}</td>
<td>{{ entry.image }}</td>
</tr>
{% endfor %}
diff --git a/ogcp/templates/actions/setup.html b/ogcp/templates/actions/setup.html
index a2f71f9..8b5b003 100644
--- a/ogcp/templates/actions/setup.html
+++ b/ogcp/templates/actions/setup.html
@@ -9,7 +9,7 @@
<thead class="text-center">
<tr>
<th>Partition Table</th>
- <th>Total Disk Size (KB)</th>
+ <th>Total Disk Size (MB)</th>
</tr>
</thead>
@@ -27,7 +27,7 @@
<th>Partition</th>
<th>Type</th>
<th>Filesytem</th>
- <th>Size (KB)</th>
+ <th>Size (MB)</th>
<th>Format?</th>
<th colspan="2"></th>
</tr>
diff --git a/ogcp/views.py b/ogcp/views.py
index bccd4f9..61e146b 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -309,7 +309,7 @@ def action_setup_show():
# If partition table is empty, set MSDOS
form.disk_type.data = filtered_partitions[0]['code'] or 1
- disk_size = filtered_partitions[0]['size']
+ disk_size = filtered_partitions[0]['size'] // 1024
# Make form.partition length equal to (filtered_partitions - 1) length
diff = len(filtered_partitions) - 1 - len(form.partitions)
@@ -319,7 +319,7 @@ def action_setup_show():
partition.partition.data = str(db_part['partition'])
partition.part_type.data = db_part['code']
partition.fs.data = db_part['filesystem']
- partition.size.data = db_part['size']
+ partition.size.data = db_part['size'] // 1024
scopes, _clients = get_scopes(ips)
return render_template('actions/setup.html',
selected_disk=selected_disk,
@@ -349,14 +349,14 @@ def action_setup_modify():
partition_setup = {'partition': str(partition.partition.data),
'code': str(partition.part_type.data),
'filesystem': str(partition.fs.data),
- 'size': str(partition.size.data),
+ 'size': str(partition.size.data * 1024),
'format': str(int(partition.format_partition.data))}
payload['partition_setup'].append(partition_setup)
if partition.partition.data in required_partitions:
required_partitions.remove(partition.partition.data)
if partition.part_type.data == 'CACHE':
payload['cache'] = '1'
- payload['cache_size'] = str(partition.size.data)
+ payload['cache_size'] = str(partition.size.data * 1024)
for partition in required_partitions:
empty_part = {