improvement

This commit is contained in:
piair 2023-08-25 15:23:33 +02:00
parent f548c3030a
commit 4757a2957d
2 changed files with 10 additions and 5 deletions

View File

@ -70,4 +70,10 @@ function change_proxy(value) {
document.getElementById("port").value = data[parseInt(value)]["port"]; document.getElementById("port").value = data[parseInt(value)]["port"];
document.getElementById("name").value = data[parseInt(value)]["name"]; document.getElementById("name").value = data[parseInt(value)]["name"];
} }
} }
function change_logs(value) {
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
}

View File

@ -40,15 +40,14 @@
<h1>Already logged in</h1> <h1>Already logged in</h1>
{% else %} {% else %}
<select name="select" onchange="change_logs(this.value)"></select>
{% for i in data %} {% for i in data %}
<select name="select" onchange="change_logs(this.value)">
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option> <option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
{% endfor %}
</select> </select>
<embed type="text/html" src="{{url_for('static', filename='log/1.txt')}}" width="100%" height="100%"> <embed type="text/html" src="{{url_for('static', filename='log/1.txt')}}" width="100%" height="100%">
{% endfor %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}