mirror of https://github.com/Aidaho12/haproxy-wi
parent
6732903e5a
commit
f1649fc1f3
|
@ -992,6 +992,8 @@ def update_db_v_5(**kwargs):
|
||||||
`group` VARCHAR ( 64 ),
|
`group` VARCHAR ( 64 ),
|
||||||
`key` VARCHAR ( 64 ),
|
`key` VARCHAR ( 64 ),
|
||||||
`secret` VARCHAR ( 64 ),
|
`secret` VARCHAR ( 64 ),
|
||||||
|
`create_date` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`edit_date` DATETIME default '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
);
|
);
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -16,6 +16,15 @@ try:
|
||||||
else:
|
else:
|
||||||
groups=funct.get_user_group(id=1)
|
groups=funct.get_user_group(id=1)
|
||||||
user_group = funct.get_user_group(id=1)
|
user_group = funct.get_user_group(id=1)
|
||||||
|
|
||||||
|
cmd = 'which terraform'
|
||||||
|
output, stderr = funct.subprocess_execute(cmd)
|
||||||
|
|
||||||
|
if stderr != '':
|
||||||
|
is_terraform = False
|
||||||
|
else:
|
||||||
|
is_terraform = True
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
|
@ -27,5 +36,6 @@ output_from_parsed_template = template.render(title="Servers provisioning",
|
||||||
user_group=user_group,
|
user_group=user_group,
|
||||||
servers=sql.select_provisioned_servers(),
|
servers=sql.select_provisioned_servers(),
|
||||||
providers=sql.select_providers(user_group),
|
providers=sql.select_providers(user_group),
|
||||||
|
is_terraform=is_terraform,
|
||||||
token=token)
|
token=token)
|
||||||
print(output_from_parsed_template)
|
print(output_from_parsed_template)
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul id='browse_histroy'></ul>
|
<ul id='browse_histroy'></ul>
|
||||||
<div id="provisioning">
|
<div id="provisioning">
|
||||||
|
{% if not is_terraform %}
|
||||||
|
<center>
|
||||||
|
<br />
|
||||||
|
<h3>You do not have installed Terraform. Read <a href="https://www.terraform.io/downloads.html"
|
||||||
|
title="Download Terraform" target="_blank">here</a> how to install Terraform</h3>
|
||||||
|
</center>
|
||||||
|
{% else %}
|
||||||
<table class="overview" id="ajax-provisioning">
|
<table class="overview" id="ajax-provisioning">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="overviewHead">
|
<tr class="overviewHead">
|
||||||
|
@ -37,6 +44,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br /><span class="add-button" title="Create a new server" id="create-provider-button">+ Add</span>
|
<br /><span class="add-button" title="Create a new server" id="create-provider-button">+ Add</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div id="providers">
|
<div id="providers">
|
||||||
<table class="overview" id="ajax-providers">
|
<table class="overview" id="ajax-providers">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<center>
|
<center>
|
||||||
<br />
|
<br />
|
||||||
<h3>You do not have installed SMON service. Read <a href="https://haproxy-wi.org/services.py?service=smon"
|
<h3>You do not have installed SMON service. Read <a href="https://haproxy-wi.org/services.py?service=smon"
|
||||||
title="Simple monitoring network ports with alerting via Telegram and WEB pannel" target="_blank">here</a> how install SMON service</h3>
|
title="Simple monitoring network ports with alerting via Telegram and WEB pannel" target="_blank">here</a> how to install SMON service</h3>
|
||||||
</center>
|
</center>
|
||||||
{% elif smon_status.0 == 'failed' %}
|
{% elif smon_status.0 == 'failed' %}
|
||||||
<center>
|
<center>
|
||||||
|
@ -31,7 +31,10 @@
|
||||||
{% elif smon|length == 0 and action != 'add' and action == 'checker_history' %}
|
{% elif smon|length == 0 and action != 'add' and action == 'checker_history' %}
|
||||||
<center>
|
<center>
|
||||||
<br />
|
<br />
|
||||||
<h3>There are not any events yet. Check if there are any Checker are enabled on the "HAProxy Overview" or on "Nginx Overview" pages</h3>
|
<h3>
|
||||||
|
There are not any events yet. Check if there are any Checker are enabled on the "<a href="hapservers.py" title="HAProxy Overview">HAProxy Overview</a>"
|
||||||
|
or on "<a href="hapservers.py?service=nginx" title="Nginx Overview">Nginx Overview</a>" pages
|
||||||
|
</h3>
|
||||||
<br />
|
<br />
|
||||||
</center>
|
</center>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in New Issue