Add LND version to Lightning page
This commit is contained in:
parent
5e39f67b62
commit
cc5e64a2c1
|
@ -10,6 +10,7 @@ from bitcoin_info import *
|
|||
# Variables
|
||||
lightning_info = None
|
||||
lnd_ready = False
|
||||
lnd_version = None
|
||||
|
||||
LND_FOLDER = "/mnt/hdd/mynode/lnd/"
|
||||
MACAROON_FILE = "/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon"
|
||||
|
@ -150,3 +151,8 @@ def get_lnd_channels():
|
|||
print("EXCEPTION: {}".format(str(e)))
|
||||
return False
|
||||
|
||||
def get_lnd_version():
|
||||
global lnd_version
|
||||
if lnd_version == None:
|
||||
lnd_version = subprocess.check_output("lnd --version | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n 1", shell=True)
|
||||
return lnd_version
|
|
@ -63,6 +63,7 @@ def page_lnd():
|
|||
"title": "myNode Lightning Wallet",
|
||||
"wallet_exists": wallet_exists,
|
||||
"wallet_logged_in": wallet_logged_in,
|
||||
"version": get_lnd_version(),
|
||||
"status": status,
|
||||
"message": message
|
||||
}
|
||||
|
@ -74,6 +75,7 @@ def page_lnd():
|
|||
"wallet_exists": wallet_exists,
|
||||
"wallet_logged_in": wallet_logged_in,
|
||||
"status": get_lnd_status(),
|
||||
"version": get_lnd_version(),
|
||||
"message": message
|
||||
}
|
||||
return render_template('lnd.html', **templateData)
|
||||
|
@ -107,6 +109,7 @@ def page_lnd():
|
|||
"title": "myNode Lightning Status",
|
||||
"wallet_exists": wallet_exists,
|
||||
"wallet_logged_in": wallet_logged_in,
|
||||
"version": get_lnd_version(),
|
||||
"channel_backup_exists": channel_backup_exists,
|
||||
"status": status,
|
||||
"height": height,
|
||||
|
|
|
@ -132,6 +132,10 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Version</div>
|
||||
<div class="info_tile_contents">{{version}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if wallet_exists or channel_backup_exists %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user