mirror of https://github.com/Aidaho12/haproxy-wi
				
				
				
			
							parent
							
								
									a658a4ab83
								
							
						
					
					
						commit
						9c056ac0c7
					
				| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
# -*- coding: utf-8 -*-
 | 
			
		||||
import funct, sql
 | 
			
		||||
import create_db
 | 
			
		||||
import os
 | 
			
		||||
from jinja2 import Environment, FileSystemLoader
 | 
			
		||||
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
 | 
			
		||||
template = env.get_template('ovw.html')
 | 
			
		||||
| 
						 | 
				
			
			@ -43,6 +44,7 @@ try:
 | 
			
		|||
	for s in is_metrics_workers:
 | 
			
		||||
		i += 1
 | 
			
		||||
	is_metrics_worker = i
 | 
			
		||||
	host = os.environ.get('HTTP_HOST', '')
 | 
			
		||||
 | 
			
		||||
except:
 | 
			
		||||
	role = ''
 | 
			
		||||
| 
						 | 
				
			
			@ -65,6 +67,7 @@ except:
 | 
			
		|||
	is_checker_worker = ''
 | 
			
		||||
	is_metrics_worker = ''
 | 
			
		||||
	token = ''
 | 
			
		||||
	host = ''
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template = template.render(h2 = 1,
 | 
			
		||||
| 
						 | 
				
			
			@ -95,5 +98,6 @@ template = template.render(h2 = 1,
 | 
			
		|||
							servers = servers,
 | 
			
		||||
							is_checker_worker = is_checker_worker,
 | 
			
		||||
							is_metrics_worker = is_metrics_worker,
 | 
			
		||||
							host = host,
 | 
			
		||||
							token = token)
 | 
			
		||||
print(template)
 | 
			
		||||
| 
						 | 
				
			
			@ -174,10 +174,11 @@
 | 
			
		|||
		<td class="padding10 first-collumn-wi">
 | 
			
		||||
		{% if grafana|int() >= 1 %}
 | 
			
		||||
			<span title="running {{grafana}} process"><span class="serverUp server-status"></span></span> 
 | 
			
		||||
			<a href="http://{{host}}:3000" target="_blank" title="Open Grafana" class="logs_link">Grafana</a>
 | 
			
		||||
		{% else %}
 | 
			
		||||
			<span title="The service does not started or does not installed"><span class="serverNone server-status"></span></span> 
 | 
			
		||||
			<span title="The service does not started or does not installed"><span class="serverNone server-status"></span></span>
 | 
			
		||||
			<span>Grafana</span>			
 | 
			
		||||
		{% endif %}
 | 
			
		||||
			<span>Grafana</span>
 | 
			
		||||
		</td>
 | 
			
		||||
		<td>
 | 
			
		||||
		{% if prometheus|int() >= 1 %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,6 +52,8 @@ else:
 | 
			
		|||
if serv is not None and form.getvalue('del') is not None:
 | 
			
		||||
	if Select is not None:
 | 
			
		||||
		aftersave = 1
 | 
			
		||||
		env = Environment(loader=FileSystemLoader('templates/'))
 | 
			
		||||
		template = env.get_template('delver.html')
 | 
			
		||||
		for get in form:
 | 
			
		||||
			if format in get:
 | 
			
		||||
				try:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,40 +2,40 @@
 | 
			
		|||
 "name": "App",
 | 
			
		||||
 "icons": [
 | 
			
		||||
  {
 | 
			
		||||
   "src": "\/inc\images\/favicon\/android-icon-36x36.png",
 | 
			
		||||
   "src": "/inc/images/favicon/android-icon-36x36.png",
 | 
			
		||||
   "sizes": "36x36",
 | 
			
		||||
   "type": "image\/png",
 | 
			
		||||
   "density": "0.75"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
   "src": "\/inc\images\/favicon\/android-icon-48x48.png",
 | 
			
		||||
   "src": "\/inc\/images\/favicon\/android-icon-48x48.png",
 | 
			
		||||
   "sizes": "48x48",
 | 
			
		||||
   "type": "image\/png",
 | 
			
		||||
   "density": "1.0"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
   "src": "\/inc\images\/favicon\/android-icon-72x72.png",
 | 
			
		||||
   "src": "\/inc\/images\/favicon\/android-icon-72x72.png",
 | 
			
		||||
   "sizes": "72x72",
 | 
			
		||||
   "type": "image\/png",
 | 
			
		||||
   "density": "1.5"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
   "src": "\/inc\images\/favicon\/android-icon-96x96.png",
 | 
			
		||||
   "src": "\/inc\/images\/favicon\/android-icon-96x96.png",
 | 
			
		||||
   "sizes": "96x96",
 | 
			
		||||
   "type": "image\/png",
 | 
			
		||||
   "density": "2.0"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
   "src": "\/inc\images\/favicon\/android-icon-144x144.png",
 | 
			
		||||
   "src": "\/inc\/images\/favicon\/android-icon-144x144.png",
 | 
			
		||||
   "sizes": "144x144",
 | 
			
		||||
   "type": "image\/png",
 | 
			
		||||
   "density": "3.0"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
   "src": "\/inc\images\/favicon\/android-icon-192x192.png",
 | 
			
		||||
   "src": "\/inc\/images\/favicon\/android-icon-192x192.png",
 | 
			
		||||
   "sizes": "192x192",
 | 
			
		||||
   "type": "image\/png",
 | 
			
		||||
   "density": "4.0"
 | 
			
		||||
  }
 | 
			
		||||
 ]
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue