From 48e08ce724e172fa047e874e69b215dcee0eef66 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Sat, 23 Oct 2021 20:15:16 -0500 Subject: [PATCH] Add homepage tile for BoS --- .../usr/share/mynode/application_info.json | 2 +- rootfs/standard/var/www/mynode/bos.py | 23 ++++++++ rootfs/standard/var/www/mynode/mynode.py | 2 + .../var/www/mynode/templates/bos.html | 56 +++++++++++++++++++ .../var/www/mynode/templates/pyblock.html | 2 + 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 rootfs/standard/var/www/mynode/bos.py create mode 100644 rootfs/standard/var/www/mynode/templates/bos.html diff --git a/rootfs/standard/usr/share/mynode/application_info.json b/rootfs/standard/usr/share/mynode/application_info.json index 387501cb..1f3420e6 100644 --- a/rootfs/standard/usr/share/mynode/application_info.json +++ b/rootfs/standard/usr/share/mynode/application_info.json @@ -247,7 +247,7 @@ "can_uninstall": true, "can_enable_disable": false, "show_on_homepage": true, - "homepage_order": 42 + "homepage_order": 43 }, { "name": "Web SSH", diff --git a/rootfs/standard/var/www/mynode/bos.py b/rootfs/standard/var/www/mynode/bos.py new file mode 100644 index 00000000..faeadef9 --- /dev/null +++ b/rootfs/standard/var/www/mynode/bos.py @@ -0,0 +1,23 @@ +from flask import Blueprint, render_template, redirect, request, flash, send_from_directory +from user_management import check_logged_in +from device_info import read_ui_settings +from systemctl_info import * +import os +import time +import subprocess +import os + +mynode_bos = Blueprint('mynode_bos',__name__) + +### Page functions +@mynode_bos.route("/bos") +def bos_page(): + check_logged_in() + + # Load page + templateData = { + "title": "myNode Balance of Satoshis", + "ui_settings": read_ui_settings(), + } + return render_template('bos.html', **templateData) + diff --git a/rootfs/standard/var/www/mynode/mynode.py b/rootfs/standard/var/www/mynode/mynode.py index c2850b71..43ef4e81 100644 --- a/rootfs/standard/var/www/mynode/mynode.py +++ b/rootfs/standard/var/www/mynode/mynode.py @@ -10,6 +10,7 @@ from joininbox import mynode_joininbox from caravan import mynode_caravan from sphinxrelay import mynode_sphinxrelay from pyblock import mynode_pyblock +from bos import mynode_bos from manage_apps import mynode_manage_apps from tor import mynode_tor from vpn import mynode_vpn @@ -86,6 +87,7 @@ app.register_blueprint(mynode_joininbox) app.register_blueprint(mynode_caravan) app.register_blueprint(mynode_sphinxrelay) app.register_blueprint(mynode_pyblock) +app.register_blueprint(mynode_bos) app.register_blueprint(mynode_manage_apps) app.register_blueprint(mynode_tor) app.register_blueprint(mynode_electrum_server) diff --git a/rootfs/standard/var/www/mynode/templates/bos.html b/rootfs/standard/var/www/mynode/templates/bos.html new file mode 100644 index 00000000..e62bdd49 --- /dev/null +++ b/rootfs/standard/var/www/mynode/templates/bos.html @@ -0,0 +1,56 @@ + + + {{ title }} + {% include 'includes/head.html' %} + + + {% include 'includes/logo_header.html' %} +
+ home  +
+ + {% include 'includes/message_display.html' %} + +
Balance of Satoshis
+
+ +
+
+
Status
+
Ready
+
+
+ + +
+
Instructions to run Balance of Satoshis
+
    +
  1. Balance of Satoshis (bos) is a tool for viewing and interacting with lnd.
  2. +
  3. To get started, you need access to the Linux terminal of your myNode device.
  4. +
      +
    • A guide to access the Linux terminal is available here - guide
    • +
    +
  5. Once you have terminal access, run commands starting with 'bos'. For example:
  6. +
      +
    • bos peers
    • +
    • bos balance
    • +
    • bos utxos
    • +
    • bos report
    • +
    • bos help
    • +
    +
  7. Enjoy Balance of Satoshis!
  8. +
+ +

+ + +
+ + {% include 'includes/footer.html' %} + + diff --git a/rootfs/standard/var/www/mynode/templates/pyblock.html b/rootfs/standard/var/www/mynode/templates/pyblock.html index 59ce7e37..d6e21112 100644 --- a/rootfs/standard/var/www/mynode/templates/pyblock.html +++ b/rootfs/standard/var/www/mynode/templates/pyblock.html @@ -51,5 +51,7 @@ --> + + {% include 'includes/footer.html' %}