You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
haproxy-wi/app/runtimeapi.py

31 lines
768 B

#!/usr/bin/env python3
import funct
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('runtimeapi.html')
print('Content-type: text/html\n')
funct.check_login()
5 years ago
form = funct.form
try:
user, user_id, role, token, servers = funct.get_users_params(virt=1)
6 years ago
servbackend = form.getvalue('servbackend')
6 years ago
serv = form.getvalue('serv')
6 years ago
if servbackend is None:
servbackend = ""
except:
pass
template = template.render(h2 = 0,
title = "RunTime API",
role = role,
user = user,
select_id = "serv",
selects = servers,
token = token,
versions = funct.versions(),
servbackend = servbackend)
print(template)