Commit c2b83f51 by Thimo Kraemer

Update bbexplorer.cgi

parent c68eecd4
......@@ -48,7 +48,7 @@ auth_users = []
auth_hosts = []
# Blocksize on storage server
blocksize = 1024
blocksize = 4096
#
# End of configuration
......@@ -448,7 +448,7 @@ ${if usage:}$
${for item in usage:}$
<tr>
<td>${item['name']}$</td>
<td width="80" align="right">${'%.1f' % item['size']}$ MB</td>
<td width="80" align="right">${'%.1f %s' % (item['size'], item['unit'])}$</td>
<td width="50" align="right">${item['percentage']}$ %</td>
<td width="300"
><img src="${path_images}$/pix.gif"
......@@ -472,7 +472,7 @@ ${:endif}$
src="http://www.joonis.de/common/images/joonis_button.gif"
title="joonis new media" /></a>
<a href="http://www.joonis.de/boxbackup-explorer"
target="_blank">Box Backup Explorer 0.2.2</a>
target="_blank">Box Backup Explorer 0.2.3</a>
</div>
</body>
</html>
......@@ -647,11 +647,13 @@ ${:endif}$
if data:
rows = data.splitlines()
for row in rows:
row = row.replace('*', '')
row = row.replace('*', '').replace('|', '').replace(',', '')
cols = row.split()
usage.append({
'name': ' '.join(cols[-len(cols):-2]),
'size': float(cols[-2].replace('Mb', '')),
'name': ' '.join(cols[-len(cols):-5]),
'blocks': int(cols[-5]),
'size': float(cols[-3]),
'unit': cols[-2],
'percentage': int(cols[-1].replace('%', '')),
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment