v8.0: Refactor installation process feedback and retries

Commented out the JSON parsing function and added success notifications for service installations, consolidated "nice_service_name" object to variables.js, and reduced retry attempts and delay intervals in the Ansible Playbook for HAProxy installation tasks.
pull/399/head
Aidaho 2024-08-02 21:21:18 +03:00
parent 7559530ca2
commit cac743fea6
4 changed files with 8 additions and 6 deletions

View File

@ -30,9 +30,9 @@
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and HAPVER|length > 0
ignore_errors: yes
register: install_result
retries: 5
retries: 3
until: install_result.rc == 0
delay: 5
delay: 3
environment:
http_proxy: "{{PROXY}}"
https_proxy: "{{PROXY}}"
@ -48,9 +48,9 @@
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'timed out' in install_result.stderr")
ignore_errors: yes
register: install_result1
retries: 5
retries: 3
until: install_result1.rc == 0
delay: 5
delay: 3
environment:
http_proxy: "{{PROXY}}"
https_proxy: "{{PROXY}}"

View File

@ -435,7 +435,6 @@ function installServiceCluster(jsonData, service, progress_step, cluster_id) {
let install_mess = translate_div.attr('data-installing');
let timeout_mess = translate_div.attr('data-roxywi_timeout');
let something_wrong = translate_div.attr('data-something_wrong');
let nice_service_name = {'keepalived': 'HA Custer', 'haproxy': 'HAProxy', 'nginx': 'NGINX', 'apache': 'Apache'};
$('#server_creating_list').append('<li id="' + li_id + servers['cluster_id'] + '" class="server-creating proccessing">' + install_mess + ' ' + nice_service_name[service] + '</li>');
return $.ajax({
url: "/install/" + service,

View File

@ -111,7 +111,8 @@ $( function() {
if (data.status === 'failed') {
toastr.error(data.error);
} else {
parseAnsibleJsonOutput(data, service + ' GeoIP', '#geoip_service');
// parseAnsibleJsonOutput(data, service + ' GeoIP', '#geoip_service');
toastr.success('GeoIP has been installed');
$("#geoip_service").trigger("selectmenuchange");
}
}
@ -183,6 +184,7 @@ function installService(service) {
toastr.error(data.error);
} else {
$(select_id).trigger("selectmenuchange");
toastr.success(nice_service_name[service] + ' has been installed');
$("#ajax").empty();
}
}

View File

@ -11,6 +11,7 @@ const upload_and_restart = translate_div.attr('data-upload_and_restart');
const edit_word = translate_div.attr('data-edit');
const delete_word = translate_div.attr('data-delete');
const back_word = translate_div.attr('data-back');
const nice_service_name = {'keepalived': 'HA Custer', 'haproxy': 'HAProxy', 'nginx': 'NGINX', 'apache': 'Apache'};
// JS scripts URL
const scriptPath = "/static/js"