feat: Cleanup any references to Niami
All checks were successful
Build Docker / Build Image (push) Successful in 2m38s
All checks were successful
Build Docker / Build Image (push) Successful in 2m38s
Niami has closed down so links to it no longer work
This commit is contained in:
Binary file not shown.
16
render.py
16
render.py
@@ -210,34 +210,35 @@ def dns(data, edit=False):
|
|||||||
html_output = ""
|
html_output = ""
|
||||||
index = 0
|
index = 0
|
||||||
for entry in data:
|
for entry in data:
|
||||||
|
print(entry, flush=True)
|
||||||
html_output += f"<tr><td>{entry['type']}</td>\n"
|
html_output += f"<tr><td>{entry['type']}</td>\n"
|
||||||
|
|
||||||
if entry['type'] != 'DS' and not entry['type'].startswith("GLUE") and not entry['type'].startswith("SYNTH"):
|
if entry['type'] != 'DS' and not entry['type'].startswith("GLUE") and not entry['type'].startswith("SYNTH"):
|
||||||
for key, value in entry.items():
|
for key, value in entry.items():
|
||||||
if key != 'type':
|
if key != 'type':
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
html_output += "<td>\n"
|
if len(value) > 1:
|
||||||
|
html_output += '<td style="white-space: pre-wrap; font-family: monospace;">\n'
|
||||||
for val in value:
|
for val in value:
|
||||||
html_output += f"{val}<br>\n"
|
html_output += f"{val}<br>\n"
|
||||||
|
|
||||||
html_output += "</td>\n"
|
html_output += "</td>\n"
|
||||||
else:
|
else:
|
||||||
html_output += f"<td>{value}</td>\n"
|
html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{value[0]}</td>\n'
|
||||||
|
else:
|
||||||
|
html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{value}</td>\n'
|
||||||
|
|
||||||
elif entry['type'] == 'DS':
|
elif entry['type'] == 'DS':
|
||||||
ds = f"{entry['keyTag']} {entry['algorithm']} {entry['digestType']} {entry['digest']}"
|
ds = f"{entry['keyTag']} {entry['algorithm']} {entry['digestType']} {entry['digest']}"
|
||||||
html_output += f"<td>{ds}</td>\n"
|
html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{ds}</td>\n'
|
||||||
|
|
||||||
else:
|
else:
|
||||||
value = ""
|
value = ""
|
||||||
for key, val in entry.items():
|
for key, val in entry.items():
|
||||||
if key != 'type':
|
if key != 'type':
|
||||||
value += f'{val} '
|
value += f'{val} '
|
||||||
html_output += f"<td>{value}</td>\n"
|
html_output += f'<td style="white-space: pre-wrap; font-family: monospace;">{value.strip()}</td>\n'
|
||||||
|
|
||||||
if edit:
|
if edit:
|
||||||
# Remove the current entry from the list
|
|
||||||
keptRecords = str(data[:index] + data[index+1:]).replace("'", '"')
|
keptRecords = str(data[:index] + data[index+1:]).replace("'", '"')
|
||||||
keptRecords = urllib.parse.quote(keptRecords)
|
keptRecords = urllib.parse.quote(keptRecords)
|
||||||
html_output += f"<td><a href='edit?dns={keptRecords}'>Remove</a></td>\n"
|
html_output += f"<td><a href='edit?dns={keptRecords}'>Remove</a></td>\n"
|
||||||
@@ -246,6 +247,7 @@ def dns(data, edit=False):
|
|||||||
index += 1
|
index += 1
|
||||||
return html_output
|
return html_output
|
||||||
|
|
||||||
|
|
||||||
def txs(data):
|
def txs(data):
|
||||||
data = data[::-1]
|
data = data[::-1]
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<span style="display: block;font-size: 12px;">TX: {{tx}}</span>
|
<span style="display: block;font-size: 12px;">TX: {{tx}}</span>
|
||||||
<span style="display: block;">Check your transaction on a block explorer</span>
|
<span style="display: block;">Check your transaction on a block explorer</span>
|
||||||
<a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a>
|
|
||||||
<a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a>
|
|
||||||
<a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>
|
<a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>
|
||||||
|
<a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a>
|
||||||
|
|||||||
@@ -87,27 +87,6 @@
|
|||||||
{{dns | safe}}
|
{{dns | safe}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container-fluid" style="margin-top: 50px;">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">History</h4><div class="table-responsive">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Action</th>
|
|
||||||
<th>TX</th>
|
|
||||||
<th>Amount</th>
|
|
||||||
<th>Time</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{{txs | safe}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;">
|
<div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title">Your transaction has been sent and will be mined soon.</h4><span style="display: block;font-size: 12px;">TX: {{tx}}</span><span style="display: block;">Check your transaction on a block explorer</span><a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a><a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a><a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>
|
<h4 class="card-title">Your transaction has been sent and will be mined soon.</h4><span style="display: block;font-size: 12px;">TX: {{tx}}</span><span style="display: block;">Check your transaction on a block explorer</span><a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a><a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user