mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Cleanup dojo merge
This commit is contained in:
parent
e4f7395e83
commit
440eb1f9b2
|
@ -25,8 +25,8 @@ rpcallowip=10.0.0.0/8
|
|||
rpcallowip=172.0.0.0/8
|
||||
rpcallowip=192.0.0.0/8
|
||||
|
||||
zmqpubrawblock=tcp://127.0.0.1:28332
|
||||
zmqpubrawtx=tcp://127.0.0.1:28333
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
zmqpubhashblock=tcp://0.0.0.0:28334
|
||||
|
||||
# myNode Optimizations
|
||||
|
|
|
@ -25,8 +25,8 @@ rpcallowip=10.0.0.0/8
|
|||
rpcallowip=172.0.0.0/8
|
||||
rpcallowip=192.0.0.0/8
|
||||
|
||||
zmqpubrawblock=tcp://127.0.0.1:28332
|
||||
zmqpubrawtx=tcp://127.0.0.1:28333
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
zmqpubhashblock=tcp://0.0.0.0:28334
|
||||
|
||||
# myNode Optimizations
|
||||
|
|
|
@ -25,8 +25,8 @@ rpcallowip=10.0.0.0/8
|
|||
rpcallowip=172.0.0.0/8
|
||||
rpcallowip=192.0.0.0/8
|
||||
|
||||
zmqpubrawblock=tcp://127.0.0.1:28332
|
||||
zmqpubrawtx=tcp://127.0.0.1:28333
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
zmqpubhashblock=tcp://0.0.0.0:28334
|
||||
|
||||
# myNode Optimizations
|
||||
|
|
|
@ -25,8 +25,8 @@ rpcallowip=10.0.0.0/8
|
|||
rpcallowip=172.0.0.0/8
|
||||
rpcallowip=192.0.0.0/8
|
||||
|
||||
zmqpubrawblock=tcp://127.0.0.1:28332
|
||||
zmqpubrawtx=tcp://127.0.0.1:28333
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
zmqpubhashblock=tcp://0.0.0.0:28334
|
||||
|
||||
# myNode Optimizations
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
Dpkg::Options {
|
||||
"--force-confdef";
|
||||
"--force-confold";
|
||||
}
|
||||
}
|
||||
|
||||
Acquire::ForceIPv4 "true";
|
|
@ -20,8 +20,6 @@ rpcauth=mynode:7b7e11c032ddd3fc3835e4e463afd305$6c6a32bbd08cb1b67b5ea89b66865c5c
|
|||
|
||||
rpcport=8332
|
||||
rpcbind=0.0.0.0
|
||||
rpcbind=172.17.0.1
|
||||
rpcbind=172.28.0.1
|
||||
rpcallowip=127.0.0.1
|
||||
rpcallowip=10.0.0.0/8
|
||||
rpcallowip=172.0.0.0/8
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
from flask import Blueprint, render_template, session, abort, Markup, request, redirect
|
||||
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
|
||||
from pprint import pprint, pformat
|
||||
from settings import read_ui_settings
|
||||
from user_management import check_logged_in
|
||||
import json
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
mynode_bitcoin_cli = Blueprint('mynode_bitcoin_cli',__name__)
|
||||
|
||||
### Helper functions
|
||||
def runcmd(cmd):
|
||||
cmd = "bitcoin-cli --conf=/home/admin/.bitcoin/bitcoin.conf --datadir=/mnt/hdd/mynode/bitcoin "+cmd+"; exit 0"
|
||||
try:
|
||||
results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
except Exception as e:
|
||||
results = str(e)
|
||||
return results
|
||||
|
||||
@mynode_bitcoin_cli.route("/bitcoin-cli/run", methods=['POST'])
|
||||
def runcmd_page():
|
||||
check_logged_in()
|
||||
|
||||
if not request:
|
||||
return ""
|
||||
response = runcmd(request.form['cmd'])
|
||||
return response
|
||||
|
||||
|
||||
### Page functions
|
||||
@mynode_bitcoin_cli.route("/bitcoin-cli")
|
||||
def bitcoincli():
|
||||
check_logged_in()
|
||||
|
||||
# Load page
|
||||
templateData = {
|
||||
"title": "myNode Bitcoin CLI",
|
||||
"ui_settings": read_ui_settings()
|
||||
}
|
||||
return render_template('bitcoin_cli.html', **templateData)
|
|
@ -98,6 +98,15 @@ def search(search_term):
|
|||
return results
|
||||
|
||||
|
||||
def runcmd(cmd):
|
||||
cmd = "bitcoin-cli --conf=/home/admin/.bitcoin/bitcoin.conf --datadir=/mnt/hdd/mynode/bitcoin "+cmd+"; exit 0"
|
||||
try:
|
||||
results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
except Exception as e:
|
||||
results = str(e)
|
||||
return results
|
||||
|
||||
|
||||
### Page functions
|
||||
@mynode_bitcoind.route("/bitcoind")
|
||||
def bitcoind_status_page():
|
||||
|
@ -493,3 +502,24 @@ def address_page(addr):
|
|||
"ui_settings": read_ui_settings()
|
||||
}
|
||||
return render_template('bitcoind_error.html', **templateData)
|
||||
|
||||
|
||||
@mynode_bitcoind.route("/bitcoind/cli")
|
||||
def bitcoincli():
|
||||
check_logged_in()
|
||||
|
||||
# Load page
|
||||
templateData = {
|
||||
"title": "myNode Bitcoin CLI",
|
||||
"ui_settings": read_ui_settings()
|
||||
}
|
||||
return render_template('bitcoin_cli.html', **templateData)
|
||||
|
||||
@mynode_bitcoind.route("/bitcoind/cli-run", methods=['POST'])
|
||||
def runcmd_page():
|
||||
check_logged_in()
|
||||
|
||||
if not request:
|
||||
return ""
|
||||
response = runcmd(request.form['cmd'])
|
||||
return response
|
||||
|
|
|
@ -3,7 +3,6 @@ from config import *
|
|||
from flask import Flask, render_template, Markup, send_from_directory, redirect, request, url_for
|
||||
from user_management import *
|
||||
from bitcoind import mynode_bitcoind
|
||||
from bitcoin_cli import mynode_bitcoin_cli
|
||||
from whirlpool import mynode_whirlpool, get_whirlpool_status
|
||||
from dojo import mynode_dojo, get_dojo_status
|
||||
from tor import mynode_tor
|
||||
|
@ -42,7 +41,6 @@ app.config['MAX_CONTENT_LENGTH'] = 32 * 1024 * 1024 # 32 MB upload file max
|
|||
app.config['UPLOAD_FOLDER'] = "/tmp/flask_uploads"
|
||||
app.register_blueprint(mynode_bitcoind)
|
||||
app.register_blueprint(mynode_lnd)
|
||||
app.register_blueprint(mynode_bitcoin_cli)
|
||||
app.register_blueprint(mynode_whirlpool)
|
||||
app.register_blueprint(mynode_dojo)
|
||||
app.register_blueprint(mynode_tor)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
console.log("URL : "+url)
|
||||
console.log("Command: "+cmd)
|
||||
|
||||
var posting = $.post( "/bitcoin-cli/run", {cmd: cmd} );
|
||||
var posting = $.post( "/bitcoind/cli-run", {cmd: cmd} );
|
||||
posting.done(function( data ) {
|
||||
console.log("Response:" + data)
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
<body>
|
||||
{% include 'includes/logo_header.html' %}
|
||||
<div class="mynode_back_div">
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_back" href="/"><span class="ui-icon ui-icon-home"></span>home </a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_back" href="/bitcoind"><span class="ui-icon ui-icon-arrowthick-1-w"></span>back </a>
|
||||
</div>
|
||||
|
||||
<div class="main_header">Bitcoin CLI</div>
|
||||
|
@ -44,7 +44,7 @@
|
|||
<div class="cli_contents" id="cli_scrollable"><pre id="cli_contents"></pre></div>
|
||||
|
||||
<div class="cli_command">
|
||||
<form id="cmd_form" action="/bitcoin-cli/run">
|
||||
<form id="cmd_form" action="/bitcoind/cli-run">
|
||||
<input class="ui-corner-all cli_command_input" id="cmd" name="cmd" type="text">
|
||||
<input type="submit" class="ui-button ui-widget ui-corner-all cli_enter_button" value="Enter">
|
||||
<div class="small_message">Enter 'help' to see the list of possible commands.</div>
|
||||
|
|
|
@ -78,6 +78,12 @@
|
|||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 70%;" href="/bitcoind/config">view / edit</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">CLI</div>
|
||||
<div class="info_tile_contents">
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 70%;" href="/bitcoind/cli">CLI</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if confirmed_balance > 0.0 %}
|
||||
|
|
|
@ -12,23 +12,23 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="app_tile">
|
||||
<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_title">BTCPay Server</div>
|
||||
<div class="app_status">{{ btcpayserver_status }}</div>
|
||||
<div class="app_contents">
|
||||
{% if product_key_skipped %}
|
||||
Premium Feature
|
||||
{% else %}
|
||||
{% if lnd_ready %}
|
||||
<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_title">BTCPay Server</div>
|
||||
<div class="app_status">{{ btcpayserver_status }}</div>
|
||||
<div class="app_contents">
|
||||
{% if product_key_skipped %}
|
||||
Premium Feature
|
||||
{% else %}
|
||||
{% if lnd_ready %}
|
||||
{% if btcpayserver_enabled %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="btcpayserver">BTCPay Server</a>
|
||||
{% endif %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/toggle-btcpayserver" id="toggle-btcpayserver">{% if btcpayserver_enabled %}Disable{% else %}Enable{% endif %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="app_tile">
|
||||
<div class="app_status_icon {{ lndhub_status_color }}"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/lndhub.png")}}"/></div>
|
||||
|
@ -36,28 +36,11 @@
|
|||
<div class="app_status">{% if not lnd_ready %}Waiting on LND...{% endif %}</div>
|
||||
<div class="app_contents">
|
||||
{% if lnd_ready %}
|
||||
{% if lndhub_enabled %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="lndhub">LND Hub</a>
|
||||
{% endif %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/toggle-lndhub" id="toggle-lndhub">{% if lndhub_enabled %}Disable{% else %}Enable{% endif %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="app_tile">
|
||||
<div class="app_status_icon {{ btcrpcexplorer_status_color }}"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/btc_rpc_explorer.png")}}"/></div>
|
||||
<div class="app_title">Explorer</div>
|
||||
<div class="app_status">{{ btcrpcexplorer_status }}</div>
|
||||
<div class="app_contents">
|
||||
{% if btcrpcexplorer_enabled %}
|
||||
{% if btcrpcexplorer_ready %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="btcrpcexplorer">Explorer</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-btcrpcexplorer">Disable</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-btcrpcexplorer">Enable</a>
|
||||
{% if lndhub_enabled %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="lndhub">LND Hub</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/toggle-lndhub" id="toggle-lndhub">{% if lndhub_enabled %}Disable{% else %}Enable{% endif %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="app_tile">
|
||||
|
@ -74,19 +57,22 @@
|
|||
</div>
|
||||
|
||||
<div class="app_tile_row">
|
||||
<!--
|
||||
<div class="app_tile">
|
||||
<div class="app_status_icon {{ bitcoind_status_color }}"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/bitcoin.png")}}"/></div>
|
||||
<div class="app_status_icon {{ btcrpcexplorer_status_color }}"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/btc_rpc_explorer.png")}}"/></div>
|
||||
<div class="app_title">Explorer</div>
|
||||
<div class="app_status">{{ explorer_status }}</div>
|
||||
<div class="app_status">{{ btcrpcexplorer_status }}</div>
|
||||
<div class="app_contents">
|
||||
{% if explorer_ready %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/explorer">Explorer</a>
|
||||
{% if btcrpcexplorer_enabled %}
|
||||
{% if btcrpcexplorer_ready %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="btcrpcexplorer">Explorer</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-btcrpcexplorer">Disable</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-btcrpcexplorer">Enable</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="app_tile">
|
||||
<div class="app_status_icon {{ dojo_status_color }}"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/samourai.png")}}"/></div>
|
||||
|
@ -137,11 +123,4 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="app_tile">
|
||||
<div class="app_status_icon"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/cli.png")}}"/></div>
|
||||
<div class="app_title">BTC CLI</div>
|
||||
<div class="app_status"></div>
|
||||
<div class="app_contents"><a class="ui-button ui-widget ui-corner-all mynode_button" href="/bitcoin-cli">CLI</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user