mirror of https://github.com/Aidaho12/haproxy-wi
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
parent
7559530ca2
commit
cac743fea6
|
@ -30,9 +30,9 @@
|
||||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and HAPVER|length > 0
|
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and HAPVER|length > 0
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
register: install_result
|
register: install_result
|
||||||
retries: 5
|
retries: 3
|
||||||
until: install_result.rc == 0
|
until: install_result.rc == 0
|
||||||
delay: 5
|
delay: 3
|
||||||
environment:
|
environment:
|
||||||
http_proxy: "{{PROXY}}"
|
http_proxy: "{{PROXY}}"
|
||||||
https_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")
|
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'timed out' in install_result.stderr")
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
register: install_result1
|
register: install_result1
|
||||||
retries: 5
|
retries: 3
|
||||||
until: install_result1.rc == 0
|
until: install_result1.rc == 0
|
||||||
delay: 5
|
delay: 3
|
||||||
environment:
|
environment:
|
||||||
http_proxy: "{{PROXY}}"
|
http_proxy: "{{PROXY}}"
|
||||||
https_proxy: "{{PROXY}}"
|
https_proxy: "{{PROXY}}"
|
||||||
|
|
|
@ -435,7 +435,6 @@ function installServiceCluster(jsonData, service, progress_step, cluster_id) {
|
||||||
let install_mess = translate_div.attr('data-installing');
|
let install_mess = translate_div.attr('data-installing');
|
||||||
let timeout_mess = translate_div.attr('data-roxywi_timeout');
|
let timeout_mess = translate_div.attr('data-roxywi_timeout');
|
||||||
let something_wrong = translate_div.attr('data-something_wrong');
|
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>');
|
$('#server_creating_list').append('<li id="' + li_id + servers['cluster_id'] + '" class="server-creating proccessing">' + install_mess + ' ' + nice_service_name[service] + '</li>');
|
||||||
return $.ajax({
|
return $.ajax({
|
||||||
url: "/install/" + service,
|
url: "/install/" + service,
|
||||||
|
|
|
@ -111,7 +111,8 @@ $( function() {
|
||||||
if (data.status === 'failed') {
|
if (data.status === 'failed') {
|
||||||
toastr.error(data.error);
|
toastr.error(data.error);
|
||||||
} else {
|
} else {
|
||||||
parseAnsibleJsonOutput(data, service + ' GeoIP', '#geoip_service');
|
// parseAnsibleJsonOutput(data, service + ' GeoIP', '#geoip_service');
|
||||||
|
toastr.success('GeoIP has been installed');
|
||||||
$("#geoip_service").trigger("selectmenuchange");
|
$("#geoip_service").trigger("selectmenuchange");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,6 +184,7 @@ function installService(service) {
|
||||||
toastr.error(data.error);
|
toastr.error(data.error);
|
||||||
} else {
|
} else {
|
||||||
$(select_id).trigger("selectmenuchange");
|
$(select_id).trigger("selectmenuchange");
|
||||||
|
toastr.success(nice_service_name[service] + ' has been installed');
|
||||||
$("#ajax").empty();
|
$("#ajax").empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ const upload_and_restart = translate_div.attr('data-upload_and_restart');
|
||||||
const edit_word = translate_div.attr('data-edit');
|
const edit_word = translate_div.attr('data-edit');
|
||||||
const delete_word = translate_div.attr('data-delete');
|
const delete_word = translate_div.attr('data-delete');
|
||||||
const back_word = translate_div.attr('data-back');
|
const back_word = translate_div.attr('data-back');
|
||||||
|
const nice_service_name = {'keepalived': 'HA Custer', 'haproxy': 'HAProxy', 'nginx': 'NGINX', 'apache': 'Apache'};
|
||||||
|
|
||||||
// JS scripts URL
|
// JS scripts URL
|
||||||
const scriptPath = "/static/js"
|
const scriptPath = "/static/js"
|
||||||
|
|
Loading…
Reference in New Issue