mirror of
https://github.com/cryptosharks131/lndg.git
synced 2026-08-15 12:50:30 +02:00
221 lines
13 KiB
HTML
221 lines
13 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %} {{ block.super }} - Advanced{% endblock %}
|
|
{% block content %}
|
|
{% load humanize %}
|
|
{% if channels %}
|
|
<div class="w3-container w3-padding-small">
|
|
<h2>Advanced Channel Settings</h2>
|
|
<div class="w3-container w3-padding-small" style="overflow:auto;max-height:1000px">
|
|
<table id="advancedTable" class="w3-table-all w3-centered w3-hoverable">
|
|
<tr>
|
|
<th colspan="6"></th>
|
|
<td title="Update all channel outgoing fee rates">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="100000" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-oRate">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel outgoing base fees">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="100000" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-oBase">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel CLTVs">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="18" max="1000" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-CLTV">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel min HTLCs">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center;width:100px" id="value" type="number" step="0.001" min="1" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-minHTLC">
|
|
</form>
|
|
</td>
|
|
<th colspan="3"></th>
|
|
<td title="Update all channel AR amount amounts">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="100000000" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-Amts">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel AR max cost %s">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="100" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-MaxCost">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel AR outbound liquidity amount %s">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="100" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-oTarget">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel AR inbound liquidity amount %s">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="100" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-iTarget">
|
|
</form>
|
|
</td>
|
|
<td title="Update all channel AR enable/disable targeting">
|
|
<form action="/update_setting/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="value" type="number" min="0" max="1" name="value" value="">
|
|
<input type="hidden" name="key" value="ALL-AR">
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th onclick="sortTable(event.target, 0, 'String', 1, 'a')">Channel ID</th>
|
|
<th onclick="sortTable(event.target, 1, 'String', 1, 'a')">Peer Alias</th>
|
|
<th onclick="sortTable(event.target, 2, 'int', 1, 'small')">Outbound Liquidity</th>
|
|
<th onclick="sortTable(event.target, 3, 'int', 1, 'label')">Capacity</th>
|
|
<th onclick="sortTable(event.target, 4, 'int', 1, 'small')">Inbound Liquidity</th>
|
|
<th>Channel State</th>
|
|
<th>oRate</th>
|
|
<th>oBase</th>
|
|
<th>oCLTV</th>
|
|
<th>minHTLC</th>
|
|
<th>maxHTLC</th>
|
|
<th onclick="sortTable(event.target, 11, 'int', 1)">iRate</th>
|
|
<th onclick="sortTable(event.target, 12, 'int', 1)">iBase</th>
|
|
<th title="When AR is ENABLED for the channel, the size of the rebalance attempts that should be tried during attempts to refill the channel.">Target Amt</th>
|
|
<th title="When AR is ENABLED, the maximum percentage amount of the local fee rate that can be used for the max rebalancing cost.">Max Cost %</th>
|
|
<th title="When AR is NOT ENABLED for the channel, keep pushing OUT the channel until its outbound liquidity falls below the oTarget%.">oTarget%</th>
|
|
<th title="When AR is ENABLED for the channel, keep pulling IN to the channel until its inbound liquidity falls below the iTarget%.">iTarget%</th>
|
|
<th title="When AR is ENABLED it will refill the channel with outbound liquidity.">AR</th>
|
|
<th onclick="sortTable(event.target, 18, 'String', 1)">Active</th>
|
|
</tr>
|
|
{% for channel in channels %}
|
|
<tr>
|
|
<td title="{{ channel.funding_txid }}:{{ channel.output_index }}"><a href="/channel?={{ channel.chan_id }}" target="_blank">{{ channel.short_chan_id }}</a></td>
|
|
<td title="{{ channel.remote_pubkey }}">{% if channel.private == False %}<a href="{{ graph_links }}/{{ network }}node/{{ channel.remote_pubkey }}" target="_blank">{% endif %}{% if channel.alias == '' %}{{ channel.remote_pubkey|slice:":12" }}{% else %}{{ channel.alias }}{% endif %}{% if channel.private == False %}</a>{% endif %}</td>
|
|
<td>{{ channel.local_balance|intcomma }} <small class="w3-round w3-border-small w3-border-grey">{{ channel.out_percent }}%</small></td>
|
|
<td>
|
|
<label>{{channel.capacity|intcomma}}</label>
|
|
<div class="progress w3-round w3-grey">
|
|
<span class="value w3-round w3-blue" style="width:{{channel.out_percent|default:"0"}}%"></span>
|
|
</div>
|
|
</td>
|
|
<td>{{ channel.remote_balance|intcomma }} <small class="w3-round w3-border-small w3-border-grey">{{ channel.in_percent }}%</small></td>
|
|
<td {% if channel.local_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% elif channel.private == True %}style="background-color: rgba(110,118,129,0.4)"{% endif %}>
|
|
{% if channel.is_active == True and channel.private == False %}
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input type="submit" value="{% if channel.local_disabled == False %}Disable{% else %}Enable{% endif %}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="7">
|
|
<input type="hidden" name="target" value="{% if channel.local_disabled == False %}0{% else %}1{% endif %}">
|
|
</form>
|
|
{% else %}
|
|
---
|
|
{% endif %}
|
|
</td>
|
|
<td {% if channel.local_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% elif channel.private == True %}style="background-color: rgba(110,118,129,0.4)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="0" max="100000" name="target" value="{{ channel.local_fee_rate }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="1">
|
|
</form>
|
|
</td>
|
|
<td {% if channel.local_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% elif channel.private == True %}style="background-color: rgba(110,118,129,0.4)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="0" max="100000" name="target" value="{{ channel.local_base_fee }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="0">
|
|
</form>
|
|
</td>
|
|
<td {% if channel.local_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% elif channel.private == True %}style="background-color: rgba(110,118,129,0.4)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="18" max="1000" name="target" value="{{ channel.local_cltv }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="9">
|
|
</form>
|
|
</td>
|
|
<td {% if channel.local_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% elif channel.private == True %}style="background-color: rgba(110,118,129,0.4)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center;width:100px" id="target" type="number" step="0.001" min="1" name="target" value="{{ channel.local_min_htlc }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="10">
|
|
</form>
|
|
</td>
|
|
<td {% if channel.local_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% elif channel.private == True %}style="background-color: rgba(110,118,129,0.4)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center;width:150px" id="target" type="number" step="0.001" min="1" name="target" value="{{ channel.local_max_htlc }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="11">
|
|
</form>
|
|
</td>
|
|
<td title="Fee Ratio: {{ channel.fee_ratio }}%" {% if channel.remote_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% endif %}>{{ channel.remote_fee_rate|intcomma }}</td>
|
|
<td {% if channel.remote_disabled == True %}style="background-color: rgba(248,81,73,0.15);"{% endif %}>{{ channel.remote_base_fee|intcomma }}</td>
|
|
<td>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="1" max="100000000" name="target" value="{{ channel.ar_amt_target }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="2">
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="1" max="100" name="target" value="{{ channel.ar_max_cost }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="6">
|
|
</form>
|
|
</td>
|
|
<td {% if channel.auto_rebalance == False %}style="background-color: rgba(46,160,67,0.15)"{% else %}style="background-color: rgba(248,81,73,0.15)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="1" max="100" name="target" value="{{ channel.ar_out_target }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="4">
|
|
</form>
|
|
</td>
|
|
<td {% if channel.auto_rebalance == True %}style="background-color: rgba(46,160,67,0.15)"{% else %}style="background-color: rgba(248,81,73,0.15)"{% endif %}>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input style="text-align:center" id="target" type="number" min="1" max="100" name="target" value="{{ channel.ar_in_target }}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="3">
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form action="/update_channel/" method="post">
|
|
{% csrf_token %}
|
|
<input type="submit" value="{% if channel.auto_rebalance == True %}Disable{% else %}Enable{% endif %}">
|
|
<input type="hidden" name="chan_id" value="{{ channel.chan_id }}">
|
|
<input type="hidden" name="update_target" value="5">
|
|
<input type="hidden" name="target" value="0">
|
|
</form>
|
|
</td>
|
|
<td title="{% if channel.is_active == True %}Uptime: {{ channel.last_update|naturaltime|slice:":-4" }}{% else %}Downtime: {{ channel.last_update|naturaltime|slice:":-4" }}{% endif %}">{{ channel.is_active }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if not channels %}
|
|
<div class="w3-container w3-padding-small">
|
|
<center><h1>You dont have any channels to setup yet!</h1></center>
|
|
</div>
|
|
{% endif %}
|
|
{% if local_settings %}
|
|
{% include 'local_settings.html' with settings=local_settings title='Update Local' %}
|
|
{% endif %}
|
|
{% endblock %}
|