mirror of https://github.com/Aidaho12/haproxy-wi
parent
0092bd77b9
commit
b82bc2cb14
|
@ -5,25 +5,7 @@
|
||||||
- name: Set SSH port
|
- name: Set SSH port
|
||||||
set_fact:
|
set_fact:
|
||||||
ansible_port: "{{SSH_PORT}}"
|
ansible_port: "{{SSH_PORT}}"
|
||||||
|
|
||||||
|
|
||||||
- name: collect facts about system services
|
|
||||||
service_facts:
|
|
||||||
register: services_state
|
|
||||||
|
|
||||||
|
|
||||||
- name: Open stat port for firewalld
|
|
||||||
firewalld:
|
|
||||||
port: "9101/tcp"
|
|
||||||
state: enabled
|
|
||||||
permanent: yes
|
|
||||||
immediate: yes
|
|
||||||
ignore_errors: yes
|
|
||||||
no_log: True
|
|
||||||
debugger: never
|
|
||||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ansible_facts.services["firewalld.service"]['state'] == "running"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Open stat port for iptables
|
- name: Open stat port for iptables
|
||||||
iptables:
|
iptables:
|
||||||
chain: INPUT
|
chain: INPUT
|
||||||
|
|
|
@ -5,22 +5,6 @@
|
||||||
- name: Set SSH port
|
- name: Set SSH port
|
||||||
set_fact:
|
set_fact:
|
||||||
ansible_port: "{{SSH_PORT}}"
|
ansible_port: "{{SSH_PORT}}"
|
||||||
|
|
||||||
|
|
||||||
- name: collect facts about system services
|
|
||||||
service_facts:
|
|
||||||
register: services_state
|
|
||||||
|
|
||||||
|
|
||||||
- name: Open stat port for firewalld
|
|
||||||
firewalld:
|
|
||||||
port: "9113/tcp"
|
|
||||||
state: enabled
|
|
||||||
permanent: yes
|
|
||||||
immediate: yes
|
|
||||||
ignore_errors: yes
|
|
||||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ansible_facts.services["firewalld.service"]['state'] == "running"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Open stat port for iptables
|
- name: Open stat port for iptables
|
||||||
iptables:
|
iptables:
|
||||||
|
|
|
@ -6,22 +6,6 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
ansible_port: "{{SSH_PORT}}"
|
ansible_port: "{{SSH_PORT}}"
|
||||||
|
|
||||||
|
|
||||||
- name: collect facts about system services
|
|
||||||
service_facts:
|
|
||||||
register: services_state
|
|
||||||
|
|
||||||
|
|
||||||
- name: Open stat port for firewalld
|
|
||||||
firewalld:
|
|
||||||
port: "9100/tcp"
|
|
||||||
state: enabled
|
|
||||||
permanent: yes
|
|
||||||
immediate: yes
|
|
||||||
ignore_errors: yes
|
|
||||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ansible_facts.services["firewalld.service"]['state'] == "running"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Open stat port for iptables
|
- name: Open stat port for iptables
|
||||||
iptables:
|
iptables:
|
||||||
chain: INPUT
|
chain: INPUT
|
||||||
|
|
136
inc/users.js
136
inc/users.js
|
@ -17,7 +17,7 @@ $( function() {
|
||||||
} else {
|
} else {
|
||||||
response(data.split(" "));
|
response(data.split(" "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
autoFocus: true,
|
autoFocus: true,
|
||||||
|
@ -39,7 +39,7 @@ $( function() {
|
||||||
} else {
|
} else {
|
||||||
response(data.split(" "));
|
response(data.split(" "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
autoFocus: true,
|
autoFocus: true,
|
||||||
|
@ -70,7 +70,7 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/\s+/g,' ');
|
data = data.replace(/\s+/g,' ');
|
||||||
$("#ajax").html('')
|
$("#ajax").html('')
|
||||||
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
||||||
|
@ -87,8 +87,8 @@ $( function() {
|
||||||
toastr.info(data);
|
toastr.info(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
});
|
});
|
||||||
$('#nginx_install').click(function() {
|
$('#nginx_install').click(function() {
|
||||||
$("#ajax").html('')
|
$("#ajax").html('')
|
||||||
var syn_flood = 0;
|
var syn_flood = 0;
|
||||||
|
@ -113,7 +113,7 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/\s+/g,' ');
|
data = data.replace(/\s+/g,' ');
|
||||||
$("#ajax").html('')
|
$("#ajax").html('')
|
||||||
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
||||||
|
@ -131,8 +131,8 @@ $( function() {
|
||||||
toastr.info(data);
|
toastr.info(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
});
|
});
|
||||||
$('#grafna_install').click(function() {
|
$('#grafna_install').click(function() {
|
||||||
$("#ajaxmon").html('');
|
$("#ajaxmon").html('');
|
||||||
$("#ajaxmon").html(wait_mess);
|
$("#ajaxmon").html(wait_mess);
|
||||||
|
@ -143,7 +143,7 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/\s+/g,' ');
|
data = data.replace(/\s+/g,' ');
|
||||||
$("#ajaxmon").html('');
|
$("#ajaxmon").html('');
|
||||||
if (data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1' || data.indexOf('ERROR') != '-1') {
|
if (data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1' || data.indexOf('ERROR') != '-1') {
|
||||||
|
@ -160,8 +160,8 @@ $( function() {
|
||||||
toastr.info(data);
|
toastr.info(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
});
|
});
|
||||||
$('#haproxy_exp_install').click(function() {
|
$('#haproxy_exp_install').click(function() {
|
||||||
$("#ajaxmon").html('')
|
$("#ajaxmon").html('')
|
||||||
$("#ajaxmon").html(wait_mess);
|
$("#ajaxmon").html(wait_mess);
|
||||||
|
@ -178,7 +178,7 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/\s+/g,' ');
|
data = data.replace(/\s+/g,' ');
|
||||||
$("#ajaxmon").html('');
|
$("#ajaxmon").html('');
|
||||||
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
||||||
|
@ -197,8 +197,8 @@ $( function() {
|
||||||
toastr.info(data);
|
toastr.info(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
});
|
});
|
||||||
$('#nginx_exp_install').click(function() {
|
$('#nginx_exp_install').click(function() {
|
||||||
$("#ajaxmon").html('')
|
$("#ajaxmon").html('')
|
||||||
$("#ajaxmon").html(wait_mess);
|
$("#ajaxmon").html(wait_mess);
|
||||||
|
@ -215,7 +215,7 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/\s+/g,' ');
|
data = data.replace(/\s+/g,' ');
|
||||||
$("#ajaxmon").html('');
|
$("#ajaxmon").html('');
|
||||||
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
if (data.indexOf('error:') != '-1' || data.indexOf('FAILED') != '-1' || data.indexOf('UNREACHABLE') != '-1') {
|
||||||
|
@ -233,7 +233,7 @@ $( function() {
|
||||||
toastr.info(data);
|
toastr.info(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
});
|
});
|
||||||
$('#node_exp_install').click(function() {
|
$('#node_exp_install').click(function() {
|
||||||
$("#ajaxmon").html('')
|
$("#ajaxmon").html('')
|
||||||
|
@ -280,9 +280,9 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/^\s+|\s+$/g,'');
|
data = data.replace(/^\s+|\s+$/g,'');
|
||||||
if(data != '') {
|
if(data != '') {
|
||||||
data = data+'-1';
|
data = data+'-1';
|
||||||
$('#cur_hap_ver').text(data);
|
$('#cur_hap_ver').text(data);
|
||||||
$('#cur_hap_ver').css('font-weight', 'bold');
|
$('#cur_hap_ver').css('font-weight', 'bold');
|
||||||
|
@ -305,12 +305,12 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/^\s+|\s+$/g,'');
|
data = data.replace(/^\s+|\s+$/g,'');
|
||||||
if(data.indexOf('bash') != '-1' || data.indexOf('such') != '-1' || data.indexOf('command not found') != '-1') {
|
if(data.indexOf('bash') != '-1' || data.indexOf('such') != '-1' || data.indexOf('command not found') != '-1') {
|
||||||
$('#cur_nginx_ver').text('Nginx has not installed');
|
$('#cur_nginx_ver').text('Nginx has not installed');
|
||||||
$('#nginx_install').text('Install');
|
$('#nginx_install').text('Install');
|
||||||
$('#nginx_install').attr('title', 'Install Nginx');
|
$('#nginx_install').attr('title', 'Install Nginx');
|
||||||
} else {
|
} else {
|
||||||
$('#cur_nginx_ver').text(data);
|
$('#cur_nginx_ver').text(data);
|
||||||
$('#cur_nginx_ver').css('font-weight', 'bold');
|
$('#cur_nginx_ver').css('font-weight', 'bold');
|
||||||
|
@ -329,12 +329,12 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/^\s+|\s+$/g,'');
|
data = data.replace(/^\s+|\s+$/g,'');
|
||||||
if (data.indexOf('error:') != '-1') {
|
if (data.indexOf('error:') != '-1') {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
} else if(data == 'no') {
|
} else if(data == 'no' || data == '') {
|
||||||
$('#cur_haproxy_exp_ver').text('HAProxy exporter has been not installed');
|
$('#cur_haproxy_exp_ver').text('HAProxy exporter has been not installed');
|
||||||
} else {
|
} else {
|
||||||
$('#cur_haproxy_exp_ver').text(data);
|
$('#cur_haproxy_exp_ver').text(data);
|
||||||
|
@ -352,12 +352,12 @@ $( function() {
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/^\s+|\s+$/g,'');
|
data = data.replace(/^\s+|\s+$/g,'');
|
||||||
if (data.indexOf('error:') != '-1') {
|
if (data.indexOf('error:') != '-1') {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
} else if(data == 'no') {
|
} else if(data == 'no' || data == '') {
|
||||||
$('#cur_nginx_exp_ver').text('Nginx exporter has not been installed');
|
$('#cur_nginx_exp_ver').text('Nginx exporter has not been installed');
|
||||||
} else {
|
} else {
|
||||||
$('#cur_nginx_exp_ver').text(data);
|
$('#cur_nginx_exp_ver').text(data);
|
||||||
|
@ -377,10 +377,10 @@ $( function() {
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
data = data.replace(/^\s+|\s+$/g,'');
|
data = data.replace(/^\s+|\s+$/g,'');
|
||||||
if (data.indexOf('error:') != '-1' || data.indexOf('command') != '-1') {
|
if (data.indexOf('error:') != '-1') {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
} else if(data == 'no') {
|
} else if(data == 'no' || data.indexOf('command') != '-1' || data == '') {
|
||||||
$('#cur_node_exp_ver').text('Node exporter has not been installed');
|
$('#cur_node_exp_ver').text('Node exporter has not been installed');
|
||||||
} else {
|
} else {
|
||||||
$('#cur_node_exp_ver').text(data);
|
$('#cur_node_exp_ver').text(data);
|
||||||
|
@ -666,7 +666,7 @@ $( function() {
|
||||||
$('#search_ldap_user').click(function() {
|
$('#search_ldap_user').click(function() {
|
||||||
var valid = true;
|
var valid = true;
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
allFields = $( [] ).add( $('#new-username') )
|
allFields = $( [] ).add( $('#new-username') )
|
||||||
allFields.removeClass( "ui-state-error" );
|
allFields.removeClass( "ui-state-error" );
|
||||||
valid = valid && checkLength( $('#new-username'), "user name", 1 );
|
valid = valid && checkLength( $('#new-username'), "user name", 1 );
|
||||||
user = $('#new-username').val()
|
user = $('#new-username').val()
|
||||||
|
@ -683,16 +683,16 @@ $( function() {
|
||||||
if (data.indexOf('error:') != '-1') {
|
if (data.indexOf('error:') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
$('#new-email').val('');
|
$('#new-email').val('');
|
||||||
$('#new-password').attr('readonly', false);
|
$('#new-password').attr('readonly', false);
|
||||||
$('#new-password').val('');
|
$('#new-password').val('');
|
||||||
} else {
|
} else {
|
||||||
var json = $.parseJSON(data);
|
var json = $.parseJSON(data);
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
$('#new-email').val(json[0]);
|
$('#new-email').val(json[0]);
|
||||||
$('#new-username').val(user+'@'+json[1]);
|
$('#new-username').val(user+'@'+json[1]);
|
||||||
$('#new-password').val('aduser');
|
$('#new-password').val('aduser');
|
||||||
$('#new-password').attr('readonly', true);
|
$('#new-password').attr('readonly', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
clearTips();
|
clearTips();
|
||||||
|
@ -875,7 +875,7 @@ function addUser(dialog_id) {
|
||||||
var id = data.match(getId);
|
var id = data.match(getId);
|
||||||
addUserGroup(id[0]);
|
addUserGroup(id[0]);
|
||||||
common_ajax_action_after_success(dialog_id, 'user-'+id, 'ajax-users', data);
|
common_ajax_action_after_success(dialog_id, 'user-'+id, 'ajax-users', data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
@ -987,7 +987,7 @@ function addServer(dialog_id) {
|
||||||
$( ".controlgroup" ).controlgroup();
|
$( ".controlgroup" ).controlgroup();
|
||||||
$( "select" ).selectmenu();
|
$( "select" ).selectmenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1209,7 +1209,7 @@ function confirmDeleteUser(id) {
|
||||||
title: "Are you sure you want to delete " +$('#login-'+id).val() + "?",
|
title: "Are you sure you want to delete " +$('#login-'+id).val() + "?",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Delete": function() {
|
"Delete": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
removeUser(id);
|
removeUser(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1227,7 +1227,7 @@ function confirmDeleteGroup(id) {
|
||||||
title: "Are you sure you want to delete " +$('#name-'+id).val() + "?",
|
title: "Are you sure you want to delete " +$('#name-'+id).val() + "?",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Delete": function() {
|
"Delete": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
removeGroup(id);
|
removeGroup(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1245,7 +1245,7 @@ function confirmDeleteServer(id) {
|
||||||
title: "Are you sure you want to delete " +$('#hostname-'+id).val() + "?",
|
title: "Are you sure you want to delete " +$('#hostname-'+id).val() + "?",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Delete": function() {
|
"Delete": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
removeServer(id);
|
removeServer(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1263,7 +1263,7 @@ function confirmDeleteSsh(id) {
|
||||||
title: "Are you sure you want to delete " +$('#ssh_name-'+id).val() + "?",
|
title: "Are you sure you want to delete " +$('#ssh_name-'+id).val() + "?",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Delete": function() {
|
"Delete": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
removeSsh(id);
|
removeSsh(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1281,7 +1281,7 @@ function confirmDeleteTelegram(id) {
|
||||||
title: "Are you sure you want to delete " +$('#telegram-chanel-'+id).val() + "?",
|
title: "Are you sure you want to delete " +$('#telegram-chanel-'+id).val() + "?",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Delete": function() {
|
"Delete": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
removeTelegram(id);
|
removeTelegram(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1317,7 +1317,7 @@ function confirmDeleteBackup(id) {
|
||||||
title: "Are you sure you want to delete job for" +$('#backup-server-'+id).val() + "?",
|
title: "Are you sure you want to delete job for" +$('#backup-server-'+id).val() + "?",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Delete": function() {
|
"Delete": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
removeBackup(id);
|
removeBackup(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1419,7 +1419,7 @@ function removeUser(id) {
|
||||||
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function removeServer(id) {
|
function removeServer(id) {
|
||||||
|
@ -1441,8 +1441,8 @@ function removeServer(id) {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.warning(data);
|
toastr.warning(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function removeGroup(id) {
|
function removeGroup(id) {
|
||||||
$("#group-"+id).css("background-color", "#f2dede");
|
$("#group-"+id).css("background-color", "#f2dede");
|
||||||
|
@ -1462,8 +1462,8 @@ function removeGroup(id) {
|
||||||
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function removeSsh(id) {
|
function removeSsh(id) {
|
||||||
$("#ssh-table-"+id).css("background-color", "#f2dede");
|
$("#ssh-table-"+id).css("background-color", "#f2dede");
|
||||||
|
@ -1483,8 +1483,8 @@ function removeSsh(id) {
|
||||||
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function removeTelegram(id) {
|
function removeTelegram(id) {
|
||||||
$("#telegram-table-"+id).css("background-color", "#f2dede");
|
$("#telegram-table-"+id).css("background-color", "#f2dede");
|
||||||
|
@ -1502,8 +1502,8 @@ function removeTelegram(id) {
|
||||||
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function removeSlack(id) {
|
function removeSlack(id) {
|
||||||
$("#slack-table-"+id).css("background-color", "#f2dede");
|
$("#slack-table-"+id).css("background-color", "#f2dede");
|
||||||
|
@ -1543,8 +1543,8 @@ function removeBackup(id) {
|
||||||
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
} else if (data.indexOf('error:') != '-1' || data.indexOf('unique') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function updateUser(id) {
|
function updateUser(id) {
|
||||||
toastr.remove();
|
toastr.remove();
|
||||||
|
@ -1615,12 +1615,12 @@ function updateGroup(id) {
|
||||||
}
|
}
|
||||||
function updateServer(id) {
|
function updateServer(id) {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
var typeip = 0;
|
let typeip = 0;
|
||||||
var enable = 0;
|
let enable = 0;
|
||||||
var haproxy = 0;
|
let haproxy = 0;
|
||||||
var nginx = 0;
|
let nginx = 0;
|
||||||
var firewall = 0;
|
let firewall = 0;
|
||||||
var protected_serv = 0;
|
let protected_serv = 0;
|
||||||
if ($('#typeip-'+id).is(':checked')) {
|
if ($('#typeip-'+id).is(':checked')) {
|
||||||
typeip = '1';
|
typeip = '1';
|
||||||
}
|
}
|
||||||
|
@ -1860,7 +1860,7 @@ function showApacheLog(serv) {
|
||||||
'&minut=' + minut +
|
'&minut=' + minut +
|
||||||
'&hour1=' + hour1 +
|
'&hour1=' + hour1 +
|
||||||
'&minut1=' + minut1);
|
'&minut1=' + minut1);
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function checkSshConnect(ip) {
|
function checkSshConnect(ip) {
|
||||||
|
@ -1883,7 +1883,7 @@ function checkSshConnect(ip) {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.success('Connect is accepted');
|
toastr.success('Connect is accepted');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function openChangeUserPasswordDialog(id) {
|
function openChangeUserPasswordDialog(id) {
|
||||||
|
@ -1912,7 +1912,7 @@ function changeUserPasswordDialog(id) {
|
||||||
duration: 200
|
duration: 200
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
"Change": function() {
|
"Change": function() {
|
||||||
changeUserPassword(id, $(this));
|
changeUserPassword(id, $(this));
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
|
@ -1976,17 +1976,17 @@ function changeUserGroupDialog(id) {
|
||||||
title: "Change "+$('#login-'+id).val()+" groups",
|
title: "Change "+$('#login-'+id).val()+" groups",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Save": function() {
|
"Save": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
changeUserGroup(id);
|
changeUserGroup(id);
|
||||||
},
|
},
|
||||||
Cancel: function() {
|
Cancel: function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function changeUserServiceDialog(id) {
|
function changeUserServiceDialog(id) {
|
||||||
$.ajax( {
|
$.ajax( {
|
||||||
|
@ -2042,7 +2042,7 @@ function changeUserGroup(id) {
|
||||||
$("#user-" + id).removeClass("update");
|
$("#user-" + id).removeClass("update");
|
||||||
}, 2500);
|
}, 2500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function changeUserServices(id) {
|
function changeUserServices(id) {
|
||||||
|
@ -2082,7 +2082,7 @@ function addUserGroup(id) {
|
||||||
if (data.indexOf('error:') != '-1' || data.indexOf('Failed') != '-1') {
|
if (data.indexOf('error:') != '-1' || data.indexOf('Failed') != '-1') {
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function confirmAjaxServiceAction(action, service) {
|
function confirmAjaxServiceAction(action, service) {
|
||||||
|
@ -2122,7 +2122,7 @@ function ajaxActionServies(action, service) {
|
||||||
},
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
alert(w.data_error);
|
alert(w.data_error);
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function updateService(service) {
|
function updateService(service) {
|
||||||
|
|
Loading…
Reference in New Issue