mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-14 01:19:16 +00:00
Add option to see BTC RPC password in GUI
This commit is contained in:
parent
cca84c780b
commit
912d29ae2d
|
@ -110,6 +110,7 @@ def bitcoind_status_page():
|
|||
peerdata = get_bitcoin_peers()
|
||||
mempooldata = get_bitcoin_mempool()
|
||||
version = get_bitcoin_version()
|
||||
rpc_password = get_bitcoin_rpc_password()
|
||||
|
||||
# Mempool info
|
||||
mempool = {}
|
||||
|
@ -172,6 +173,7 @@ def bitcoind_status_page():
|
|||
"difficulty": "{:.3g}".format(info["difficulty"]),
|
||||
"block_num": info["blocks"],
|
||||
"header_num": info["headers"],
|
||||
"rpc_password": rpc_password,
|
||||
"disk_size": (int(info["size_on_disk"]) / 1000 / 1000 / 1000),
|
||||
"mempool_tx": mempool["size"],
|
||||
"mempool_size": "{:.3} MB".format(float(mempool["bytes"]) / 1000 / 1000),
|
||||
|
|
|
@ -2,6 +2,18 @@
|
|||
<head>
|
||||
<title>{{ title }}</title>
|
||||
{% include 'includes/head.html' %}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#show_rpc_password").on("click", function() {
|
||||
$("#show_rpc_password").hide(0);
|
||||
$("#rpc_password").show();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -45,6 +57,13 @@
|
|||
<div class="info_tile_header">Mempool Size</div>
|
||||
<div class="info_tile_contents">{{mempool_size}}</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">RPC Password</div>
|
||||
<div class="info_tile_contents">
|
||||
<span id="rpc_password" style="display: none;">{{rpc_password}}</span>
|
||||
<a id="show_rpc_password" class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 70%;">show</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Bitcoin Config</div>
|
||||
<div class="info_tile_contents">
|
||||
|
|
Loading…
Reference in New Issue
Block a user