diff --git a/rootfs/standard/var/www/mynode/bitcoind.py b/rootfs/standard/var/www/mynode/bitcoin.py similarity index 90% rename from rootfs/standard/var/www/mynode/bitcoind.py rename to rootfs/standard/var/www/mynode/bitcoin.py index 7e424f00..4b71464a 100644 --- a/rootfs/standard/var/www/mynode/bitcoind.py +++ b/rootfs/standard/var/www/mynode/bitcoin.py @@ -12,7 +12,7 @@ import hashlib import json import time -mynode_bitcoind = Blueprint('mynode_bitcoind',__name__) +mynode_bitcoin = Blueprint('mynode_bitcoin',__name__) def runcmd(cmd): @@ -27,7 +27,7 @@ def cleanup_download_wallets(): os.system("rm -rf /tmp/download_wallets/*") ### Page functions -@mynode_bitcoind.route("/bitcoind") +@mynode_bitcoin.route("/bitcoin") def bitcoind_status_page(): check_logged_in() @@ -94,10 +94,11 @@ def bitcoind_status_page(): except Exception as e: templateData = { "title": "myNode Bitcoin Error", + "header": "Bitcoin Status", "message": Markup("Error communicating with bitcoind. Node may be busy syncing.

{}".format(str(e))), "ui_settings": read_ui_settings() } - return render_template('bitcoind_status_error.html', **templateData) + return render_template('error.html', **templateData) templateData = { @@ -118,15 +119,15 @@ def bitcoind_status_page(): "version": version, "ui_settings": read_ui_settings() } - return render_template('bitcoind_status.html', **templateData) + return render_template('bitcoin.html', **templateData) -@mynode_bitcoind.route("/bitcoind/download_wallet", methods=["GET"]) +@mynode_bitcoin.route("/download_wallet", methods=["GET"]) def bitcoin_download_wallet(): check_logged_in() wallet_name = request.args.get('wallet') if wallet_name is None: flash("Error finding wallet to download!", category="error") - return redirect("/bitcoind") + return redirect("/bitcoin") os.system("mkdir -p /tmp/download_wallets") os.system("chmod 777 /tmp/download_wallets") @@ -134,19 +135,19 @@ def bitcoin_download_wallet(): if not os.path.isfile("/tmp/download_wallets/"+wallet_name): flash("Error exporting wallet data for download", category="error") - return redirect("/bitcoind") + return redirect("/bitcoin") t = Timer(3.0, cleanup_download_wallets) t.start() return send_from_directory(directory="/tmp/download_wallets/", filename=wallet_name, as_attachment=True) -@mynode_bitcoind.route("/bitcoind/bitcoin_whitepaper.pdf") +@mynode_bitcoin.route("/bitcoin/bitcoin_whitepaper.pdf") def bitcoin_whitepaper_pdf(): check_logged_in() return send_from_directory(directory="/mnt/hdd/mynode/bitcoin/", filename="bitcoin_whitepaper.pdf") -@mynode_bitcoind.route("/bitcoind/reset_config") +@mynode_bitcoin.route("/bitcoin/reset_config") def bitcoin_reset_config_page(): check_logged_in() @@ -165,7 +166,7 @@ def bitcoin_reset_config_page(): } return render_template('reboot.html', **templateData) -@mynode_bitcoind.route("/bitcoind/config", methods=['GET','POST']) +@mynode_bitcoin.route("/bitcoin/config", methods=['GET','POST']) def bitcoind_config_page(): check_logged_in() @@ -197,9 +198,9 @@ def bitcoind_config_page(): "bitcoin_config": bitcoin_config, "ui_settings": read_ui_settings() } - return render_template('bitcoind_config.html', **templateData) + return render_template('bitcoin_config.html', **templateData) -@mynode_bitcoind.route("/bitcoind/cli") +@mynode_bitcoin.route("/bitcoin/cli") def bitcoincli(): check_logged_in() @@ -210,7 +211,7 @@ def bitcoincli(): } return render_template('bitcoin_cli.html', **templateData) -@mynode_bitcoind.route("/bitcoind/cli-run", methods=['POST']) +@mynode_bitcoin.route("/bitcoin/cli-run", methods=['POST']) def runcmd_page(): check_logged_in() diff --git a/rootfs/standard/var/www/mynode/lnd.py b/rootfs/standard/var/www/mynode/lnd.py index ad032240..9770a363 100644 --- a/rootfs/standard/var/www/mynode/lnd.py +++ b/rootfs/standard/var/www/mynode/lnd.py @@ -130,10 +130,11 @@ def page_lnd(): except Exception as e: templateData = { "title": "myNode Lightning Status", + "header": "Lightning Status", "message": str(e), "ui_settings": read_ui_settings() } - return render_template('lnd_error.html', **templateData) + return render_template('error.html', **templateData) templateData = { "title": "myNode Lightning Status", @@ -224,10 +225,12 @@ def page_lnd_create_wallet(): except: templateData = { "title": "myNode Lightning Wallet", + "show_lightning_back_button": True, + "header": "Lightning Status", "message": Markup("Waiting on Lightning...
Please try again in a minute."), "ui_settings": read_ui_settings() } - return render_template('lnd_error.html', **templateData) + return render_template('error.html', **templateData) templateData = { "title": "myNode Lightning Wallet", diff --git a/rootfs/standard/var/www/mynode/mynode.py b/rootfs/standard/var/www/mynode/mynode.py index 470788f3..69e8316f 100644 --- a/rootfs/standard/var/www/mynode/mynode.py +++ b/rootfs/standard/var/www/mynode/mynode.py @@ -3,7 +3,7 @@ from config import * from flask import Flask, render_template, Markup, send_from_directory, redirect, request, url_for from user_management import * from api import mynode_api -from bitcoind import mynode_bitcoind +from bitcoin import mynode_bitcoin from whirlpool import mynode_whirlpool, get_whirlpool_status from dojo import mynode_dojo, get_dojo_status from joininbox import mynode_joininbox @@ -73,7 +73,7 @@ my_logger.addHandler(handler) app.logger.addHandler(my_logger) app.logger.setLevel(logging.INFO) -app.register_blueprint(mynode_bitcoind) +app.register_blueprint(mynode_bitcoin) app.register_blueprint(mynode_lnd) app.register_blueprint(mynode_api) app.register_blueprint(mynode_whirlpool) diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index 570acfe0..8eb2b313 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -1,7 +1,7 @@ from config import * from flask import Blueprint, render_template, session, abort, Markup, request, redirect, send_from_directory, url_for, flash, current_app from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException -from bitcoind import is_bitcoind_synced +from bitcoin import is_bitcoind_synced from bitcoin_info import using_bitcoin_custom_config from lightning_info import using_lnd_custom_config from pprint import pprint, pformat diff --git a/rootfs/standard/var/www/mynode/static/css/mynode.css b/rootfs/standard/var/www/mynode/static/css/mynode.css index dc547498..0646fbec 100644 --- a/rootfs/standard/var/www/mynode/static/css/mynode.css +++ b/rootfs/standard/var/www/mynode/static/css/mynode.css @@ -158,6 +158,14 @@ td, th { padding-bottom: 10px; } +.large_error_message { + color: #BB4444; + text-align: center; + font-size: 28px; + font-family: Arial, Helvetica, sans-serif; + padding-top: 20px; +} + .app_tile_row_divider_left { width: 50%; float: left; @@ -323,6 +331,34 @@ td, th { background: green; } +.bitcoind_table { + width: 1000px; + margin: auto; + text-align: center; + vertical-align: middle; + font-size: 14px; + font-family: Arial, Helvetica, sans-serif; + border-collapse: collapse; +} +.bitcoind_table_header { + font-size: 16px; + background-color: #FFFFFF; + font-weight: bold; + font-family: Arial, Helvetica, sans-serif; +} + +table.bitcoind_table tbody tr:nth-child(odd) td{ + background-color: #ffa5000d; +} + +table.bitcoind_table tbody tr:nth-child(even) td{ + background-color: #fff; +} + +table.bitcoind_table td { + padding: 10px 0; + margin: 0px; +} .green { background-color: green; } .yellow { background-color: yellow; } diff --git a/rootfs/standard/var/www/mynode/static/css/mynode_bitcoind.css b/rootfs/standard/var/www/mynode/static/css/mynode_bitcoind.css deleted file mode 100644 index ad85231f..00000000 --- a/rootfs/standard/var/www/mynode/static/css/mynode_bitcoind.css +++ /dev/null @@ -1,63 +0,0 @@ -.bitcoind_search { - width: 600px; - margin: auto; - display: table; - padding: 10px; - vertical-align: middle; -} -.bitcoind_search_input { - width: 480px; - font-size: 20px; - vertical-align: middle; -} -.bitcoind_search_button { - width: 100px; - font-size: 16px; - vertical-align: middle; -} -.bitcoind_search_text { - font-size: 12px; - font-style: italic; - color: #888888; -} - -.bitcoind_error_message { - color: #BB4444; - text-align: center; - font-size: 28px; - font-family: Arial, Helvetica, sans-serif; - padding-top: 20px; -} - -.bitcoind_table { - width: 1000px; - margin: auto; - text-align: center; - vertical-align: middle; - font-size: 14px; - font-family: Arial, Helvetica, sans-serif; - border-collapse: collapse; -} -.bitcoind_table_header { - font-size: 16px; - background-color: #FFFFFF; - font-weight: bold; - font-family: Arial, Helvetica, sans-serif; -} - -table.bitcoind_table tbody tr:nth-child(odd) td{ - background-color: #ffa5000d; -} - -table.bitcoind_table tbody tr:nth-child(even) td{ - background-color: #fff; -} - -table.bitcoind_table td { - padding: 10px 0; - margin: 0px; -} -.bitcoind_dump_contents { - margin: auto; - width: 600px; -} diff --git a/rootfs/standard/var/www/mynode/static/css/mynode_bitcoind_dark.css b/rootfs/standard/var/www/mynode/static/css/mynode_bitcoind_dark.css deleted file mode 100644 index 6272e08d..00000000 --- a/rootfs/standard/var/www/mynode/static/css/mynode_bitcoind_dark.css +++ /dev/null @@ -1,19 +0,0 @@ -.bitcoind_search_text { - color: #888888; -} - -.bitcoind_error_message { - color: #BB4444; -} - -.bitcoind_table_header { - border-bottom: 2px solid gray; - background-color: unset; -} - -table.bitcoind_table tbody tr:nth-child(odd) td{ - background-color: #ffffff05; -} -table.bitcoind_table tbody tr:nth-child(even) td{ - background-color: unset; -} diff --git a/rootfs/standard/var/www/mynode/static/css/mynode_dark.css b/rootfs/standard/var/www/mynode/static/css/mynode_dark.css index 7828a496..1a46bffe 100644 --- a/rootfs/standard/var/www/mynode/static/css/mynode_dark.css +++ b/rootfs/standard/var/www/mynode/static/css/mynode_dark.css @@ -70,6 +70,17 @@ table, background-color: #f9c132; } +.bitcoind_table_header { + border-bottom: 2px solid gray; + background-color: unset; +} + +table.bitcoind_table tbody tr:nth-child(odd) td{ + background-color: #ffffff05; +} +table.bitcoind_table tbody tr:nth-child(even) td{ + background-color: unset; +} .settings_block_header { diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_status.html b/rootfs/standard/var/www/mynode/templates/bitcoin.html similarity index 97% rename from rootfs/standard/var/www/mynode/templates/bitcoind_status.html rename to rootfs/standard/var/www/mynode/templates/bitcoin.html index 7277a824..d91f4cdc 100644 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_status.html +++ b/rootfs/standard/var/www/mynode/templates/bitcoin.html @@ -95,15 +95,15 @@ - + - + - +
Configview / editview / edit
CLICLICLI
Whitepaperdownloaddownload
@@ -138,7 +138,7 @@ {% endif %} - download + download {% endfor %} diff --git a/rootfs/standard/var/www/mynode/templates/bitcoin_cli.html b/rootfs/standard/var/www/mynode/templates/bitcoin_cli.html index 2535a897..c462368b 100644 --- a/rootfs/standard/var/www/mynode/templates/bitcoin_cli.html +++ b/rootfs/standard/var/www/mynode/templates/bitcoin_cli.html @@ -26,7 +26,7 @@ $("#cmd").prop("disabled", true); $("#submit_btn").prop("disabled", true); - var posting = $.post( "/bitcoind/cli-run", {cmd: cmd} ); + var posting = $.post( "/bitcoin/cli-run", {cmd: cmd} ); posting.done(function( data ) { console.log("Response:" + data) @@ -49,7 +49,7 @@ {% include 'includes/logo_header.html' %}
- back  + back 
Bitcoin CLI
@@ -57,7 +57,7 @@
-
+
Enter 'help' to see the list of possible commands.
diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_config.html b/rootfs/standard/var/www/mynode/templates/bitcoin_config.html similarity index 85% rename from rootfs/standard/var/www/mynode/templates/bitcoind_config.html rename to rootfs/standard/var/www/mynode/templates/bitcoin_config.html index 67ac70d4..d2f511d4 100644 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_config.html +++ b/rootfs/standard/var/www/mynode/templates/bitcoin_config.html @@ -8,7 +8,7 @@ {% include 'includes/logo_header.html' %} {% include 'includes/message_display.html' %} @@ -27,11 +27,11 @@ {% endif %}
- +

- Reset Config + Reset Config
diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_address.html b/rootfs/standard/var/www/mynode/templates/bitcoind_address.html deleted file mode 100644 index b27f7d6b..00000000 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_address.html +++ /dev/null @@ -1,62 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
- home  - bitcoin  -
-
Bitcoin Explorer
- -
- - -
-
Address
-
-
-
Address
-
{{address}}
-
-
-
-
-
Confirmed Balance
-
{{confirmed_balance}} BTC
-
-
-
Unconfirmed Balance
-
{{unconfirmed_balance}} BTC
-
-
- -
Transactions
- - - - - - - {% for tx in txs %} - - - - - {% endfor %} - -
TX IDBlock
{{ tx.tx_hash }}{% if tx.height %} {{ tx.height }} {% else %} Unconfirmed {% endif %}
- - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_block.html b/rootfs/standard/var/www/mynode/templates/bitcoind_block.html deleted file mode 100644 index 02695470..00000000 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_block.html +++ /dev/null @@ -1,71 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
- home  - bitcoin  -
-
Bitcoin Explorer
- -
- - -
-
Block {{height}}
-
-
-
Hash
-
{{hash}}
-
-
-
-
-
Confirmations
-
{{confirmations}}
-
-
-
Transactions
-
{{num_tx}}
-
-
-
Difficulty
-
{{difficulty}}
-
-
-
Size
-
{{size}} kB
-
-
-
Date
-
{{date}}
-
-
-
Transactions
- - - - - - {% for tx in txs %} - - - - {% endfor %} - -
TX ID
{{ tx }}
- - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_error.html b/rootfs/standard/var/www/mynode/templates/bitcoind_error.html deleted file mode 100644 index 35b76be1..00000000 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_error.html +++ /dev/null @@ -1,30 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
- home  - bitcoin  -
- -
Bitcoin Status
- -
- - -
{{message}}
- - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_explorer.html b/rootfs/standard/var/www/mynode/templates/bitcoind_explorer.html deleted file mode 100644 index d101b71a..00000000 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_explorer.html +++ /dev/null @@ -1,64 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
- home  -
- -
Bitcoin Explorer
- -
- - -
-
-
-
Blocks
-
{{block_num}}
-
-
-
Mempool TX
-
{{mempool_tx}}
-
-
-
Mempool Size
-
{{mempool_size}}
-
-
- -
-
Recent Blocks
- - - - - - - - - {% for block in blocks %} - - - - - - - {% endfor %} - -
HeightAgeTransactionsSize (kB)
{{ block.height }}{{ block.age }}{{ block.nTx }}{{ block.size }}
- - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_status_error.html b/rootfs/standard/var/www/mynode/templates/bitcoind_status_error.html deleted file mode 100644 index 9994ff20..00000000 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_status_error.html +++ /dev/null @@ -1,20 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
- home  - bitcoin  -
- -
Bitcoin Status
- -
{{message}}
- - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/bitcoind_tx.html b/rootfs/standard/var/www/mynode/templates/bitcoind_tx.html deleted file mode 100644 index 259babb0..00000000 --- a/rootfs/standard/var/www/mynode/templates/bitcoind_tx.html +++ /dev/null @@ -1,106 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
- home  - bitcoin  -
- -
Bitcoin Explorer
- -
- - -
-
Transaction
-
-
-
TX ID
-
{{txid}}
-
-
-
-
-
Size
-
{{size}}
-
-
-
Weight
-
{{weight}}
-
-
-
Total
-
{{total}} BTC
-
-
- -
-
-
Confirmations
-
{{confirmations}}
-
- {% if confirmed %} - -
-
Confirm Date
-
{{block_date}}
-
- {% endif %} -
- - -
Inputs
- - - - - - {% for i in inputs %} - - {% if i == "New Coins" %} - - {% else %} - - {% endif %} - - {% endfor %} - -
Address
{{ i }}{{ i }}
- -
-
Outputs
- - - - - - - {% for o in outputs %} - - - - - {% endfor %} - -
AddressAmount
{{ o.address }}{{ o.amount }} BTC
- - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/caravan.html b/rootfs/standard/var/www/mynode/templates/caravan.html index 6e9379df..3fee0d84 100644 --- a/rootfs/standard/var/www/mynode/templates/caravan.html +++ b/rootfs/standard/var/www/mynode/templates/caravan.html @@ -52,7 +52,7 @@
  • You may need to visit the URL in your browser and accept the HTTPS certificate
  • Change the Username to "mynode"
  • -
  • Change the Password to the RPC Password from the Bitcoin page
  • +
  • Change the Password to the RPC Password from the Bitcoin page
  • Click "Test Connection"
  • You should see a success message!
  • diff --git a/rootfs/standard/var/www/mynode/templates/error.html b/rootfs/standard/var/www/mynode/templates/error.html index 875e5ef9..0333e470 100644 --- a/rootfs/standard/var/www/mynode/templates/error.html +++ b/rootfs/standard/var/www/mynode/templates/error.html @@ -8,11 +8,21 @@ {% include 'includes/logo_header.html' %}
    home  + {% if show_bitcoin_back_button is defined and show_bitcoin_back_button is not none %} + bitcoin  + {% endif %} + {% if show_lightning_back_button is defined and show_lightning_back_button is not none %} + lightning  + {% endif %}
    + {% if header is defined and header is not none %} +
    {{header}}
    + {% else %}
    myNode Error
    + {% endif %} -
    {{message}}
    +
    {{message}}
    {% include 'includes/footer.html' %} diff --git a/rootfs/standard/var/www/mynode/templates/includes/head.html b/rootfs/standard/var/www/mynode/templates/includes/head.html index 009bea3d..b72a839e 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/head.html +++ b/rootfs/standard/var/www/mynode/templates/includes/head.html @@ -1,10 +1,8 @@ - {% if ui_settings['darkmode'] %} - {% endif %} diff --git a/rootfs/standard/var/www/mynode/templates/includes/services.html b/rootfs/standard/var/www/mynode/templates/includes/services.html index 6a033416..f8643aa6 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/services.html +++ b/rootfs/standard/var/www/mynode/templates/includes/services.html @@ -10,7 +10,7 @@
    Testnet
    {% endif %}
    - Manage + Manage
    diff --git a/rootfs/standard/var/www/mynode/templates/lnd_error.html b/rootfs/standard/var/www/mynode/templates/lnd_error.html deleted file mode 100644 index 0fe81980..00000000 --- a/rootfs/standard/var/www/mynode/templates/lnd_error.html +++ /dev/null @@ -1,18 +0,0 @@ - - - {{ title }} - {% include 'includes/head.html' %} - - - - {% include 'includes/logo_header.html' %} -
    - home  - ln status  -
    - -
    {{message}}
    - - {% include 'includes/footer.html' %} - - \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/templates/settings.html b/rootfs/standard/var/www/mynode/templates/settings.html index 75d5c407..934050d2 100644 --- a/rootfs/standard/var/www/mynode/templates/settings.html +++ b/rootfs/standard/var/www/mynode/templates/settings.html @@ -660,7 +660,7 @@ You are currently using a custom Bitcoin config.

    {% endif %} - Edit Config + Edit Config