mirror of https://github.com/Aidaho12/haproxy-wi
parent
a066975a95
commit
3fd324f0b3
|
@ -29,7 +29,7 @@ Web interface(user-friendly web GUI, alerting, monitoring and secure) for managi
|
|||
12. Auto management of ports assigned to Fronted.
|
||||
13. Evaluate the changes of recent configs pushed to HAProxy, Nginx and Keepalived instances straight from web ui
|
||||
14. Multiple User Roles support for privileged based Viewing and editing of Config
|
||||
15. Create Groups and add /remove servers to ensure proper identification for your HAProxy Clusters
|
||||
15. Create Groups and add/remove servers to ensure proper identification for your HAProxy, Nginx Clusters
|
||||
16. Send notifications to telegram directly from HAProxy-WI
|
||||
17. HAProxy-WI supports high Availability to ensure uptime to all Master slave servers configured
|
||||
18. SSL certificate support.
|
||||
|
@ -45,7 +45,7 @@ Web interface(user-friendly web GUI, alerting, monitoring and secure) for managi
|
|||
28. Ability to hide parts of the config with tags for users with "guest" role: "HideBlockStart" and "HideBlockEnd"
|
||||
29. Mobile-ready desing
|
||||
30. REST API
|
||||
31. Backup HAProxy's and Keepalived's config files through HAProxy-WI
|
||||
31. Backup HAProxy's, Nginx's and Keepalived's config files through HAProxy-WI
|
||||
|
||||
![alt text](image/haproxy-wi-metrics.png "Merics")
|
||||
|
||||
|
|
|
@ -811,12 +811,13 @@ def get_files(dir = get_config_var('configs', 'haproxy_save_configs_dir'), forma
|
|||
else:
|
||||
file = set()
|
||||
return_files = set()
|
||||
|
||||
i = 0
|
||||
for files in glob.glob(os.path.join(dir,'*.'+format)):
|
||||
if format == 'log':
|
||||
file += [(files.split('/')[5], files.split('/')[5])]
|
||||
file += [(i, files.split('/')[5])]
|
||||
else:
|
||||
file.add(files.split('/')[-1])
|
||||
i += 1
|
||||
files = sorted(file, reverse=True)
|
||||
|
||||
if format == 'cfg' or format == 'conf':
|
||||
|
|
|
@ -429,7 +429,7 @@ if serv is not None and form.getvalue('rows1') is not None:
|
|||
|
||||
if serv == 'haproxy-wi.access.log':
|
||||
cmd="cat %s| awk -F\"/|:\" '$3>\"%s:00\" && $3<\"%s:00\"' |tail -%s %s %s" % (apache_log_path+"/"+serv, date, date1, rows, grep_act, grep)
|
||||
else:
|
||||
elif serv == 'haproxy-wi.error.log':
|
||||
cmd="cat %s| awk '$4>\"%s:00\" && $4<\"%s:00\"' |tail -%s %s %s" % (apache_log_path+"/"+serv, date, date1, rows, grep_act, grep)
|
||||
|
||||
output, stderr = funct.subprocess_execute(cmd)
|
||||
|
@ -456,6 +456,15 @@ if form.getvalue('viewlogs') is not None:
|
|||
grep_act = ''
|
||||
grep = ''
|
||||
|
||||
logs_files = funct.get_files(log_path, format="log")
|
||||
for key, value in logs_files:
|
||||
if int(viewlog) == key:
|
||||
viewlog = value
|
||||
break
|
||||
else:
|
||||
print('Haha')
|
||||
sys.exit()
|
||||
|
||||
if viewlog == 'backup.log':
|
||||
cmd="cat %s| awk '$2>\"%s:00\" && $2<\"%s:00\"' |tail -%s %s %s" % (log_path + viewlog, date, date1, rows, grep_act, grep)
|
||||
else:
|
||||
|
|
|
@ -88,13 +88,13 @@
|
|||
{% else %}
|
||||
{% set action_service = 'hap' %}
|
||||
{% endif %}
|
||||
<a id="start-{{ s.2 }}" class="start" title="Start HAProxy service">
|
||||
<a id="start-{{ s.2 }}" class="start" title="Start {{service}} service">
|
||||
<span class="service-start" onclick="confirmAjaxAction('start', '{{action_service}}', '{{s.2}}')"></span>
|
||||
</a>
|
||||
<a id="stop-{{ s.2 }}" class="stop" title="Stop HAProxy service">
|
||||
<a id="stop-{{ s.2 }}" class="stop" title="Stop {{service}} service">
|
||||
<span class="service-stop" onclick="confirmAjaxAction('stop', '{{action_service}}', '{{s.2}}')"></span>
|
||||
</a>
|
||||
<a id="restart-{{ s.2 }}" class="restart" title="Restart HAProxy service">
|
||||
<a id="restart-{{ s.2 }}" class="restart" title="Restart {{service}} service">
|
||||
<span class="service-reload" onclick="confirmAjaxAction('restart', '{{action_service}}', '{{s.2}}')"></span>
|
||||
</a>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue