Merge branch 'develop'

This commit is contained in:
snipe 2017-10-16 05:52:52 -07:00
commit 5b070ee32f
3 changed files with 10 additions and 13 deletions

View file

@ -75,8 +75,9 @@ class SettingsController extends Controller
//
}
public function getLdapTest()
public function ldaptest()
{
echo 'foo';
\Log::debug('Preparing to test LDAP connection');
try {

View file

@ -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);
}

View file

@ -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 ---*/