From c5ea14bb615eb9594e3a0dca8126afbb6b6bc816 Mon Sep 17 00:00:00 2001 From: Aidaho Date: Tue, 17 Oct 2023 10:27:40 +0300 Subject: [PATCH] v7.0.1.0 Changelog: https://roxy-wi.org/changelog#7.0.1 --- app/modules/server/ssh_connection.py | 4 ++-- app/templates/ajax/load_services.html | 10 +++++----- config_other/requirements_deb.txt | 1 - config_other/requirements_el7.txt | 2 +- config_other/requirements_el8.txt | 4 ++-- config_other/requirements_el9.txt | 2 +- requirements.txt | 1 + 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/modules/server/ssh_connection.py b/app/modules/server/ssh_connection.py index 6ae76223..d143c877 100644 --- a/app/modules/server/ssh_connection.py +++ b/app/modules/server/ssh_connection.py @@ -17,11 +17,11 @@ class SshConnection: def __enter__(self): try: if self.ssh_enable == 1: - k = paramiko.pkey.load_private_key_file(self.ssh_key_name) self.ssh.connect( hostname=self.server_ip, port=self.ssh_port, - username=self.ssh_user_name, pkey=k, + username=self.ssh_user_name, + key_filename=self.ssh_key_name, timeout=11, banner_timeout=200 ) diff --git a/app/templates/ajax/load_services.html b/app/templates/ajax/load_services.html index c2ffe188..070d4766 100644 --- a/app/templates/ajax/load_services.html +++ b/app/templates/ajax/load_services.html @@ -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 %} - {% if s.1.0 == 'active' or s.1.0 == 'RUNNING' %} + {% if s.1 == 'active' or s.1 == 'RUNNING' %} {% set is_service_started_class = 'disabled-button' %} {% set onclick_start_action = "" %} {% set is_service_started_title = lang.words.service|title()+" "+services_name[s.0]['name']+" "+lang.words.already+" "+lang.words.started %} {% 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'] %} {% set is_service_stopped_class = 'disabled-button' %} {% set onclick_stop_action = "" %} @@ -40,7 +40,7 @@ {{services_name[s.0]['name']}} - {% 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') %} {{lang.words.install|title()}} {% elif s.0 in ('rabbitmq-server', 'fail2ban') %} @@ -61,8 +61,8 @@ {% endif %} - {% if 'is not installed' not in s.3 %} - {{ s.3 }} + {% if 'is not installed' not in s.2['current_version'] %} + {{s.2['current_version']}} {% endif %} diff --git a/config_other/requirements_deb.txt b/config_other/requirements_deb.txt index 7f31c53b..f0d61f13 100644 --- a/config_other/requirements_deb.txt +++ b/config_other/requirements_deb.txt @@ -6,7 +6,6 @@ slack-sdk>=3.4.0 distro>=1.2.0 retry>=0.9.2 psutil>=5.9.1 -pika>=1.3.1 pdpyras>=4.5.2 Flask-APScheduler>=1.12.4 python3-nmap<=1.5.1 diff --git a/config_other/requirements_el7.txt b/config_other/requirements_el7.txt index 16a0e638..c9889657 100644 --- a/config_other/requirements_el7.txt +++ b/config_other/requirements_el7.txt @@ -1,6 +1,7 @@ pyTelegramBotAPI==3.6.3 networkx==2.1 matplotlib==2.1.2 +paramiko>=3.3.1 paramiko-ng>=2.5.0 slack-sdk>=3.4.0 peewee>=3.14.10 @@ -8,7 +9,6 @@ PyMySQL>=1.0.2 retry>=0.9.2 pdpyras>=4.5.2 tzlocal==2.0.0 -pika>=1.3.1 Flask>=2.0.3 Flask-Login>=0.4.1 Flask-Caching>=1.10.1 diff --git a/config_other/requirements_el8.txt b/config_other/requirements_el8.txt index 6cc084ae..f1e73b49 100644 --- a/config_other/requirements_el8.txt +++ b/config_other/requirements_el8.txt @@ -1,5 +1,6 @@ configparser==3.5.0 -pyTelegramBotAPI==3.6.3 +pyTelegramBotAPI==3.6.3 +paramiko>=3.3.1 networkx==2.1 matplotlib==2.1.2 slack-sdk>=3.4.0 @@ -9,7 +10,6 @@ bottle>=0.12.18 retry>=0.9.2 tzlocal==2.0.0 pdpyras>=4.5.2 -pika>=1.3.1 Flask>=2.0.3 Flask-Login>=0.4.1 Flask-Caching>=1.10.1 diff --git a/config_other/requirements_el9.txt b/config_other/requirements_el9.txt index 73e23209..ef2dc608 100644 --- a/config_other/requirements_el9.txt +++ b/config_other/requirements_el9.txt @@ -1,5 +1,6 @@ configparser>=3.5.0 pyTelegramBotAPI>=3.6.3 +paramiko>=3.3.1 networkx>=2.1 matplotlib>=2.1.2 slack-sdk>=3.4.0 @@ -8,7 +9,6 @@ PyMySQL>=1.0.2 bottle>=0.12.18 retry>=0.9.2 pdpyras>=4.5.2 -pika>=1.3.1 Flask>=2.0.3 Flask-Login>=0.4.1 Flask-Caching>=1.10.1 diff --git a/requirements.txt b/requirements.txt index d914c133..8aea0935 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ configparser>=3.5.0 +paramiko>=3.3.1 paramiko-ng>=2.5.0 pytz>=2017.3 tzlocal==2.0.0