Browse Source

v3.4

pull/98/head
Aidaho12 6 years ago
parent
commit
bb2dfcd993
  1. 1
      README.md
  2. 16
      inc/users.js

1
README.md

@ -38,6 +38,7 @@ Began to lead a [Twitter](https://twitter.com/haproxy_wi), subscribe! I will wri
23. Web acceleration settings
24. Web application firewall
25. LDAP support
26. Keep active HAProxy service
![alt text](image/haproxy-wi-metrics.jpeg "Merics")

16
inc/users.js

@ -477,6 +477,7 @@ function addServer() {
var enable = 0;
var alert_en = 0;
var metrics = 0;
var active = 0;
if ($('#typeip').is(':checked')) {
typeip = '1';
}
@ -489,6 +490,9 @@ function addServer() {
if ($('#metrics').is(':checked')) {
var metrics = '1';
}
if ($('#active').is(':checked')) {
var active = '1';
}
allFields = $( [] ).add( $('#new-server-add') ).add( $('#new-ip') ).add( $('#new-port') )
allFields.removeClass( "ui-state-error" );
valid = valid && checkLength( $('#new-server-add'), "Hostname", 1 );
@ -510,7 +514,8 @@ function addServer() {
alert_en: alert_en,
metrics: metrics,
page: cur_url[0],
desc: $('#desc').val()
desc: $('#desc').val(),
active: active
},
type: "GET",
success: function( data ) {
@ -758,6 +763,8 @@ function removeTelegram(id) {
}
function updateUser(id) {
$('.alert-danger').remove();
cur_url[0] = cur_url[0].split('#')[0]
console.log(cur_url[0])
if (cur_url[0] != "servers.py") {
var usergroup = $('#usergroup-'+id+' option:selected' ).val();
} else {
@ -828,6 +835,7 @@ function updateServer(id) {
var enable = 0;
var alert_en = 0;
var metrics = 0;
var active = 0;
if ($('#typeip-'+id).is(':checked')) {
typeip = '1';
}
@ -840,6 +848,9 @@ function updateServer(id) {
if ($('#metrics-'+id).is(':checked')) {
metrics = '1';
}
if ($('#active-'+id).is(':checked')) {
active = '1';
}
var servergroup = $('#servergroup-'+id+' option:selected' ).val();
if (cur_url[0] == "servers.py") {
servergroup = $('#servergroup-'+id).val();
@ -858,7 +869,8 @@ function updateServer(id) {
id: id,
metrics: metrics,
alert_en: alert_en,
desc: $('#desc-'+id).val()
desc: $('#desc-'+id).val(),
active: active
},
type: "GET",
success: function( data ) {

Loading…
Cancel
Save