Untitled
unknown
python
3 years ago
1.3 kB
6
Indexable
{% extends 'base2.html' %} {% block title %}Logs Page{% endblock %} {% block content %} <h1>{{ analname }}     <a href="/analyser/{{ analname }}"><input type='submit' value='refresh'/></a>     <a href="/"><input type='submit' value='back'/></a>     <button type="button" id="startstop" onclick="start_stop('{{ analname }}'); this.disabled = true;" {% if analysers[analname]['is_active'] == True %} disabled {% endif %} >{% if analysers[analname]['is_alive'] == True %}Stop{% else %}Start{% endif %}</button>     {% if analysers[analname]['is_alive'] == True %}<td style="text-align:center">🟩</td>{% else %}<td style="text-align:center">🟥</td>{% endif %}</h1> <table> <tr> <th>logs</th> </tr> <tr> <td> {% for line in logs %} {% set code = line.split(' - ') %} {% if code[1] == 'INFO' %} <div style="color:forestgreen;">{{ line }} <br></div> {% elif code[1] == 'ERROR' %} <div style="color:darkred;">{{ line }} <br></div> {% else %} <div>{{ line }} <br></div> {% endif %} {% endfor %} </td> </tr> </table> {% endblock %}
Editor is loading...