mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-12 16:39:15 +00:00
Added button to force check-in and find the public IP (#59)
* added button to force check-in and find the public IP * remove timer
This commit is contained in:
parent
68aa533ee4
commit
a0498a94a4
|
@ -172,6 +172,12 @@ def get_latest_version_page():
|
|||
update_latest_version()
|
||||
return redirect("/settings")
|
||||
|
||||
@mynode_settings.route("/settings/check-in")
|
||||
def check_in_page():
|
||||
check_logged_in()
|
||||
check_in()
|
||||
return redirect("/settings")
|
||||
|
||||
@mynode_settings.route("/settings/reset-blockchain")
|
||||
def reset_blockchain_page():
|
||||
check_logged_in()
|
||||
|
|
|
@ -334,7 +334,10 @@
|
|||
<div class="divider"></div>
|
||||
|
||||
|
||||
<div class="settings_block_subheader">Info</div>
|
||||
<div class="settings_block_subheader">
|
||||
Info
|
||||
<a href="/settings/check-in" class="ui-button ui-widget ui-corner-all settings_button_small">Refresh</a>
|
||||
</div>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>Serial Number</td>
|
||||
|
|
|
@ -73,7 +73,11 @@
|
|||
|
||||
{% include 'includes/message_display.html' %}
|
||||
|
||||
<div class="main_header">VPN Status</div>
|
||||
<div class="main_header">
|
||||
VPN Status
|
||||
<br/>
|
||||
<a href="/vpn-info/check-in" class="ui-button ui-widget ui-corner-all settings_button_small">Refresh</a>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class="app_tile_row">
|
||||
|
|
|
@ -151,7 +151,7 @@ def check_in():
|
|||
try:
|
||||
public_ip = get('https://mynodebtc.com/device_api/get_public_ip.php').text
|
||||
except Exception as e:
|
||||
public_ip = "error"
|
||||
public_ip = "Failed to find public IP. Click on the refresh button above."
|
||||
|
||||
# Check for new version
|
||||
update_latest_version()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from flask import Blueprint, render_template, session, abort, Markup, request, redirect, send_from_directory, url_for, flash
|
||||
from thread_functions import get_public_ip
|
||||
from thread_functions import get_public_ip, check_in
|
||||
from device_info import is_community_edition
|
||||
from settings import read_ui_settings
|
||||
from user_management import check_logged_in
|
||||
|
@ -83,3 +83,9 @@ def page_download_ovpn():
|
|||
|
||||
# Download ovpn
|
||||
return send_from_directory(directory="/home/pivpn/ovpns/", filename="mynode_vpn.ovpn")
|
||||
|
||||
@mynode_vpn.route("/vpn-info/check-in")
|
||||
def check_in_page():
|
||||
check_logged_in()
|
||||
check_in()
|
||||
return redirect("/vpn-info")
|
Loading…
Reference in New Issue
Block a user