mirror of https://github.com/Aidaho12/haproxy-wi
parent
3213a4ba9f
commit
d6e54f823c
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import http.cookies
|
|
||||||
|
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
|
||||||
|
@ -26,7 +24,7 @@ except Exception as e:
|
||||||
|
|
||||||
funct.page_for_admin(level=3)
|
funct.page_for_admin(level=3)
|
||||||
|
|
||||||
if all(v is None for v in [ form.getvalue('upstream'), form.getvalue('generateconfig') ]):
|
if all(v is None for v in [form.getvalue('upstream'), form.getvalue('generateconfig')]):
|
||||||
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
|
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
|
||||||
template = env.get_template('add_nginx.html')
|
template = env.get_template('add_nginx.html')
|
||||||
template = template.render(
|
template = template.render(
|
||||||
|
|
|
@ -2849,10 +2849,10 @@ function checkGeoipInstallation() {
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/^\s+|\s+$/g,'');
|
data = data.replace(/^\s+|\s+$/g,'');
|
||||||
if(data.indexOf('No such file or directory') != '-1') {
|
if(data.indexOf('No such file or directory') != '-1') {
|
||||||
$('#cur_geoip').html('<b style="color: var(--red-color)">GeoIPLite is installed</b>');
|
$('#cur_geoip').html('<b style="color: var(--red-color)">GeoIPLite is not installed</b>');
|
||||||
$('#geoip_install').show();
|
$('#geoip_install').show();
|
||||||
} else {
|
} else {
|
||||||
$('#cur_geoip').html('<b style="color: var(--green-color)">GeoIPLite is not installed<b>');
|
$('#cur_geoip').html('<b style="color: var(--green-color)">GeoIPLite is installed<b>');
|
||||||
$('#geoip_install').hide();
|
$('#geoip_install').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue