Show total RAM on settings page
This commit is contained in:
parent
d5a3e4bc00
commit
dfd33190b4
|
@ -181,6 +181,10 @@ def get_device_type():
|
|||
device = subprocess.check_output("mynode-get-device-type", shell=True)
|
||||
return device
|
||||
|
||||
def get_device_ram():
|
||||
ram = subprocess.check_output("free --giga | grep Mem | awk '{print $2}'", shell=True)
|
||||
return ram
|
||||
|
||||
def get_local_ip():
|
||||
local_ip = "unknown"
|
||||
try:
|
||||
|
|
|
@ -74,6 +74,7 @@ def page_settings():
|
|||
changelog = get_device_changelog()
|
||||
serial_number = get_device_serial()
|
||||
device_type = get_device_type()
|
||||
device_ram = get_device_ram()
|
||||
product_key = get_product_key()
|
||||
pk_skipped = skipped_product_key()
|
||||
pk_error = not is_valid_product_key()
|
||||
|
@ -141,6 +142,7 @@ def page_settings():
|
|||
"upgrade_logs": get_recent_upgrade_logs(),
|
||||
"serial_number": serial_number,
|
||||
"device_type": device_type,
|
||||
"device_ram": device_ram,
|
||||
"product_key": product_key,
|
||||
"product_key_skipped": pk_skipped,
|
||||
"product_key_error": pk_error,
|
||||
|
|
|
@ -490,6 +490,10 @@
|
|||
<td>Device Type</td>
|
||||
<td style="padding-left: 20px;">{{device_type}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Device RAM</td>
|
||||
<td style="padding-left: 20px;">{{device_ram}} GB</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td>Public IP</td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user