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'); \Log::debug('Preparing to test LDAP connection');
try { try {

View file

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

View file

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