diff --git a/app/modules/service/common.py b/app/modules/service/common.py index ecabd87d..3b8c7127 100644 --- a/app/modules/service/common.py +++ b/app/modules/service/common.py @@ -24,10 +24,6 @@ def get_correct_service_name(service: str, server_id: int) -> str: *prise is set to '1' in the database for the given server ID. If true, it returns "hapee-2.0-lb". If the service name is 'apache', it calls the get_correct_apache_service_name() method * with parameters 0 and the server ID to get the correct apache service name. If none of the conditions match, it will return the original service name. """ - if service == 'haproxy': - haproxy_enterprise = service_sql.select_service_setting(server_id, 'haproxy', 'haproxy_enterprise') - if haproxy_enterprise == '1': - return "hapee-2.0-lb" if service == 'apache': return get_correct_apache_service_name(0, server_id) diff --git a/app/routes/service/routes.py b/app/routes/service/routes.py index b761d8b6..f4b309dd 100644 --- a/app/routes/service/routes.py +++ b/app/routes/service/routes.py @@ -223,7 +223,6 @@ def show_service_settings(service, server_id): @check_services def save_service_settings(service): server_id = int(request.form.get('serverSettingsSave')) - haproxy_enterprise = int(request.form.get('serverSettingsEnterprise')) service_dockerized = int(request.form.get('serverSettingsDockerized')) service_restart = int(request.form.get('serverSettingsRestart')) server_ip = server_sql.get_server(server_id).ip @@ -232,15 +231,6 @@ def save_service_settings(service): disable_restart = f'Restart option is disabled for {service.title()} service' enable_restart = f'Restart option is disabled for {service.title()} service' - if service == 'haproxy': - if service_sql.insert_or_update_service_setting(server_id, service, 'haproxy_enterprise', haproxy_enterprise): - if haproxy_enterprise == '1': - roxywi_common.logging(server_ip, 'Service has been flagged as an Enterprise version', - keep_history=1, service=service) - else: - roxywi_common.logging(server_ip, 'Service has been flagged as a community version', - keep_history=1, service=service) - if service_sql.insert_or_update_service_setting(server_id, service, 'dockerized', service_dockerized): if service_dockerized == '1': roxywi_common.logging(server_ip, service_docker, keep_history=1, service=service) diff --git a/app/static/js/overview.js b/app/static/js/overview.js index ead90474..fab84d6f 100644 --- a/app/static/js/overview.js +++ b/app/static/js/overview.js @@ -436,12 +436,8 @@ function serverSettings(id, name) { }); } function serverSettingsSave(id, name, service, dialog_id) { - let haproxy_enterprise = 0; let service_dockerized = 0; let service_restart = 0; - if ($('#haproxy_enterprise').is(':checked')) { - haproxy_enterprise = '1'; - } if ($('#haproxy_dockerized').is(':checked')) { service_dockerized = '1'; } @@ -464,7 +460,6 @@ function serverSettingsSave(id, name, service, dialog_id) { url: "/service/settings/" + service, data: { serverSettingsSave: id, - serverSettingsEnterprise: haproxy_enterprise, serverSettingsDockerized: service_dockerized, serverSettingsRestart: service_restart, token: $('#token').val() @@ -522,7 +517,7 @@ function check_service_status(id, ip, service) { server_div.removeClass('div-server-head-up'); server_div.addClass('div-server-head-down'); } else { - if (data.Status === 'running') { + if (data.status === 'running') { server_div.addClass('div-server-head-up'); server_div.removeClass('div-server-head-down'); server_div.removeClass('div-server-head-unknown'); diff --git a/app/templates/ajax/service_settings.html b/app/templates/ajax/service_settings.html index 491d9199..9ff07ca1 100644 --- a/app/templates/ajax/service_settings.html +++ b/app/templates/ajax/service_settings.html @@ -1,33 +1,6 @@ {% from 'include/input_macros.html' import checkbox %} {% set nice_service_name = {'haproxy': 'HAProxy', 'nginx': 'NGINX', 'apache': 'Apache'} %}
HAProxy Enterprise | -- {% if s.value == '1' and s.setting == 'haproxy_enterprise' %} - {{ checkbox('haproxy_enterprise', checked='checked', title='This server uses HAProxy enterprise') }} - {% elif s.setting == 'haproxy_enterprise' %} - {{ checkbox('haproxy_enterprise', title='This server uses HAProxy community') }} - {% endif %} - | -
HAProxy Enterprise | -- {{ checkbox('haproxy_enterprise', title='This server uses HAProxy community') }} - | -