mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 23:54:12 -08:00
Merge branch 'develop'
This commit is contained in:
commit
5b070ee32f
|
@ -75,8 +75,9 @@ class SettingsController extends Controller
|
|||
//
|
||||
}
|
||||
|
||||
public function getLdapTest()
|
||||
public function ldaptest()
|
||||
{
|
||||
echo 'foo';
|
||||
\Log::debug('Preparing to test LDAP connection');
|
||||
|
||||
try {
|
||||
|
|
|
@ -335,13 +335,11 @@
|
|||
</div>
|
||||
<div class="col-md-9">
|
||||
<div id="ldaptestrow">
|
||||
<div class="col-md-8">
|
||||
<a class="btn btn-default btn-sm pull-left" id="ldaptest" style="margin-right: 10px;"> Test LDAP</a>
|
||||
<span id="ldaptesticon"></span>
|
||||
<span id="ldaptestresult"></span>
|
||||
<span id="ldapteststatus"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -389,20 +387,17 @@
|
|||
dataType: 'json',
|
||||
|
||||
success: function (data) {
|
||||
// console.dir(data);
|
||||
//console.log(data.responseJSON.message);
|
||||
$("#ldaptesticon").html('');
|
||||
$("#ldaptestrow").addClass('success');
|
||||
$("#ldapteststatus").html('<i class="fa fa-check text-success"></i> It worked!');
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
console.dir(data);
|
||||
console.log(data.responseJSON.message);
|
||||
//console.dir(data);
|
||||
$("#ldaptesticon").html('');
|
||||
$("#ldaptestrow").addClass('danger');
|
||||
$("#ldaptesticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
|
||||
$('#ldapteststatus').text(data.responseJSON.message);
|
||||
$('#ldapteststatus').text(data.responseText.message);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -419,7 +419,11 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
|
|||
|
||||
|
||||
/*--- Settings API ---*/
|
||||
|
||||
Route::get('settings/ldaptest', [
|
||||
'as' => 'api.settings.ldaptest',
|
||||
'uses' => 'SettingsController@ldaptest'
|
||||
]);
|
||||
|
||||
Route::resource('settings', 'SettingsController',
|
||||
[
|
||||
'names' =>
|
||||
|
@ -434,10 +438,7 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
|
|||
]
|
||||
); // Settings resource
|
||||
|
||||
Route::get('settings/ldaptest', [
|
||||
'as' => 'api.settings.ldaptest',
|
||||
'uses' => 'SettingsController@getLdapTest'
|
||||
]);
|
||||
|
||||
|
||||
|
||||
/*--- Status Labels API ---*/
|
||||
|
|
Loading…
Reference in a new issue