diff --git a/cgi-bin/diff.py b/cgi-bin/diff.py index e5ede821..bff1a694 100644 --- a/cgi-bin/diff.py +++ b/cgi-bin/diff.py @@ -64,11 +64,8 @@ if form.getvalue('serv') is not None and form.getvalue('open') is not None : print('') print('' % serv) print('') - print('
') + print('Show') -if form.getvalue('serv') is not None and form.getvalue('right') is not None: - commands = [ 'diff -ub %s%s %s%s' % (hap_configs_dir, left, hap_configs_dir, right) ] - funct.ssh_command(haproxy_configs_server, commands, compare="1") funct.footer() \ No newline at end of file diff --git a/cgi-bin/edit.py b/cgi-bin/edit.py index d8a992f5..b2c9d71a 100644 --- a/cgi-bin/edit.py +++ b/cgi-bin/edit.py @@ -1,63 +1,15 @@ #!/usr/bin/env python3 import html import cgi -import listserv as listhap -import subprocess -import os -import http.cookies import funct -import configparser -from funct import head as head form = cgi.FieldStorage() serv = form.getvalue('serv') -action = form.getvalue('servaction') -backend = form.getvalue('servbackend') - -head("Runtime API") +funct.head("Runtime API") funct.check_login() funct.check_config() -path_config = "haproxy-webintarface.config" -config = configparser.ConfigParser() -config.read(path_config) - -server_state_file = config.get('haproxy', 'server_state_file') -haproxy_sock = config.get('haproxy', 'haproxy_sock') - -if backend is None: - backend = "" - autofocus = "" -else: - autofocus = "autofocus" - -if action == 'disable': - selected1 = 'selected' - selected2 = '' - selected3 = '' - selected4 = '' -elif action == 'enable': - selected1 = '' - selected2 = 'selected' - selected3 = '' - selected4 = '' -elif action == 'set': - selected1 = '' - selected2 = '' - selected3 = 'selected' - selected4 = '' -elif action == 'show': - selected1 = '' - selected2 = '' - selected3 = '' - selected4 = 'selected' -else: - selected1 = '' - selected2 = '' - selected3 = '' - selected4 = '' - print('' ' | ' '' - ' | ') -print('' % (backend, autofocus)) - -print(' | ' - '' - ' | ') -funct.get_button("Enter") -print(' | ' - '