Compare commits

...

6 Commits

Author SHA1 Message Date
Stefan Allius
84b4b4c8be update po file 2025-06-22 22:05:14 +02:00
Stefan Allius
b9d1868e4e Merge branch 'main' of https://github.com/s-allius/tsun-gen3-proxy into s-allius/issue443 2025-06-22 21:50:56 +02:00
Stefan Allius
d50f443e2f remove fetch function from network test 2025-06-21 11:17:48 +02:00
Stefan Allius
d33e6e8bb4 Merge branch 'main' of https://github.com/s-allius/tsun-gen3-proxy into s-allius/issue443 2025-06-20 22:30:15 +02:00
Stefan Allius
0e039c4683 Merge branch 'main' of https://github.com/s-allius/tsun-gen3-proxy into s-allius/issue443 2025-06-15 22:45:25 +02:00
Stefan Allius
2b6c71c0bb add page for network test 2025-06-12 23:19:58 +02:00
4 changed files with 51 additions and 3 deletions

View File

@@ -30,3 +30,9 @@ async def logging():
return await render_template(
'page_logging.html.j2',
fetch_url=url_for('.file_fetch'))
@web.route('/network_tests')
async def network_tests():
return await render_template(
'page_network_tests.html.j2')

View File

@@ -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('.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('.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>
{% if hassio is defined %}
<br>
<a href="/hassio/addon/{{addonname}}/config" target="_top" class="w3-bar-item w3-button w3-padding"><i class="fa fa-gear fa-fw"></i>  {{_('Add-on Config')}}</a>

View File

@@ -0,0 +1,31 @@
{% 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 %}
<script>
url = "http://127.0.0.1:10000"
const req = new XMLHttpRequest();
req.open("POST", url, true);
//req.setRequestHeader("RESOLVE", "bla.com")
req.onload = (event) => {
// Uploaded
};
const blob = new Blob(["abc123"], { type: "text/plain" });
req.send(blob);
ws = new WebSocket("ws://127.0.0.1:10000");
// ws.open()
ws.onopen = () => {
console.log("Connection opened")
ws.send("Hi server, please send me the score of yesterday's game")
}
</script>
{% endblock content%}
{% block footer %}{% endblock footer %}

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tsun-gen3-proxy 0.14.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-05-13 22:34+0200\n"
"POT-Creation-Date: 2025-06-21 10:54+0200\n"
"PO-Revision-Date: 2025-04-18 16:24+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@@ -75,11 +75,16 @@ msgstr "Wichtige Hinweise"
msgid "Log Files"
msgstr "Log Dateien"
#: src/web/templates/base.html.j2:64
#: src/web/templates/base.html.j2:62
#: src/web/templates/page_network_tests.html.j2:5
msgid "Network Tests"
msgstr ""
#: src/web/templates/base.html.j2:65
msgid "Add-on Config"
msgstr "Add-on Konfiguration"
#: src/web/templates/base.html.j2:65
#: src/web/templates/base.html.j2:66
msgid "Add-on Log"
msgstr "Add-on Protokoll"
@@ -172,6 +177,11 @@ msgstr "Empfangene Topics"
msgid "Number of topics received"
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
msgid "TSUN Proxy - Important Messages"
msgstr "TSUN Proxy - Wichtige Hinweise"