pull/161/head
Pavel Loginov 2019-10-04 09:52:03 +03:00
parent 91badd5c90
commit 7db0cb6abd
4 changed files with 10 additions and 3 deletions

View File

@ -628,6 +628,11 @@ def versions():
current_ver = check_ver()
current_ver_without_dots = current_ver.split('.')
current_ver_without_dots = ''.join(current_ver_without_dots)
current_ver_without_dots = current_ver_without_dots.replace('\n', '')
if len(current_ver_without_dots) == 2:
current_ver_without_dots += '00'
if len(current_ver_without_dots) == 3:
current_ver_without_dots += '0'
current_ver_without_dots = int(current_ver_without_dots)
except:
current_ver = "Sorry cannot get current version"

View File

@ -23,6 +23,7 @@ hour = form.getvalue('hour')
hour1 = form.getvalue('hour1')
minut = form.getvalue('minut')
minut1 = form.getvalue('minut1')
waf = form.getvalue('waf')
print('Content-type: text/html\n')
funct.check_login()
@ -39,7 +40,7 @@ except:
output_from_parsed_template = template.render(h2 = 1,
autorefresh = 1,
title = "HAProxy logs",
title = "HAProxy`s logs",
role = sql.get_user_role_by_uuid(user_id.value),
user = user,
onclick = "showLog()",
@ -52,6 +53,7 @@ output_from_parsed_template = template.render(h2 = 1,
hour1 = hour1,
minut = minut,
minut1 = minut1,
waf = waf,
versions = funct.versions(),
token = token)
print(output_from_parsed_template)

View File

@ -43,7 +43,7 @@ body, .container {
<input type="hidden" value="{{reff}}" name="ref" id="ref">
<button type="submit" name="Login" value="Enter" id="enter">Login</button>
</form>
<div class="alert alert-danger" style="display: none;">
<div class="alert alert-danger" style="display: none; margin-top: 220px;margin-right: 70px;width: 300px;">
Your login or password is incorrect
<br />
<span id="ban_10">

View File

@ -162,7 +162,7 @@ $( function() {
} else if (data.indexOf('No packages marked for update') != '-1') {
$('.alert-danger').remove();
$('.alert-warning').remove();
$("#ajax").html('<div class="alert alert-info">It is seems like you have the last version HAProxy-WI</data>');
$("#ajax").html('<div class="alert alert-info">It is seems like you have the lastest version HAProxy-WI</data>');
} else if (data.indexOf('Connection timed out') != '-1') {
$('.alert-danger').remove();
$('.alert-warning').remove();