Add device type info on settings page

This commit is contained in:
Taylor Helsper 2019-07-15 22:30:08 -05:00
parent 377f18db23
commit 7857787f3e
3 changed files with 12 additions and 3 deletions

View File

@ -40,6 +40,10 @@ def get_device_serial():
return serial
def get_device_type():
return CONFIG["device_type"]
def set_skipped_product_key():
os.system("touch /home/bitcoin/.mynode/.product_key_skipped")
os.system("touch /mnt/hdd/mynode/settings/.product_key_skipped")

View File

@ -99,6 +99,7 @@ def page_settings():
latest_version = get_latest_version()
serial_number = get_device_serial()
device_type = get_device_type()
product_key = get_product_key()
pk_skipped = skipped_product_key()
pk_error = not is_valid_product_key()
@ -117,6 +118,7 @@ def page_settings():
"current_version": current_version,
"latest_version": latest_version,
"serial_number": serial_number,
"device_type": device_type,
"product_key": product_key,
"product_key_skipped": pk_skipped,
"product_key_error": pk_error,

View File

@ -176,7 +176,7 @@
<tr>
<td>Latest Version</td>
<td>{{latest_version}}</td>
<td><a href="/settings/get-latest-version" class="ui-button ui-widget ui-corner-all settings_button_small">Check for Updates</a></td>
<td>&nbsp;<a href="/settings/get-latest-version" class="ui-button ui-widget ui-corner-all settings_button_small">Check for Updates</a></td>
</tr>
</table>
{% if current_version != latest_version %}
@ -199,11 +199,14 @@
<td style="padding-left: 20px;">
{{product_key}}
{% if product_key_skipped %}
<br/>
<a href="/product-key" class="ui-button ui-widget ui-corner-all settings_button_small">Enter Product Key</a>
&nbsp;<a href="/product-key" class="ui-button ui-widget ui-corner-all settings_button_small">Enter Product Key</a>
{% endif %}
</td>
</tr>
<tr>
<td>Device Type</td>
<td style="padding-left: 20px;">{{device_type}}</td>
</tr>
<tr>
<td>Uptime</td>
<td style="padding-left: 20px;">{{uptime}}</td>