mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +00:00
Show image size under DEVICE INFO (#314)
This commit is contained in:
parent
9bd0b9802b
commit
f2d889aca1
@ -304,10 +304,24 @@ def list_devices(scsi_id=None, un=None):
|
||||
dprod = result.devices_info.devices[n].product
|
||||
drev = result.devices_info.devices[n].revision
|
||||
dblock = result.devices_info.devices[n].block_size
|
||||
dsize = int(result.devices_info.devices[n].block_count) * int(dblock)
|
||||
|
||||
device_list.append({"id": did, "un": dun, "device_type": dtype, \
|
||||
"status": ", ".join(dstat_msg), "image": dpath, "file": dfile, "params": dparam,\
|
||||
"vendor": dven, "product": dprod, "revision": drev, "block_size": dblock})
|
||||
device_list.append(
|
||||
{
|
||||
"id": did,
|
||||
"un": dun,
|
||||
"device_type": dtype,
|
||||
"status": ", ".join(dstat_msg),
|
||||
"image": dpath,
|
||||
"file": dfile,
|
||||
"params": dparam,
|
||||
"vendor": dven,
|
||||
"product": dprod,
|
||||
"revision": drev,
|
||||
"block_size": dblock,
|
||||
"size": dsize,
|
||||
}
|
||||
)
|
||||
n += 1
|
||||
|
||||
return {"status": True, "device_list": device_list}
|
||||
|
@ -436,6 +436,7 @@ def device_info():
|
||||
flash(f"Type: {device['device_type']}")
|
||||
flash(f"Status: {device['status']}")
|
||||
flash(f"File: {device['image']}")
|
||||
flash(f"File Size: {device['size']} bytes")
|
||||
flash(f"Parameters: {device['params']}")
|
||||
flash(f"Vendor: {device['vendor']}")
|
||||
flash(f"Product: {device['product']}")
|
||||
|
Loading…
Reference in New Issue
Block a user