mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 22:18:07 +00:00
Add warning for subnet conflicts
This commit is contained in:
parent
a0319a02ed
commit
b27ad0ccf2
|
@ -363,6 +363,12 @@ def get_local_ip():
|
||||||
|
|
||||||
return local_ip
|
return local_ip
|
||||||
|
|
||||||
|
def get_local_ip_subnet_conflict():
|
||||||
|
ip = get_local_ip()
|
||||||
|
if ip.startswith("172."):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def get_device_changelog():
|
def get_device_changelog():
|
||||||
changelog = ""
|
changelog = ""
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -99,6 +99,7 @@ def page_settings():
|
||||||
"uptime": uptime,
|
"uptime": uptime,
|
||||||
"date": date,
|
"date": date,
|
||||||
"local_ip": local_ip,
|
"local_ip": local_ip,
|
||||||
|
"local_ip_subnet_conflit": get_local_ip_subnet_conflict(),
|
||||||
"throttled_data": get_throttled_data(),
|
"throttled_data": get_throttled_data(),
|
||||||
"oom_error": has_oom_error(),
|
"oom_error": has_oom_error(),
|
||||||
"oom_info": get_oom_error_info(),
|
"oom_info": get_oom_error_info(),
|
||||||
|
@ -289,6 +290,7 @@ def page_status():
|
||||||
"uptime": uptime,
|
"uptime": uptime,
|
||||||
"date": date,
|
"date": date,
|
||||||
"local_ip": local_ip,
|
"local_ip": local_ip,
|
||||||
|
"local_ip_subnet_conflit": get_local_ip_subnet_conflict(),
|
||||||
"throttled_data": get_throttled_data(),
|
"throttled_data": get_throttled_data(),
|
||||||
"oom_error": has_oom_error(),
|
"oom_error": has_oom_error(),
|
||||||
"oom_info": get_oom_error_info(),
|
"oom_info": get_oom_error_info(),
|
||||||
|
|
|
@ -34,7 +34,12 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Local IP</th>
|
<th>Local IP</th>
|
||||||
<td>{{local_ip}}</td>
|
<td>
|
||||||
|
{{local_ip}}
|
||||||
|
{% if local_ip_subnet_conflit %}
|
||||||
|
<br/><span style="color: red; font-size: 10px;">*Your IP address may conflict with internal subnets and cause issues</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if throttled_data['RAW_DATA'] != "0x0" and throttled_data['RAW_DATA'] != "MISSING" %}
|
{% if throttled_data['RAW_DATA'] != "0x0" and throttled_data['RAW_DATA'] != "MISSING" %}
|
||||||
{% if throttled_data['UNDERVOLTED'] or throttled_data['CAPPED'] or throttled_data['THROTTLED'] or throttled_data['SOFT_TEMPLIMIT'] %}
|
{% if throttled_data['UNDERVOLTED'] or throttled_data['CAPPED'] or throttled_data['THROTTLED'] or throttled_data['SOFT_TEMPLIMIT'] %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user