mirror of https://github.com/Aidaho12/haproxy-wi
				
				
				
			
							parent
							
								
									42a683ce0b
								
							
						
					
					
						commit
						c83eb3989a
					
				
							
								
								
									
										18
									
								
								app/add.py
								
								
								
								
							
							
						
						
									
										18
									
								
								app/add.py
								
								
								
								
							| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html
 | 
			
		||||
import cgi
 | 
			
		||||
import os
 | 
			
		||||
import funct
 | 
			
		||||
| 
						 | 
				
			
			@ -55,7 +54,7 @@ if form.getvalue('mode') is not None:
 | 
			
		|||
	ssl = ""
 | 
			
		||||
	ssl_check = ""
 | 
			
		||||
	
 | 
			
		||||
	if form.getvalue('balance') is not None:
 | 
			
		||||
	if form.getvalue('balance')	 is not None:
 | 
			
		||||
		balance = "    balance " + form.getvalue('balance')	+ "\n"
 | 
			
		||||
	
 | 
			
		||||
	if form.getvalue('ip') is not None:
 | 
			
		||||
| 
						 | 
				
			
			@ -118,23 +117,28 @@ if form.getvalue('mode') is not None:
 | 
			
		|||
		
 | 
			
		||||
	if form.getvalue('cookie'):
 | 
			
		||||
		cookie = "    cookie "+form.getvalue('cookie_name')
 | 
			
		||||
		rewrite = ""
 | 
			
		||||
		prefix = ""
 | 
			
		||||
		nocache = ""
 | 
			
		||||
		postonly = ""
 | 
			
		||||
		dynamic = ""
 | 
			
		||||
		if form.getvalue('cookie_domain'):
 | 
			
		||||
			cookie += " domain "+form.getvalue('cookie_domain')
 | 
			
		||||
		if form.getvalue('rewrite'):
 | 
			
		||||
			rewrite = form.getvalue('rewrite')
 | 
			
		||||
		else:
 | 
			
		||||
			rewrite = ""
 | 
			
		||||
		if form.getvalue('prefix'):
 | 
			
		||||
			prefix = form.getvalue('prefix')
 | 
			
		||||
		else:
 | 
			
		||||
			prefix = ""
 | 
			
		||||
		if form.getvalue('nocache'):
 | 
			
		||||
			nocache = form.getvalue('nocache')
 | 
			
		||||
		else:
 | 
			
		||||
			nocache = ""
 | 
			
		||||
		if form.getvalue('postonly'):
 | 
			
		||||
			postonly = form.getvalue('postonly')
 | 
			
		||||
		else:
 | 
			
		||||
			postonly = ""
 | 
			
		||||
		if form.getvalue('dynamic'):
 | 
			
		||||
			dynamic = form.getvalue('dynamic')
 | 
			
		||||
		else:
 | 
			
		||||
			dynamic = ""
 | 
			
		||||
		cookie += " "+rewrite+" "+prefix+" "+nocache+" "+postonly+" "+dynamic+"\n"
 | 
			
		||||
		options_split += cookie
 | 
			
		||||
		if form.getvalue('dynamic'):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html
 | 
			
		||||
import cgi
 | 
			
		||||
import os
 | 
			
		||||
import http.cookies
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import cgi
 | 
			
		||||
import html
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
import funct
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html, http.cookies
 | 
			
		||||
import http.cookies
 | 
			
		||||
import cgi
 | 
			
		||||
import os
 | 
			
		||||
import funct, sql
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html, http.cookies
 | 
			
		||||
import http.cookies
 | 
			
		||||
import cgi
 | 
			
		||||
import os
 | 
			
		||||
import funct, sql
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html, http.cookies
 | 
			
		||||
import http.cookies
 | 
			
		||||
import cgi
 | 
			
		||||
import os
 | 
			
		||||
import funct, sql
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,6 @@
 | 
			
		|||
# -*- coding: utf-8 -*-
 | 
			
		||||
 | 
			
		||||
import cgi
 | 
			
		||||
import html
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
import funct
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html
 | 
			
		||||
 | 
			
		||||
import cgi
 | 
			
		||||
import funct
 | 
			
		||||
import sql
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
# -*- coding: utf-8 -*-"
 | 
			
		||||
import html
 | 
			
		||||
import cgi
 | 
			
		||||
import os, sys
 | 
			
		||||
import funct
 | 
			
		||||
| 
						 | 
				
			
			@ -337,7 +336,7 @@ if serv is not None and act == "configShow":
 | 
			
		|||
	env = Environment(loader=FileSystemLoader('templates/ajax'),extensions=['jinja2.ext.loopcontrols'])
 | 
			
		||||
	template = env.get_template('config_show.html')
 | 
			
		||||
	
 | 
			
		||||
	template = template.render(conf=conf, view=form.getvalue('view'), serv=serv, configver=form.getvalue('configver'))											
 | 
			
		||||
	template = template.render(conf=conf, view=form.getvalue('view'), serv=serv, configver=form.getvalue('configver'), role=funct.is_admin(level=2))											
 | 
			
		||||
	print(template)
 | 
			
		||||
	
 | 
			
		||||
	if form.getvalue('configver') is None:
 | 
			
		||||
| 
						 | 
				
			
			@ -460,7 +459,7 @@ if form.getvalue('metrics'):
 | 
			
		|||
		x_max = df.index.max() + pd.Timedelta(minutes=1)
 | 
			
		||||
 | 
			
		||||
		p[serv] = figure(
 | 
			
		||||
			tools="pan,box_zoom,reset,xwheel_zoom",
 | 
			
		||||
			tools="pan,box_zoom,reset,xwheel_zoom",		
 | 
			
		||||
			title=metric[0][0],
 | 
			
		||||
			x_axis_type="datetime", y_axis_label='Connections',
 | 
			
		||||
			x_range = (x_max.timestamp()*1000-60*100000, x_max.timestamp()*1000)
 | 
			
		||||
| 
						 | 
				
			
			@ -645,4 +644,4 @@ if form.getvalue('get_ldap_email'):
 | 
			
		|||
		except:
 | 
			
		||||
			print('error: user not found')
 | 
			
		||||
	finally:
 | 
			
		||||
		l.unbind()
 | 
			
		||||
		l.unbind()
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html, http
 | 
			
		||||
import http
 | 
			
		||||
import cgi
 | 
			
		||||
import sys
 | 
			
		||||
import os
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html
 | 
			
		||||
import cgi
 | 
			
		||||
import os
 | 
			
		||||
import funct
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -115,7 +115,7 @@
 | 
			
		|||
					</ul>
 | 
			
		||||
				</nav>
 | 
			
		||||
				<div class="copyright-menu">
 | 
			
		||||
					<a href="https://github.com/aidaho12/haproxy-wi/" title="Github repo" target="_blank" style="color: #fff">HAproxy-WI v3.4.4.3</a>
 | 
			
		||||
					<a href="https://github.com/aidaho12/haproxy-wi/" title="Github repo" target="_blank" style="color: #fff">HAproxy-WI v3.4.4.4</a>
 | 
			
		||||
					<br>
 | 
			
		||||
					<a href="https://www.patreon.com/haproxy_wi" title="Donate" target="_blank" style="color: #fff; margin-left: 30px; color: red;" class="patreon">  Patreon</a>
 | 
			
		||||
				</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
import html, http.cookies, os
 | 
			
		||||
import http.cookies, os
 | 
			
		||||
import cgi
 | 
			
		||||
import funct
 | 
			
		||||
import sql
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue