Fix showing DN icon for RootDSE, fix readme git clone
This commit is contained in:
parent
851010d6d5
commit
48131c1b4e
@ -57,7 +57,7 @@ In summary, for the time being, expect `master` to be buggy and broken, and I'll
|
||||
#### Installation
|
||||
1. Checkout the code from github
|
||||
```bash
|
||||
git checkout https://github.com/leenooks/phpLDAPadmin.git
|
||||
git clone https://github.com/leenooks/phpLDAPadmin.git
|
||||
```
|
||||
|
||||
1. Install composer dependencies.
|
||||
|
@ -34,8 +34,10 @@ class HomeController extends Controller
|
||||
|
||||
public function info()
|
||||
{
|
||||
$root = (new Entry)->rootDSE();
|
||||
|
||||
try {
|
||||
$attrs = collect((new Entry)->rootDSE()->getAttributes())
|
||||
$attrs = collect($root->getAttributes())
|
||||
->transform(function($item,$key) {
|
||||
foreach ($item as $k=>$v) {
|
||||
if (preg_match('/[0-9]+\.[0-9]+\.[0-9]+/',$v)) {
|
||||
@ -59,6 +61,7 @@ class HomeController extends Controller
|
||||
|
||||
return view('widgets.dn')
|
||||
->with('dn',__('Server Info'))
|
||||
->with('leaf',$root)
|
||||
->with('attributes',$this->sortAttrs($attrs));
|
||||
}
|
||||
|
||||
@ -68,7 +71,7 @@ class HomeController extends Controller
|
||||
|
||||
return view('widgets.dn')
|
||||
->with('dn',$dn)
|
||||
->with('leaf',$x=(new Server())->fetch($dn))
|
||||
->with('leaf',$x=(new Server)->fetch($dn))
|
||||
->with('attributes',$x ? $this->sortAttrs(collect($x->getAttributes())) : []);
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,9 @@ class Entry extends Model
|
||||
elseif (in_array('server',$objectclasses))
|
||||
return 'fas fa-server';
|
||||
|
||||
elseif (in_array('openldaprootdse',$objectclasses))
|
||||
return 'fas fa-info';
|
||||
|
||||
// Default
|
||||
return 'fa-fw fas fa-cog';
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
{{ $leaf->entryuuid[0] ?? '' }}
|
||||
@endsection
|
||||
@section('page_icon')
|
||||
{{ $leaf->icon() }}
|
||||
{{ $leaf->icon() ?? 'fas fa-info' }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
|
Loading…
Reference in New Issue
Block a user