mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-13 17:09:15 +00:00
Move low mem warning to status page
This commit is contained in:
parent
b8c437d937
commit
78b4252ce0
|
@ -616,8 +616,6 @@ def index():
|
||||||
"product_key_error": pk_error,
|
"product_key_error": pk_error,
|
||||||
"fsck_error": has_fsck_error(),
|
"fsck_error": has_fsck_error(),
|
||||||
"fsck_results": get_fsck_results(),
|
"fsck_results": get_fsck_results(),
|
||||||
"oom_error": has_oom_error(),
|
|
||||||
"oom_info": get_oom_error_info(),
|
|
||||||
"sd_rw_error": has_sd_rw_error(),
|
"sd_rw_error": has_sd_rw_error(),
|
||||||
"drive_usage": drive_usage,
|
"drive_usage": drive_usage,
|
||||||
"low_drive_space_error": low_drive_space_error,
|
"low_drive_space_error": low_drive_space_error,
|
||||||
|
@ -868,12 +866,6 @@ def page_clear_fsck_error():
|
||||||
clear_fsck_error()
|
clear_fsck_error()
|
||||||
return redirect("/")
|
return redirect("/")
|
||||||
|
|
||||||
@app.route("/clear-oom-error")
|
|
||||||
def page_clear_oom_error():
|
|
||||||
check_logged_in()
|
|
||||||
clear_oom_error()
|
|
||||||
return redirect("/")
|
|
||||||
|
|
||||||
@app.route("/login", methods=["GET","POST"])
|
@app.route("/login", methods=["GET","POST"])
|
||||||
def page_login():
|
def page_login():
|
||||||
templateData = {
|
templateData = {
|
||||||
|
|
|
@ -85,6 +85,8 @@ def page_settings():
|
||||||
"date": date,
|
"date": date,
|
||||||
"local_ip": local_ip,
|
"local_ip": local_ip,
|
||||||
"throttled_data": get_throttled_data(),
|
"throttled_data": get_throttled_data(),
|
||||||
|
"oom_error": has_oom_error(),
|
||||||
|
"oom_info": get_oom_error_info(),
|
||||||
"drive_usage": get_drive_usage(),
|
"drive_usage": get_drive_usage(),
|
||||||
"cpu_usage": get_cpu_usage(),
|
"cpu_usage": get_cpu_usage(),
|
||||||
"ram_usage": get_ram_usage(),
|
"ram_usage": get_ram_usage(),
|
||||||
|
@ -256,6 +258,8 @@ def page_status():
|
||||||
"date": date,
|
"date": date,
|
||||||
"local_ip": local_ip,
|
"local_ip": local_ip,
|
||||||
"throttled_data": get_throttled_data(),
|
"throttled_data": get_throttled_data(),
|
||||||
|
"oom_error": has_oom_error(),
|
||||||
|
"oom_info": get_oom_error_info(),
|
||||||
"drive_usage": get_drive_usage(),
|
"drive_usage": get_drive_usage(),
|
||||||
"cpu_usage": get_cpu_usage(),
|
"cpu_usage": get_cpu_usage(),
|
||||||
"ram_usage": get_ram_usage(),
|
"ram_usage": get_ram_usage(),
|
||||||
|
@ -888,3 +892,10 @@ def modify_swap_page():
|
||||||
"ui_settings": read_ui_settings()
|
"ui_settings": read_ui_settings()
|
||||||
}
|
}
|
||||||
return render_template('reboot.html', **templateData)
|
return render_template('reboot.html', **templateData)
|
||||||
|
|
||||||
|
@mynode_settings.route("/settings/clear-oom-error")
|
||||||
|
def page_clear_oom_error():
|
||||||
|
check_logged_in()
|
||||||
|
clear_oom_error()
|
||||||
|
flash("Warning Cleared", category="message")
|
||||||
|
return redirect("/settings")
|
|
@ -27,6 +27,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if oom_error %}
|
{% if oom_error %}
|
||||||
|
<!--
|
||||||
<div class="main_page_warning_block">
|
<div class="main_page_warning_block">
|
||||||
<center>
|
<center>
|
||||||
<p><b>Low Memory Warning</b><br/>Your device was running low on memory and a process has been killed. Please disable some applications and reboot the device.</p>
|
<p><b>Low Memory Warning</b><br/>Your device was running low on memory and a process has been killed. Please disable some applications and reboot the device.</p>
|
||||||
|
@ -34,6 +35,7 @@
|
||||||
<a href="/clear-oom-error" class="ui-button ui-widget ui-corner-all settings_button_small">OK</a>
|
<a href="/clear-oom-error" class="ui-button ui-widget ui-corner-all settings_button_small">OK</a>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not has_changed_password %}
|
{% if not has_changed_password %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user