mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-07 03:47:32 -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');
|
\Log::debug('Preparing to test LDAP connection');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -335,13 +335,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div id="ldaptestrow">
|
<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>
|
<a class="btn btn-default btn-sm pull-left" id="ldaptest" style="margin-right: 10px;"> Test LDAP</a>
|
||||||
<span id="ldaptesticon"></span>
|
<span id="ldaptesticon"></span>
|
||||||
<span id="ldaptestresult"></span>
|
<span id="ldaptestresult"></span>
|
||||||
<span id="ldapteststatus"></span>
|
<span id="ldapteststatus"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -389,20 +387,17 @@
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
|
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
// console.dir(data);
|
|
||||||
//console.log(data.responseJSON.message);
|
|
||||||
$("#ldaptesticon").html('');
|
$("#ldaptesticon").html('');
|
||||||
$("#ldaptestrow").addClass('success');
|
$("#ldaptestrow").addClass('success');
|
||||||
$("#ldapteststatus").html('<i class="fa fa-check text-success"></i> It worked!');
|
$("#ldapteststatus").html('<i class="fa fa-check text-success"></i> It worked!');
|
||||||
},
|
},
|
||||||
|
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
console.dir(data);
|
//console.dir(data);
|
||||||
console.log(data.responseJSON.message);
|
|
||||||
$("#ldaptesticon").html('');
|
$("#ldaptesticon").html('');
|
||||||
$("#ldaptestrow").addClass('danger');
|
$("#ldaptestrow").addClass('danger');
|
||||||
$("#ldaptesticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
|
$("#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 ---*/
|
/*--- Settings API ---*/
|
||||||
|
Route::get('settings/ldaptest', [
|
||||||
|
'as' => 'api.settings.ldaptest',
|
||||||
|
'uses' => 'SettingsController@ldaptest'
|
||||||
|
]);
|
||||||
|
|
||||||
Route::resource('settings', 'SettingsController',
|
Route::resource('settings', 'SettingsController',
|
||||||
[
|
[
|
||||||
'names' =>
|
'names' =>
|
||||||
|
@ -434,10 +438,7 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
|
||||||
]
|
]
|
||||||
); // Settings resource
|
); // Settings resource
|
||||||
|
|
||||||
Route::get('settings/ldaptest', [
|
|
||||||
'as' => 'api.settings.ldaptest',
|
|
||||||
'uses' => 'SettingsController@getLdapTest'
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
/*--- Status Labels API ---*/
|
/*--- Status Labels API ---*/
|
||||||
|
|
Loading…
Reference in a new issue