mirror of https://github.com/Aidaho12/haproxy-wi
parent
333b53a327
commit
c5ea14bb61
|
@ -17,11 +17,11 @@ class SshConnection:
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
try:
|
try:
|
||||||
if self.ssh_enable == 1:
|
if self.ssh_enable == 1:
|
||||||
k = paramiko.pkey.load_private_key_file(self.ssh_key_name)
|
|
||||||
self.ssh.connect(
|
self.ssh.connect(
|
||||||
hostname=self.server_ip,
|
hostname=self.server_ip,
|
||||||
port=self.ssh_port,
|
port=self.ssh_port,
|
||||||
username=self.ssh_user_name, pkey=k,
|
username=self.ssh_user_name,
|
||||||
|
key_filename=self.ssh_key_name,
|
||||||
timeout=11,
|
timeout=11,
|
||||||
banner_timeout=200
|
banner_timeout=200
|
||||||
)
|
)
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
{% set is_service_stopped_title = lang.words.stop|title()+" "+lang.words.and+" "+lang.words.disable+" "+services_name[s.0]['name']+" "+lang.words.service %}
|
{% set is_service_stopped_title = lang.words.stop|title()+" "+lang.words.and+" "+lang.words.disable+" "+services_name[s.0]['name']+" "+lang.words.service %}
|
||||||
<tr class="{{ loop.cycle('odd', 'even') }}" id="{{s.0}}">
|
<tr class="{{ loop.cycle('odd', 'even') }}" id="{{s.0}}">
|
||||||
<td class="padding10 first-collumn">
|
<td class="padding10 first-collumn">
|
||||||
{% if s.1.0 == 'active' or s.1.0 == 'RUNNING' %}
|
{% if s.1 == 'active' or s.1 == 'RUNNING' %}
|
||||||
<span title="{{lang.words.service|title()}} {{services_name[s.0]['name']}} {{lang.words.started}}"><span class="serverUp server-status"></span></span>
|
<span title="{{lang.words.service|title()}} {{services_name[s.0]['name']}} {{lang.words.started}}"><span class="serverUp server-status"></span></span>
|
||||||
{% set is_service_started_class = 'disabled-button' %}
|
{% set is_service_started_class = 'disabled-button' %}
|
||||||
{% set onclick_start_action = "" %}
|
{% set onclick_start_action = "" %}
|
||||||
{% set is_service_started_title = lang.words.service|title()+" "+services_name[s.0]['name']+" "+lang.words.already+" "+lang.words.started %}
|
{% set is_service_started_title = lang.words.service|title()+" "+services_name[s.0]['name']+" "+lang.words.already+" "+lang.words.started %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if (s.1.0 == 'inactive' or s.1.0 == 'failed' or s.1.0 == 'activating' or s.1.0 == 'STOPPED') and 'is not installed' not in s.3 %}
|
{% if (s.1 == 'inactive' or s.1 == 'failed' or s.1 == 'activating' or s.1 == 'STOPPED') and 'is not installed' not in s.2['current_version'] %}
|
||||||
<span title="{{lang.words.service|title()}} {{services_name[s.0]['name']}} {{lang.words.stopped}}"><span class="serverDown server-status"></span></span>
|
<span title="{{lang.words.service|title()}} {{services_name[s.0]['name']}} {{lang.words.stopped}}"><span class="serverDown server-status"></span></span>
|
||||||
{% set is_service_stopped_class = 'disabled-button' %}
|
{% set is_service_stopped_class = 'disabled-button' %}
|
||||||
{% set onclick_stop_action = "" %}
|
{% set onclick_stop_action = "" %}
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
{{services_name[s.0]['name']}}
|
{{services_name[s.0]['name']}}
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10 first-collumn">
|
<td class="padding10 first-collumn">
|
||||||
{% if 'is not installed' in s.3 or not s.3 %}
|
{% if 'is not installed' in s.2['current_version'] or not s.2['current_version'] %}
|
||||||
{% if s.0 in ('prometheus', 'grafana-server') %}
|
{% if s.0 in ('prometheus', 'grafana-server') %}
|
||||||
<a href="/app/install#monitoring" class="ui-button ui-widget ui-corner-all" title="{{lang.words.install|title()}} {{service_name}}">{{lang.words.install|title()}}</a>
|
<a href="/app/install#monitoring" class="ui-button ui-widget ui-corner-all" title="{{lang.words.install|title()}} {{service_name}}">{{lang.words.install|title()}}</a>
|
||||||
{% elif s.0 in ('rabbitmq-server', 'fail2ban') %}
|
{% elif s.0 in ('rabbitmq-server', 'fail2ban') %}
|
||||||
|
@ -61,8 +61,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if 'is not installed' not in s.3 %}
|
{% if 'is not installed' not in s.2['current_version'] %}
|
||||||
{{ s.3 }}
|
{{s.2['current_version']}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
|
|
|
@ -6,7 +6,6 @@ slack-sdk>=3.4.0
|
||||||
distro>=1.2.0
|
distro>=1.2.0
|
||||||
retry>=0.9.2
|
retry>=0.9.2
|
||||||
psutil>=5.9.1
|
psutil>=5.9.1
|
||||||
pika>=1.3.1
|
|
||||||
pdpyras>=4.5.2
|
pdpyras>=4.5.2
|
||||||
Flask-APScheduler>=1.12.4
|
Flask-APScheduler>=1.12.4
|
||||||
python3-nmap<=1.5.1
|
python3-nmap<=1.5.1
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
pyTelegramBotAPI==3.6.3
|
pyTelegramBotAPI==3.6.3
|
||||||
networkx==2.1
|
networkx==2.1
|
||||||
matplotlib==2.1.2
|
matplotlib==2.1.2
|
||||||
|
paramiko>=3.3.1
|
||||||
paramiko-ng>=2.5.0
|
paramiko-ng>=2.5.0
|
||||||
slack-sdk>=3.4.0
|
slack-sdk>=3.4.0
|
||||||
peewee>=3.14.10
|
peewee>=3.14.10
|
||||||
|
@ -8,7 +9,6 @@ PyMySQL>=1.0.2
|
||||||
retry>=0.9.2
|
retry>=0.9.2
|
||||||
pdpyras>=4.5.2
|
pdpyras>=4.5.2
|
||||||
tzlocal==2.0.0
|
tzlocal==2.0.0
|
||||||
pika>=1.3.1
|
|
||||||
Flask>=2.0.3
|
Flask>=2.0.3
|
||||||
Flask-Login>=0.4.1
|
Flask-Login>=0.4.1
|
||||||
Flask-Caching>=1.10.1
|
Flask-Caching>=1.10.1
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
configparser==3.5.0
|
configparser==3.5.0
|
||||||
pyTelegramBotAPI==3.6.3
|
pyTelegramBotAPI==3.6.3
|
||||||
|
paramiko>=3.3.1
|
||||||
networkx==2.1
|
networkx==2.1
|
||||||
matplotlib==2.1.2
|
matplotlib==2.1.2
|
||||||
slack-sdk>=3.4.0
|
slack-sdk>=3.4.0
|
||||||
|
@ -9,7 +10,6 @@ bottle>=0.12.18
|
||||||
retry>=0.9.2
|
retry>=0.9.2
|
||||||
tzlocal==2.0.0
|
tzlocal==2.0.0
|
||||||
pdpyras>=4.5.2
|
pdpyras>=4.5.2
|
||||||
pika>=1.3.1
|
|
||||||
Flask>=2.0.3
|
Flask>=2.0.3
|
||||||
Flask-Login>=0.4.1
|
Flask-Login>=0.4.1
|
||||||
Flask-Caching>=1.10.1
|
Flask-Caching>=1.10.1
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
configparser>=3.5.0
|
configparser>=3.5.0
|
||||||
pyTelegramBotAPI>=3.6.3
|
pyTelegramBotAPI>=3.6.3
|
||||||
|
paramiko>=3.3.1
|
||||||
networkx>=2.1
|
networkx>=2.1
|
||||||
matplotlib>=2.1.2
|
matplotlib>=2.1.2
|
||||||
slack-sdk>=3.4.0
|
slack-sdk>=3.4.0
|
||||||
|
@ -8,7 +9,6 @@ PyMySQL>=1.0.2
|
||||||
bottle>=0.12.18
|
bottle>=0.12.18
|
||||||
retry>=0.9.2
|
retry>=0.9.2
|
||||||
pdpyras>=4.5.2
|
pdpyras>=4.5.2
|
||||||
pika>=1.3.1
|
|
||||||
Flask>=2.0.3
|
Flask>=2.0.3
|
||||||
Flask-Login>=0.4.1
|
Flask-Login>=0.4.1
|
||||||
Flask-Caching>=1.10.1
|
Flask-Caching>=1.10.1
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
configparser>=3.5.0
|
configparser>=3.5.0
|
||||||
|
paramiko>=3.3.1
|
||||||
paramiko-ng>=2.5.0
|
paramiko-ng>=2.5.0
|
||||||
pytz>=2017.3
|
pytz>=2017.3
|
||||||
tzlocal==2.0.0
|
tzlocal==2.0.0
|
||||||
|
|
Loading…
Reference in New Issue