mirror of https://github.com/Aidaho12/haproxy-wi
parent
c1ce207499
commit
17edd5c92b
|
@ -610,7 +610,7 @@ def update_db_v_4_4_2(**kwargs):
|
|||
|
||||
def update_ver(**kwargs):
|
||||
con, cur = get_cur()
|
||||
sql = """update version set version = '4.4.1.0'; """
|
||||
sql = """update version set version = '4.4.2.0'; """
|
||||
try:
|
||||
cur.execute(sql)
|
||||
con.commit()
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<li><a href="#services" title="Admin area: Manage HAProxy-WI services - HAProxy-WI">Services</a></li>
|
||||
<li><a href="#updatehapwi" title="Admin area: Update HAProxy-WI - HAProxy-WI">Update</a></li>
|
||||
<li><a href="#backup" title="Admin area: Backup configs - HAProxy-WI">Backup</a></li>
|
||||
<li><a href="#installmon" title="Servers: Monitoring service installation - HAProxy-WI">Monitoring installation</a></li>
|
||||
{% include 'include/login.html' %}
|
||||
</ul>
|
||||
<ul id='browse_histroy'></ul>
|
||||
|
@ -447,6 +448,10 @@
|
|||
<div id="backup">
|
||||
{% include 'include/admin_backup.html' %}
|
||||
</div>
|
||||
|
||||
<div id="installmon">
|
||||
{% include 'include/mon_installation.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'include/admins_dialogs.html' %}
|
||||
{% include 'include/change_pass_form.html' %}
|
||||
|
|
|
@ -71,26 +71,29 @@
|
|||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="p_menu">
|
||||
<a title="Actions with Nginx" class="nginx">Nginx</a>
|
||||
<ul class="v_menu">
|
||||
<li><a href="/app/hapservers.py?service=nginx" title="Overview Nginx servers" class="overview-link head-submenu">Overview</a> </li>
|
||||
<li><a href="/app/config.py?service=nginx" title="Working with Nginx configs" class="edit head-submenu">Configs</a></li>
|
||||
<li><a href="/app/viewsttats.py?service=nginx" title="Nginx statistics" class="stats head-submenu">Stats</a></li>
|
||||
{% if role <= 2 %}
|
||||
<li><a href="/app/versions.py?service=nginx" title="Working with versions Nginx configs" class="version head-submenu">Versions</a></li>
|
||||
<li><a href="/app/add.py?service=nginx#ssl" title="Add proxy: Upload SSL certificates - HAProxy-WI" class="cert head-submenu" id="add3">SSL</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
{% if role <= 2 %}
|
||||
<li class="p_menu">
|
||||
<a title="Actions with Nginx" class="nginx">Nginx</a>
|
||||
<ul class="v_menu">
|
||||
<li><a href="/app/hapservers.py?service=nginx" title="Overview Nginx servers" class="overview-link head-submenu">Overview</a> </li>
|
||||
<li><a href="/app/config.py?service=nginx" title="Working with Nginx configs" class="edit head-submenu">Configs</a></li>
|
||||
<li><a href="/app/viewsttats.py?service=nginx" title="Nginx statistics" class="stats head-submenu">Stats</a></li>
|
||||
<li><a href="/app/versions.py?service=nginx" title="Working with versions Nginx configs" class="version head-submenu">Versions</a></li>
|
||||
<li><a href="/app/add.py?service=nginx#ssl" title="Add proxy: Upload SSL certificates - HAProxy-WI" class="cert head-submenu" id="add3">SSL</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="p_menu">
|
||||
<a title="Keepalived" class="ha">Keepalived</a>
|
||||
<ul class="v_menu">
|
||||
<li><a href="/app/ha.py" title="Create and configure HA cluster - HAProxy-WI" class="keepalived head-submenu">HA</a></li>
|
||||
<li><a href="/app/config.py?service=keepalived" title="Working with Keepalived configs" class="edit head-submenu">Configs</a></li>
|
||||
<li><a href="/app/versions.py?service=keepalived" title="Working with versions Keepalived configs" class="version head-submenu keepalived_versions">Versions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="p_menu">
|
||||
<a title="Keepalived" class="ha">Keepalived</a>
|
||||
<ul class="v_menu">
|
||||
<li><a href="/app/ha.py" title="Create and configure HA cluster - HAProxy-WI" class="keepalived head-submenu">HA</a></li>
|
||||
<li><a href="/app/config.py?service=keepalived" title="Working with Keepalived configs" class="edit head-submenu">Configs</a></li>
|
||||
<li><a href="/app/versions.py?service=keepalived" title="Working with versions Keepalived configs" class="version head-submenu keepalived_versions">Versions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="p_menu">
|
||||
<a title="Simple monitoring network ports" class="stats">SMON</a>
|
||||
<ul class="v_menu">
|
||||
|
@ -100,6 +103,7 @@
|
|||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
{% if role <= 2 %}
|
||||
<li class="p_menu">
|
||||
<a title="Servers manage" class="runtime">Servers</a>
|
||||
<ul class="v_menu">
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
width=18 style="padding-left: 5px; margin-bottom: -3px;">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if role <= 1 %}
|
||||
{% if role <= 2 %}
|
||||
<span class="server-action">
|
||||
{% if service == 'nginx' %}
|
||||
{% set action_service = 'nginx' %}
|
||||
|
@ -162,7 +162,7 @@
|
|||
</div>
|
||||
{% if service == 'haproxy' %}
|
||||
<div class="server-act-links" id="server-{{s.8.0.0|string()}}">
|
||||
{% if role <= 1 %}
|
||||
{% if role <= 2 %}
|
||||
{% set id = 'alert-' + s.8.0.0|string() %}
|
||||
{% if s.8.0.8 == 1 %}
|
||||
{{ checkbox(id, title='Enable alerting', value='1', desc='Alert', checked='checked') }}
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
<table>
|
||||
{% if page == 'users.py' %}
|
||||
<caption><h3>Install Grafana and Prometheus servers</h3></caption>
|
||||
<tr class="overviewHead">
|
||||
<td class="padding10 first-collumn">Current instalation</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Note</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cur_grafana_ver" class="padding10 first-collumn">
|
||||
{% if grafana == "Active:" %}
|
||||
Grafana and Prometheus servers have already installed
|
||||
{% else %}
|
||||
There are no Grafana and Prometheus servers
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="padding10 first-collumn" style="width: 20%;">
|
||||
HAProxy-WI will try to install the latest Grafana and Prometheus server versions
|
||||
</td>
|
||||
<td class="padding10 first-collumn">
|
||||
Before Install any Exporters install Grafana and Prometheus servers first
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
{% if grafana != "Active:" %}
|
||||
<span class="ui-button ui-widget ui-corner-all" id="grafna_install" title="Install Grafana and Prometheus server">Install</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
<table>
|
||||
<caption><h3>Install HAProxy Exporter</h3></caption>
|
||||
<tr class="overviewHead">
|
||||
<td class="padding10 first-collumn">Current instalation</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cur_haproxy_exp_ver" class="padding10 first-collumn">
|
||||
</td>
|
||||
<td class="padding10 first-collumn" style="width: 20%;">
|
||||
HAProxy-WI will try to install the latest HAProxy Exporter version
|
||||
</td>
|
||||
<td class="padding10 first-collumn">
|
||||
<select autofocus required name="haproxy_exp_addserv" id="haproxy_exp_addserv">
|
||||
<option disabled selected>Choose server</option>
|
||||
{% for select in servers %}
|
||||
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<span class="ui-button ui-widget ui-corner-all" id="haproxy_exp_install" title="Install HAProxy Exporter">Install</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption><h3>Install Nginx Exporter</h3></caption>
|
||||
<tr class="overviewHead">
|
||||
<td class="padding10 first-collumn">Current instalation</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cur_nginx_exp_ver" class="padding10 first-collumn">
|
||||
</td>
|
||||
<td class="padding10 first-collumn" style="width: 20%;">
|
||||
HAProxy-WI will try to install the latest Nginx Exporter version
|
||||
</td>
|
||||
<td class="padding10 first-collumn">
|
||||
<select autofocus required name="nginx_exp_addserv" id="nginx_exp_addserv">
|
||||
<option disabled selected>Choose server</option>
|
||||
{% for select in servers %}
|
||||
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<span class="ui-button ui-widget ui-corner-all" id="nginx_exp_install" title="Install Nginx Exporter">Install</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="ajaxmon"></div>
|
|
@ -304,100 +304,9 @@
|
|||
</table>
|
||||
<div id="ajax"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="installmon">
|
||||
<table>
|
||||
<caption><h3>Install Grafana and Prometheus servers</h3></caption>
|
||||
<tr class="overviewHead">
|
||||
<td class="padding10 first-collumn">Current instalation</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Note</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cur_grafana_ver" class="padding10 first-collumn">
|
||||
{% if grafana == "Active:" %}
|
||||
Grafana and Prometheus servers have already installed
|
||||
{% else %}
|
||||
There are no Grafana and Prometheus servers
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="padding10 first-collumn" style="width: 20%;">
|
||||
HAProxy-WI will try to install the latest Grafana and Prometheus server versions
|
||||
</td>
|
||||
<td class="padding10 first-collumn">
|
||||
Before Install any Exporters install Grafana and Prometheus servers first
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
{% if grafana != "Active:" %}
|
||||
<span class="ui-button ui-widget ui-corner-all" id="grafna_install" title="Install Grafana and Prometheus server">Install</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption><h3>Install HAProxy Exporter</h3></caption>
|
||||
<tr class="overviewHead">
|
||||
<td class="padding10 first-collumn">Current instalation</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cur_haproxy_exp_ver" class="padding10 first-collumn">
|
||||
</td>
|
||||
<td class="padding10 first-collumn" style="width: 20%;">
|
||||
HAProxy-WI will try to install the latest HAProxy Exporter version
|
||||
</td>
|
||||
<td class="padding10 first-collumn">
|
||||
<select autofocus required name="haproxy_exp_addserv" id="haproxy_exp_addserv">
|
||||
<option disabled selected>Choose server</option>
|
||||
{% for select in servers %}
|
||||
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<span class="ui-button ui-widget ui-corner-all" id="haproxy_exp_install" title="Install HAProxy Exporter">Install</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption><h3>Install Nginx Exporter</h3></caption>
|
||||
<tr class="overviewHead">
|
||||
<td class="padding10 first-collumn">Current instalation</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
|
||||
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="cur_nginx_exp_ver" class="padding10 first-collumn">
|
||||
</td>
|
||||
<td class="padding10 first-collumn" style="width: 20%;">
|
||||
HAProxy-WI will try to install the latest Nginx Exporter version
|
||||
</td>
|
||||
<td class="padding10 first-collumn">
|
||||
<select autofocus required name="nginx_exp_addserv" id="nginx_exp_addserv">
|
||||
<option disabled selected>Choose server</option>
|
||||
{% for select in servers %}
|
||||
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<span class="ui-button ui-widget ui-corner-all" id="nginx_exp_install" title="Install Nginx Exporter">Install</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="ajaxmon"></div>
|
||||
{% include 'include/mon_installation.html' %}
|
||||
</div>
|
||||
|
||||
<div id="backup">
|
||||
|
|
|
@ -16,6 +16,7 @@ try:
|
|||
users = sql.select_users()
|
||||
settings = sql.get_setting('', all=1)
|
||||
ldap_enable = sql.get_setting('ldap_enable')
|
||||
grafana, stderr = funct.subprocess_execute("service grafana-server status |grep Active |awk '{print $1}'")
|
||||
services = []
|
||||
services_name = {"checker_haproxy":"Master checker service",
|
||||
"keep_alive":"Auto start service",
|
||||
|
@ -47,6 +48,7 @@ template = template.render(title = "Admin area: Manage users",
|
|||
settings = settings,
|
||||
backups = sql.select_backups(),
|
||||
services = services,
|
||||
grafana = ''.join(grafana),
|
||||
page = "users.py",
|
||||
ldap_enable = ldap_enable)
|
||||
print(template)
|
||||
|
|
Loading…
Reference in New Issue