From: Olivier Lamy Date: Thu, 13 Dec 2012 20:03:45 +0000 (+0000) Subject: add buttons to check ldap configuration X-Git-Tag: archiva-1.4-M4~499 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9943c1c920e1a9ed2dad5c01ed142e2fb7354248;p=archiva.git add buttons to check ldap configuration git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1421466 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js index 1e40be952..3ebe55aa3 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js @@ -1262,6 +1262,58 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" } } + checkLdapServerConfiguration=function(){ + $.log("checkLdapServerConfiguration"); + clearUserMessages(); + var userMessages=$("#user-messages"); + userMessages.html(mediumSpinnerImg()); + $.log("checkChangedLdapConfiguration"); + $.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/checkLdapConnection", + { + type: "GET", + success: function(data) { + var message=$.i18n.prop('archiva-runtime-configuration.ldap.verified'); + displaySuccessMessage(message); + }, + error: function(data) { + var res = $.parseJSON(data.responseText); + displayRestError(res); + }, + complete:function(data){ + removeMediumSpinnerImg(userMessages); + //$("#archiva-runtime-configuration-save" ).button('reset'); + } + } + ); + } + + checkChangedLdapConfiguration=function(){ + clearUserMessages(); + var userMessages=$("#user-messages"); + userMessages.html(mediumSpinnerImg()); + $.log("checkChangedLdapConfiguration"); + $.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/checkLdapConnection", + { + type: "POST", + contentType: 'application/json', + data:ko.toJSON(self.archivaRuntimeConfiguration().ldapConfiguration), + dataType: 'json', + success: function(data) { + var message=$.i18n.prop('archiva-runtime-configuration.ldap.verified'); + displaySuccessMessage(message); + }, + error: function(data) { + var res = $.parseJSON(data.responseText); + displayRestError(res); + }, + complete:function(data){ + removeMediumSpinnerImg(userMessages); + //$("#archiva-runtime-configuration-save" ).button('reset'); + } + } + ); + } + for(var i= 0;i + + + + +