Пример #1
0
        print("HAproxy was %s" % action)
    else:
        print("Bad config, check please")

if form.getvalue('action_waf') is not None and serv is not None:
    serv = form.getvalue('serv')
    action = form.getvalue('action_waf')
    funct.logging(serv, 'WAF service was ' + action, haproxywi=1, login=1)
    commands = ["sudo systemctl %s waf" % action]
    funct.ssh_command(serv, commands)

if act == "overview":
    ovw.get_overview()

if act == "overviewwaf":
    ovw.get_overviewWaf(form.getvalue('page'))

if act == "overviewServers":
    id = form.getvalue('id')
    name = form.getvalue('name')
    ovw.get_overviewServers(ip=serv, name=name, page=form.getvalue('page'))

if form.getvalue('action'):
    import requests
    from requests_toolbelt.utils import dump

    haproxy_user = sql.get_setting('stats_user')
    haproxy_pass = sql.get_setting('stats_password')
    stats_port = sql.get_setting('stats_port')
    stats_page = sql.get_setting('stats_page')
Пример #2
0
        print("HAproxy was %s" % action)
    else:
        print("Bad config, check please")

if form.getvalue('action_waf') is not None and serv is not None:
    serv = form.getvalue('serv')
    action = form.getvalue('action_waf')

    commands = ["sudo systemctl %s waf" % action]
    funct.ssh_command(serv, commands)

if act == "overview":
    ovw.get_overview()

if act == "overviewwaf":
    ovw.get_overviewWaf()

if act == "overviewServers":
    ovw.get_overviewServers()

if form.getvalue('action'):
    import requests
    from requests_toolbelt.utils import dump

    haproxy_user = sql.get_setting('stats_user')
    haproxy_pass = sql.get_setting('stats_password')
    stats_port = sql.get_setting('stats_port')
    stats_page = sql.get_setting('stats_page')

    postdata = {
        'action': form.getvalue('action'),