Improve statuses

This commit is contained in:
Taylor Helsper 2020-02-27 19:26:08 -06:00
parent a951698224
commit 89c3cda7b7
2 changed files with 18 additions and 5 deletions

View File

@ -338,17 +338,28 @@ def index():
btcrpcexplorer_status = "Waiting on bitcoin..." btcrpcexplorer_status = "Waiting on bitcoin..."
# Find mempool space status # Find mempool space status
mempoolspace_status = "Mempool Viewer"
if is_mempoolspace_enabled(): if is_mempoolspace_enabled():
status_code = get_service_status_code("mempoolspace") if is_installing_docker_images():
mempoolspace_status_color = get_service_status_color("mempoolspace") mempoolspace_status_color = "yellow"
mempoolspace_status = "Installing..."
else:
mempoolspace_status_color = get_service_status_color("mempoolspace")
# Find lndconnect status # Find lndconnect status
if lnd_ready: if lnd_ready:
lndconnect_status_color = "green" lndconnect_status_color = "green"
# Find btcpayserver status # Find btcpayserver status
btcpayserver_status = "Merchant Tool"
if lnd_ready: if lnd_ready:
btcpayserver_status_color = get_service_status_color("btcpayserver") if is_installing_docker_images():
btcpayserver_status_color = "yellow"
btcpayserver_status = "Installing..."
else:
btcpayserver_status_color = get_service_status_color("btcpayserver")
else:
btcpayserver_status = "Waiting on LND..."
# Find explorer status # Find explorer status
explorer_status_color = electrs_status_color explorer_status_color = electrs_status_color
@ -408,9 +419,11 @@ def index():
"btcrpcexplorer_status": btcrpcexplorer_status, "btcrpcexplorer_status": btcrpcexplorer_status,
"btcrpcexplorer_enabled": is_btcrpcexplorer_enabled(), "btcrpcexplorer_enabled": is_btcrpcexplorer_enabled(),
"mempoolspace_status_color": mempoolspace_status_color, "mempoolspace_status_color": mempoolspace_status_color,
"mempoolspace_status": mempoolspace_status,
"mempoolspace_enabled": is_mempoolspace_enabled(), "mempoolspace_enabled": is_mempoolspace_enabled(),
"btcpayserver_enabled": is_btcpayserver_enabled(), "btcpayserver_enabled": is_btcpayserver_enabled(),
"btcpayserver_status_color": btcpayserver_status_color, "btcpayserver_status_color": btcpayserver_status_color,
"btcpayserver_status": btcpayserver_status,
"lndconnect_status_color": lndconnect_status_color, "lndconnect_status_color": lndconnect_status_color,
"vpn_status_color": vpn_status_color, "vpn_status_color": vpn_status_color,
"vpn_status": vpn_status, "vpn_status": vpn_status,

View File

@ -15,7 +15,7 @@
<div class="app_status_icon {{ btcpayserver_status_color }}"></div> <div class="app_status_icon {{ btcpayserver_status_color }}"></div>
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/btcpayserver.png")}}"/></div> <div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/btcpayserver.png")}}"/></div>
<div class="app_title">BTCPay Server</div> <div class="app_title">BTCPay Server</div>
<div class="app_status">{% if not lnd_ready %}Waiting on LND...{% else %}Merchant Tool{% endif %}</div> <div class="app_status">{{ btcpayserver_status }}</div>
<div class="app_contents"> <div class="app_contents">
{% if product_key_skipped %} {% if product_key_skipped %}
Premium Feature Premium Feature
@ -108,7 +108,7 @@
<div class="app_status_icon {% if product_key_skipped %}gray{% else %} {{mempoolspace_status_color}} {% endif %}"></div> <div class="app_status_icon {% if product_key_skipped %}gray{% else %} {{mempoolspace_status_color}} {% endif %}"></div>
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/mempoolspace.png")}}"/></div> <div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/mempoolspace.png")}}"/></div>
<div class="app_title">Mempool.Space</div> <div class="app_title">Mempool.Space</div>
<div class="app_status">Mempool Viewer</div> <div class="app_status">{{ mempoolspace_status }}</div>
<div class="app_contents"> <div class="app_contents">
{% if product_key_skipped %} {% if product_key_skipped %}
Premium Feature Premium Feature