Add lntop v0.4.0

This commit is contained in:
Taylor Helsper 2022-12-30 13:52:21 -06:00
parent 0f39c43a53
commit e147c37c53
9 changed files with 190 additions and 0 deletions

View File

@ -0,0 +1,64 @@
{
"name": "lntop",
"short_name": "lntop",
"author": {
"name": "edouardparis",
"link": "https://github.com/edouardparis"
},
"website": {
"name": "GitHub",
"link": "https://github.com/edouardparis/lntop"
},
"category": "lightning_app",
"short_description": "Lightning Utility",
"description": [
"lntop is an interactive text-mode channels viewer for Unix systems."
],
"latest_version": "v0.4.0",
"linux_user": "root",
"supported_archs": null,
"download_skip": true,
"download_type": "source",
"download_source_url": "download_url",
"download_binary_url": {
"aarch64": "download_url",
"x86_64": "download_url"
},
"install_env_vars": {},
"supports_app_page": true,
"supports_testnet": false,
"http_port": null,
"https_port": null,
"requires_bitcoin": true,
"requires_docker_image_installation": false,
"requires_electrs": false,
"requires_lightning": true,
"show_on_application_page": true,
"show_on_homepage": true,
"show_on_status_page": true,
"hide_status_icon": true,
"app_tile_name": "lntop",
"app_tile_running_status_text": "Running",
"app_tile_button_text": "Info",
"app_tile_button_href": "/app/lntop/info",
"app_page_show_open_button": false,
"app_page_content": [
{
"heading": "Description",
"content": [
"Command line utility for Lightning.",
"Access the utility by running 'lntop' command on the linux terminal. For more information, visit the project's GitHub page.",
"Enjoy!"
]
}
],
"can_uninstall": true,
"can_reinstall": true,
"can_enable_disable": false,
"is_beta": false,
"is_premium": false,
"homepage_section": "apps",
"homepage_order": 91,
"app_type": "custom",
"sdk_version": 2
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,19 @@
#!/bin/bash
source /usr/share/mynode/mynode_device_info.sh
source /usr/share/mynode/mynode_app_versions.sh
set -x
set -e
echo "==================== INSTALLING APP ===================="
# The current directory is the app install folder and the app tarball from GitHub
# has already been downloaded and extracted. Any additional env variables specified
# in the JSON file are also present.
source /etc/profile.d/go.sh
go install github.com/edouardparis/lntop@$VERSION
echo "================== DONE INSTALLING APP ================="

View File

@ -0,0 +1,3 @@
#!/bin/bash
# This will run after launching the application

View File

@ -0,0 +1,3 @@
#!/bin/bash
# This will run prior to launching the application

View File

@ -0,0 +1,12 @@
#!/bin/bash
source /usr/share/mynode/mynode_device_info.sh
source /usr/share/mynode/mynode_app_versions.sh
echo "==================== UNINSTALLING APP ===================="
# The app folder will be removed automatically after this script runs. You may not need to do anything here.
rm -f /usr/local/go/bin/lntop
echo "================== DONE UNINSTALLING APP ================="

View File

@ -0,0 +1,32 @@
from flask import Blueprint, render_template, redirect
from user_management import check_logged_in
from enable_disable_functions import *
from device_info import *
from application_info import *
from systemctl_info import *
import subprocess
import os
mynode_lntop = Blueprint('mynode_lntop',__name__)
### Page functions (have prefix /app/<app name/)
@mynode_lntop.route("/info")
def lntop_page():
check_logged_in()
app = get_application("lntop")
app_status = get_application_status("lntop")
app_status_color = get_application_status_color("lntop")
# Load page
templateData = {
"title": "myNode - " + app["name"],
"ui_settings": read_ui_settings(),
"app_status": app_status,
"app_status_color": app_status_color,
"app": app
}
return render_template('/app/generic_app.html', **templateData)

View File

@ -0,0 +1,3 @@
Custom Jinja templates (HTML files) can be added here for unique application pages
Templates will be available under applications/<short_name>/xyz.html

View File

@ -0,0 +1,54 @@
<!DOCTYPE html lang="en">
<head>
<title>{{ title }}</title>
{% include 'includes/head.html' %}
</head>
<body>
{% include 'includes/logo_header.html' %}
<div class="mynode_top_left_div">
<a href="/"><img class="mynode_nav_icon" src="{{ url_for('static', filename="images/home.png")}}"/></a>
</div>
<div class="main_header">{{app.name}} (custom page - remove)</div>
<br/>
<div class="app_tile_row">
<div class="info_tile">
<div class="info_tile_header">Status</div>
<div class="info_tile_contents">
<table class="info_table">
<tr>
<th>Status</th>
<td>{{app_status}}</td>
</tr>
<tr>
<th>Actions</th>
<td>
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Open</a>
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Button A</a>
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Button B</a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="instructions">
<div class="instructions-header">Instructions</div>
<ol class="instructions-steps">
<li>Custom instructions?</li>
</ol>
</div>
<div id="confirm-dialog"></div>
<div id="loading_spinner_overlay" class="loading_spinner_overlay" style="display:none;">
<img id="loading_spinner" class="loading_image" src="{{ url_for('static', filename="images/loading.gif")}}"/>
<br/>
<span id="loading_spinner_message">Loading...</span>
</div>
</body>
</html>