mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-12 08:29:16 +00:00
Add button to clear fsck error
This commit is contained in:
parent
5da39f36ed
commit
f4471de695
|
@ -391,6 +391,8 @@ def is_drive_being_repaired():
|
|||
return os.path.isfile("/tmp/repairing_drive")
|
||||
def has_fsck_error():
|
||||
return os.path.isfile("/tmp/fsck_error")
|
||||
def clear_fsck_error():
|
||||
os.system("rm -f /tmp/fsck_error")
|
||||
def get_fsck_results():
|
||||
try:
|
||||
with open("/tmp/fsck_results", "r") as f:
|
||||
|
|
|
@ -634,6 +634,12 @@ def page_toggle_dojo():
|
|||
enable_dojo()
|
||||
return redirect("/")
|
||||
|
||||
@app.route("/clear-fsck-error")
|
||||
def page_clear_fsck_error():
|
||||
check_logged_in()
|
||||
clear_fsck_error()
|
||||
return redirect("/")
|
||||
|
||||
@app.route("/login", methods=["GET","POST"])
|
||||
def page_login():
|
||||
templateData = {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<center>
|
||||
<p>There may be an error with the filesystem on your drive.</p>
|
||||
<p>{{ fsck_results }}</p>
|
||||
<a href="/clear-fsck-error" class="ui-button ui-widget ui-corner-all settings_button_small">OK</a>
|
||||
</center>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user