From a26482623ff166f8d60ab24c33e96b799c5a7951 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Sun, 5 Jul 2020 08:59:51 +0200 Subject: [PATCH] v4.3.3.0 Changelog: https://haproxy-wi.org/changelog.py#4_3_3 --- app/logs.py | 3 +-- app/templates/logs.html | 26 +++++++++++--------- app/viewlogs.py | 54 ++++++++++++++++++++--------------------- inc/script.js | 8 ++++++ 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/app/logs.py b/app/logs.py index ba2fab5b..5ba452a9 100644 --- a/app/logs.py +++ b/app/logs.py @@ -16,7 +16,7 @@ exgrep = form.getvalue('exgrep') if form.getvalue('exgrep') else '' if form.getvalue('rows') is None: rows = 10 else: - if form.getvalue('rows1') not is None: + if form.getvalue('rows1') is not None: rows = form.getvalue('rows1') else: rows = form.getvalue('rows') @@ -46,7 +46,6 @@ template = template.render(h2 = 1, title = title, role = role, user = user, - onclick = "showLog()", select_id = "serv", selects = servers, serv = form.getvalue('serv'), diff --git a/app/templates/logs.html b/app/templates/logs.html index c1633e13..de613469 100644 --- a/app/templates/logs.html +++ b/app/templates/logs.html @@ -6,7 +6,7 @@ {% endif %} - - + + + - + - {% if onclick != 'viewLogs()' and service != 'nginx' %} + {% if select_id == 'viewlogs' and service != 'nginx' %} {% endif %} +
- {% if onclick == 'viewLogs()' %} + {% if select_id == 'viewlogs' %} Log {% else %} Server @@ -15,20 +15,21 @@ {% if onclick != 'viewLogs()' and service != 'nginx' %} WAF logsNumber rowsEx for grepNumber rowsFind (?)Exclude (?) {{ input('time_range_out_hour', value=hour, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut', value=minut, class='time-range', readonly='readonly') }} {{ input('time_range_out_hour1', value=hour1, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut1', value=minut1, class='time-range', readonly='readonly') }}
-
- {% if onclick == 'viewLogs()' %} - {% for select in selects %} {% if select.0|int() == serv|int() %} @@ -42,29 +43,32 @@ {% include 'include/select.html' %} {% endif %}
{{ checkbox('waf') }} - {{ input('rows', type='number', value=rows, required='required') }} + {{ input('rows', type='number', value=rows, required='required', size='5') }} {{ input('grep', value=grep) }} + {{ input('exgrep', value=exgrep) }} +
- Show +
-{% if onclick == 'viewLogs()' and serv != '' and viewlogs != '' and viewlogs != 'haproxy-wi.error.log' and viewlogs != 'haproxy-wi.access.log' %} +{% if select_id == 'viewlogs' and serv != '' and viewlogs != '' and viewlogs != 'haproxy-wi.error.log' and viewlogs != 'haproxy-wi.access.log' %}