add page for network test
This commit is contained in:
@@ -30,3 +30,10 @@ async def logging():
|
|||||||
return await render_template(
|
return await render_template(
|
||||||
'page_logging.html.j2',
|
'page_logging.html.j2',
|
||||||
fetch_url=url_for('.file_fetch'))
|
fetch_url=url_for('.file_fetch'))
|
||||||
|
|
||||||
|
|
||||||
|
@web.route('/network_tests')
|
||||||
|
async def network_tests():
|
||||||
|
return await render_template(
|
||||||
|
'page_network_tests.html.j2',
|
||||||
|
fetch_url=url_for('.file_fetch'))
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
<a href="{{ url_for('.mqtt')}}" class="w3-bar-item w3-button w3-padding {% block menu2_class %}{% endblock %}"><i class="fa fa-database fa-fw"></i> MQTT</a>
|
<a href="{{ url_for('.mqtt')}}" class="w3-bar-item w3-button w3-padding {% block menu2_class %}{% endblock %}"><i class="fa fa-database fa-fw"></i> MQTT</a>
|
||||||
<a href="{{ url_for('.notes')}}" class="w3-bar-item w3-button w3-padding {% block menu3_class %}{% endblock %}"><i class="fa fa-info fa-fw"></i> {{_('Important Messages')}}</a>
|
<a href="{{ url_for('.notes')}}" class="w3-bar-item w3-button w3-padding {% block menu3_class %}{% endblock %}"><i class="fa fa-info fa-fw"></i> {{_('Important Messages')}}</a>
|
||||||
<a href="{{ url_for('.logging')}}" class="w3-bar-item w3-button w3-padding {% block menu4_class %}{% endblock %}"><i class="fa fa-file-export fa-fw"></i> {{_('Log Files')}}</a>
|
<a href="{{ url_for('.logging')}}" class="w3-bar-item w3-button w3-padding {% block menu4_class %}{% endblock %}"><i class="fa fa-file-export fa-fw"></i> {{_('Log Files')}}</a>
|
||||||
|
<a href="{{ url_for('.network_tests')}}" class="w3-bar-item w3-button w3-padding {% block menu5_class %}{% endblock %}"><i class="fa fa-file-export fa-fw"></i> {{_('Network Tests')}}</a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|||||||
30
app/src/web/templates/page_network_tests.html.j2
Normal file
30
app/src/web/templates/page_network_tests.html.j2
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{% extends 'base.html.j2' %}
|
||||||
|
|
||||||
|
{% block title %}{{_("TSUN Proxy - Network Tests")}}{% endblock title %}
|
||||||
|
{% block menu5_class %}w3-blue{% endblock %}
|
||||||
|
{% block headline %}<i class="fa fa-file-export fa-fw"></i> {{_('Network Tests')}}{% endblock headline %}
|
||||||
|
{% block content %}
|
||||||
|
<div id="id01" class="w3-modal">
|
||||||
|
<div class="w3-modal-content" style="width:600px">
|
||||||
|
<div class="w3-container w3-padding-24">
|
||||||
|
<h2>{{_('Do you really want to delete the log file: <br>%(file)s ?', file='<b><span id="id03"></span></b>')}}</h2>
|
||||||
|
<div class="w3-bar">
|
||||||
|
<button id="id02" class="w3-button w3-red" onclick="deleteFile(); document.getElementById('id01').style.display='none'">{{_('Delete File')}}</button>
|
||||||
|
<button class="w3-button w3-grey w3-right" onclick="document.getElementById('id01').style.display='none'">{{_('Abort')}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="file-list"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function deleteFile() {
|
||||||
|
fname = document.getElementById('id02').href;
|
||||||
|
fetch(fname, {method: 'DELETE'})
|
||||||
|
.then(fetch_data())
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock content%}
|
||||||
|
|
||||||
|
{% block footer %}{% endblock footer %}
|
||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: tsun-gen3-proxy 0.14.0\n"
|
"Project-Id-Version: tsun-gen3-proxy 0.14.0\n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||||
"POT-Creation-Date: 2025-05-13 22:34+0200\n"
|
"POT-Creation-Date: 2025-06-01 00:59+0200\n"
|
||||||
"PO-Revision-Date: 2025-04-18 16:24+0200\n"
|
"PO-Revision-Date: 2025-04-18 16:24+0200\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
@@ -75,6 +75,11 @@ msgstr "Wichtige Hinweise"
|
|||||||
msgid "Log Files"
|
msgid "Log Files"
|
||||||
msgstr "Log Dateien"
|
msgstr "Log Dateien"
|
||||||
|
|
||||||
|
#: src/web/templates/base.html.j2:62
|
||||||
|
#: src/web/templates/page_network_tests.html.j2:5
|
||||||
|
msgid "Network Tests"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/web/templates/page_index.html.j2:3
|
#: src/web/templates/page_index.html.j2:3
|
||||||
msgid "TSUN Proxy - Connections"
|
msgid "TSUN Proxy - Connections"
|
||||||
msgstr "TSUN Proxy - Verbindungen"
|
msgstr "TSUN Proxy - Verbindungen"
|
||||||
@@ -120,14 +125,18 @@ msgid "TSUN Proxy - Log Files"
|
|||||||
msgstr "TSUN Proxy - Log Dateien"
|
msgstr "TSUN Proxy - Log Dateien"
|
||||||
|
|
||||||
#: src/web/templates/page_logging.html.j2:10
|
#: src/web/templates/page_logging.html.j2:10
|
||||||
|
#: src/web/templates/page_network_tests.html.j2:10
|
||||||
|
#, python-format
|
||||||
msgid "Do you really want to delete the log file: <br>%(file)s ?"
|
msgid "Do you really want to delete the log file: <br>%(file)s ?"
|
||||||
msgstr "Soll die Datei: <br>%(file)s<br>wirklich gelöscht werden?"
|
msgstr "Soll die Datei: <br>%(file)s<br>wirklich gelöscht werden?"
|
||||||
|
|
||||||
#: src/web/templates/page_logging.html.j2:12
|
#: src/web/templates/page_logging.html.j2:12
|
||||||
|
#: src/web/templates/page_network_tests.html.j2:12
|
||||||
msgid "Delete File"
|
msgid "Delete File"
|
||||||
msgstr "Datei löschen"
|
msgstr "Datei löschen"
|
||||||
|
|
||||||
#: src/web/templates/page_logging.html.j2:13
|
#: src/web/templates/page_logging.html.j2:13
|
||||||
|
#: src/web/templates/page_network_tests.html.j2:13
|
||||||
msgid "Abort"
|
msgid "Abort"
|
||||||
msgstr "Abbruch"
|
msgstr "Abbruch"
|
||||||
|
|
||||||
@@ -163,6 +172,11 @@ msgstr "Empfangene Topics"
|
|||||||
msgid "Number of topics received"
|
msgid "Number of topics received"
|
||||||
msgstr "Anzahl der empfangenen Topics"
|
msgstr "Anzahl der empfangenen Topics"
|
||||||
|
|
||||||
|
#: src/web/templates/page_network_tests.html.j2:3
|
||||||
|
#, fuzzy
|
||||||
|
msgid "TSUN Proxy - Network Tests"
|
||||||
|
msgstr "TSUN Proxy - Verbindungen"
|
||||||
|
|
||||||
#: src/web/templates/page_notes.html.j2:3
|
#: src/web/templates/page_notes.html.j2:3
|
||||||
msgid "TSUN Proxy - Important Messages"
|
msgid "TSUN Proxy - Important Messages"
|
||||||
msgstr "TSUN Proxy - Wichtige Hinweise"
|
msgstr "TSUN Proxy - Wichtige Hinweise"
|
||||||
|
|||||||
Reference in New Issue
Block a user