mirror of https://github.com/apache/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
This commit is contained in:
parent
6ccf27b7d1
commit
9943c1c920
|
@ -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<archivaRuntimeConfiguration.userManagerImpls().length;i++){
|
for(var i= 0;i<archivaRuntimeConfiguration.userManagerImpls().length;i++){
|
||||||
var id=archivaRuntimeConfiguration.userManagerImpls()[i];
|
var id=archivaRuntimeConfiguration.userManagerImpls()[i];
|
||||||
$.log("id:"+id);
|
$.log("id:"+id);
|
||||||
|
|
|
@ -992,6 +992,14 @@
|
||||||
<!-- TODO extraPropertiesEntries -->
|
<!-- TODO extraPropertiesEntries -->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<button data-bind="click: checkChangedLdapConfiguration,css:{ 'btn-warning': archivaRuntimeConfiguration().ldapConfiguration().modified() },
|
||||||
|
enabled: archivaRuntimeConfiguration().ldapConfiguration().modified()"
|
||||||
|
id="ldap-configuration-check-modification"class="btn">${$.i18n.prop('redback.runtime.ldap.checkModification')}</button>
|
||||||
|
|
||||||
|
<button data-bind="click: checkLdapServerConfiguration"
|
||||||
|
id="ldap-configuration-check-server"class="btn">${$.i18n.prop('redback.runtime.ldap.checkServer')}</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue